In This Topic ▼

ILMVConvRGB Interface

Data Types:

LM_FORMATTYPE

typedef enum  
{ 
   LM_FORMATTYPE_VIDEOINFO, 
   LM_FORMATTYPE_VIDEOINFO2, 
} LM_FORMATTYPE; 

Lists the possible values for the format types.

LM_FORMATTYPE_VIDEOINFO VIDEOINFO format type.
LM_FORMATTYPE_VIDEOINFO2 VIDEOINFO2 format type.

USEDBITS

typedef enum 
{ 
   USEUPPERBITS = 1, 
   USELOWERBITS, 
   USEFULLRANGE, 
   NOCHANGE, 
} USEDBITS; 

LM_MEDIATYPES

typedef enum 
{ 
   LM_MEDIATYPE_AUTO = 0x0000,  /* Any */ 
   LM_MEDIATYPE_RGB1 = 0x0001, 
   LM_MEDIATYPE_RGB4 = 0x0004, 
   LM_MEDIATYPE_RGB8 = 0x0008, 
   LM_MEDIATYPE_RGB555 = 0x000f, 
   LM_MEDIATYPE_RGB565 = 0x0010, 
   LM_MEDIATYPE_RGB24 = 0x0018, 
   LM_MEDIATYPE_RGB32 = 0x0020, 
   LM_MEDIATYPE_ARGB32 = 0x0021, 
   LM_MEDIATYPE_LGRY12 = 0x000c, 
   LM_MEDIATYPE_LGRY16 = 0x0011, 
   LM_MEDIATYPE_YUY2 = 0x0033 
} LM_MEDIATYPES; 

Describes the RGB supported formats.

Interface Methods:

HRESULT SetInputType(int nType, BOOL bPalette)

Parameters

nType

One of the LM_MEDIATYPES values.

bPalette

Determines whether the input is palletized or not, this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media input type.

Returns

S_OK if successful, S_FALSE other wise.

HRESULT GetInputType(int *pnType, BOOL *pbPalette)

Parameters

pnType

A valid pointer to an integer variable that will receive the input type ( one of the LM_MEDIATYPES constants).

pbPalette

A valid pointer to a Boolean variable that will receive the input palette status. This is valid only if the input type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to FALSE.

Description

Retrieves the current media input type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetOutputType(int nType, BOOL bPalette)

Parameters

nType

One of the LM_MEDIATYPES values.

bPalette

Determines whether the output is palletized or not, this is valid only if nType is LM_MEDIATYPE_RGB8.

Description

Sets the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetOutputType(int *pnType, BOOL *pbPalette)

Parameters

pnType

A valid pointer to an integer variable that will receive the output type ( one of the LM_MEDIATYPES constants).

pbPalette

A valid pointer to a Boolean variable that will receive the output palette status. This is valid only if the output type is LM_MEDIATYPE_RGB8, otherwise, pbPalette will be always set to FALSE.

Description

Retrieves the current media output type.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetRGBOrder(BOOL bRGBOrder)

Parameters

bRGBOrder

TRUE to switch to RGB mode, FALSE to switch to BGR mode.

Description

Sets the RGB channels order, either RGB (TRUE) or BGR (FALSE).

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetRGBOrder(BOOL *bRGBOrder)

Parameters

*bRGBOrder

A valid pointer to a Boolean variable that will receive the current RGB order, it will be set to TRUE if the order is RGB or FALSE if the order is BGR.

Description

Gets the RGB channel order, either RGB (TRUE) or BGR (FALSE)..

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetUsedBit(int UsedBit)

Parameters

UsedBit

an integer variable that contains the bit usage option. Possible values are:

USEUPPERBITS,

USELOWERBITS,

USEFULLRANGE,

Or NOCHANGE.

Description

Used with LGRY media type only, either 16, or 12 bits. This property determines the range of bits to be used, or which bits will hold the useful data.

Example: if the input is LGRY 16 with low bit = 3, and high bit = 10, and the output is 12 bit LGRY, then the filter can give the following options:

1. Use Lower bits, the output useful range will be: 0 to 7.

2. Use upper bits, the output useful range will be: 4 to 11.

3. Use full range, the output useful range will be: 0 to 11.

4. No change, leave output same as input if possible, in this case 3 to 10.

If none of the above options is applicable, the full range will be used.

For information about the support LEAD has added for 12- and 16-bit Grayscale, refer to 12- and 16-bit Grayscale Format used by LEADTOOLS toolkits.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetUsedBit(int *pUsedBit)

Parameters

pUsedBit

A valid pointer to an integer variable to be updated with the currently used bits. Upon a successful return, it will contain one of the following values: 

USEUPPERBITS

USELOWERBITS

USEFULLRANGE

NOCHANGE

Description

Retrieves the currently used bits.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetAutoStop(BOOL bAutoStop)

Parameters

bAutoStop

A Boolean value that indicates the state of graph auto stopping. TRUE to automatically stop the graph when needed. Stopping the graph is needed when the filter reconnects one of its pins; this operation is needed when the user changes the pins media type. If set to FALSE, the filter will refuse the change.

Description

Sets the graph auto stopping state.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetAutoStop(BOOL *pbAutoStop)

Parameters

*pbAutoStop

A valid pointer to a Boolean variable that will receive the current graph auto stopping state. TRUE indicates the graph will be stopped automatically if needed.

Description

Gets the graph auto stopping state.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetInputVideoType(LM_FORMATTYPE *pVal)

Parameters

*pVal

A valid pointer to a variable that will receive the current input video format. Possible values are:

LM_FORMATTYPE_VIDEOINFO:   The current format is VIDEOINFO. The filter will accept media types of this format only.

LM_FORMATTYPE_VIDEOINFO2:  The current format is VIDEOINFO2. The filter will accept media types of this format only.

Description

Gets the current input video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetInputVideoType(LM_FORMATTYPE newVal)

Parameters

newVal

The new input video format to accept. Possible values are:

LM_FORMATTYPE_VIDEOINFO:   The filter will accept media types of VIDEOINFO format only.

LM_FORMATTYPE_VIDEOINFO2:  The filter will accept media types of VIDEOINFO2 format only.

Description

Sets the input video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetOutputVideoType(LM_FORMATTYPE *pVal)

Parameters

pVal

A valid pointer to a variable that will receive the current output video format. Possible values are:

LM_FORMATTYPE_VIDEOINFO:     The current format is VIDEOINFO. The filter will offer media types of this format only.

LM_FORMATTYPE_VIDEOINFO2:   The current format is VIDEOINFO2. The filter will offer media types of this format only.

Description

Gets the current output video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT SetOutputVideoType(LM_FORMATTYPE newVal)

Parameters

newVal

The new output video format to offer. Possible values are:

LM_FORMATTYPE_VIDEOINFO:   The filter will offer media types of VIDEOINFO format only.

LM_FORMATTYPE_VIDEOINFO2:  The filter will offer media types of VIDEOINFO2 format only.

Description

Sets the output video format the filter accepts.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Returns

S_OK if connected, S_FALSE otherwise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth

A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.

plInHeight

A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.

plOutWidth

A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.

plOutHeight

A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetInputOutputMediaType(GUID *Input, GUID *Output);

Parameters

Input

A valid pointer to a GUID structure to be updated with the input media type GUID.

NULL can be passed if this value is not needed.

Output

A valid pointer to a GUID structure to be updated with the output media type GUID.  NULL can be passed if this value is not needed.

Description

Gets the current media types of the filters input and output pins.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetIOBitCount(int *plInBits, int *plOutBits)

Parameters

pInBitCount

A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.

pPBitCount

A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help