In This Topic ▼

ILMVConvRGB Interface

Data Types

LM_FORMATTYPE

Summary

Lists the possible values for the format types.

Syntax

typedef enum  
{ 
   LM_FORMATTYPE_VIDEOINFO, 
   LM_FORMATTYPE_VIDEOINFO2, 
} LM_FORMATTYPE; 

Members

LM_FORMATTYPE_VIDEOINFO

VIDEOINFO format type. The filter will accept media types of this format only.

LM_FORMATTYPE_VIDEOINFO2

VIDEOINFO2 format type. The filter will accept media types of this format only.

USEDBITS

Summary

Describes the bit usage option.

Syntax

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

LM_MEDIATYPES

Summary

Describes the RGB supported formats.

Syntax

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; 

Methods

HRESULT SetInputType(int nType, BOOL bPalette)

Description

Sets the current media input type.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetInputType(int *pnType, BOOL *pbPalette)

Description

Retrieves the current media input type.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetOutputType(int nType, BOOL bPalette)

Description

Sets the current media output type.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetOutputType(int *pnType, BOOL *pbPalette)

Description

Retrieves the current media output type.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetRGBOrder(BOOL bRGBOrder)

Description

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

Parameters

bRGBOrder

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

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetRGBOrder(BOOL *bRGBOrder)

Description

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

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetUsedBit(int UsedBit)

Description

Determines the range of bits to be used, or which bits will hold the useful data.

Parameters

UsedBit

An integer variable that contains the bit usage option. For possible values, refer to USEDBITS.

Comments

Used with LGRY media type only, either 16, or 12 bits.

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

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetUsedBit(int *pUsedBit)

Description

Retrieves the currently used bits.

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 of USEDBITS.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetAutoStop(BOOL bAutoStop)

Description

Sets the graph auto stopping state.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetAutoStop(BOOL *pbAutoStop)

Description

Gets the graph auto stopping state.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetInputVideoType(LM_FORMATTYPE *pVal)

Description

Gets the current input video format the filter accepts.

Parameters

pVal

A valid pointer to a variable that will receive the current input video format.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetInputVideoType(LM_FORMATTYPE newVal)

Description

Sets the input video format the filter accepts.

Parameters

newVal

The new input video format to accept.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetOutputVideoType(LM_FORMATTYPE *pVal)

Description

Gets the current output video format the filter accepts.

Parameters

pVal

A valid pointer to a variable that will receive the current output video format.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT SetOutputVideoType(LM_FORMATTYPE newVal)

Description

Sets the output video format the filter accepts.

Parameters

newVal

The new output video format to offer.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT IsLEADInputPinConnected()

Description

Determines whether the filter input pin is currently connected.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT IsLEADOutputPinConnected()

Description

Determines whether the filter output pin is currently connected.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

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

Description

Retrieves the current media dimensions.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

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

Description

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

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetIOBitCount(int *plInBits, int *plOutBits)

Description

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

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.
Help Version 22.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.