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. |
typedef enum
{
USEUPPERBITS = 1,
USELOWERBITS,
USEFULLRANGE,
NOCHANGE,
} USEDBITS;
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.
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. |
Sets the current media input type.
S_OK if successful, S_FALSE other wise.
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. |
Retrieves the current media input type.
S_OK if successful, S_FALSE otherwise.
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. |
Sets the current media output type.
S_OK if successful, S_FALSE otherwise.
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. |
Retrieves the current media output type.
S_OK if successful, S_FALSE otherwise.
bRGBOrder |
TRUE to switch to RGB mode, FALSE to switch to BGR mode. |
Sets the RGB channels order, either RGB (TRUE) or BGR (FALSE).
S_OK if successful, S_FALSE otherwise.
*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. |
Gets the RGB channel order, either RGB (TRUE) or BGR (FALSE)..
S_OK if successful, S_FALSE otherwise.
UsedBit |
an integer variable that contains the bit usage option. Possible values are: USEUPPERBITS, USELOWERBITS, USEFULLRANGE, Or NOCHANGE. |
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.
S_OK if successful, S_FALSE otherwise.
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 |
Retrieves the currently used bits.
S_OK if successful, S_FALSE otherwise.
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. |
Sets the graph auto stopping state.
S_OK if successful, S_FALSE otherwise.
*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. |
Gets the graph auto stopping state.
S_OK if successful, S_FALSE otherwise.
*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. |
Gets the current input video format the filter accepts.
S_OK if successful, S_FALSE otherwise.
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. |
Sets the input video format the filter accepts.
S_OK if successful, S_FALSE otherwise.
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. |
Gets the current output video format the filter accepts.
S_OK if successful, S_FALSE otherwise.
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. |
Sets the output video format the filter accepts.
S_OK if successful, S_FALSE otherwise.
None.
Determines whether the filter input pin is currently connected.
S_OK if connected, S_FALSE otherwise.
None.
Determines whether the filter output pin is currently connected.
S_OK if connected, S_FALSE otherwise.
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. |
Retrieves the current media dimensions.
S_OK if successful, S_FALSE otherwise.
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. |
Gets the current media types of the filters input and output pins.
S_OK if successful, S_FALSE otherwise.
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. |
Gets the bits per pixel of the current connected input and output media formats.
S_OK if successful, S_FALSE otherwise.