ILMVUserCallback Interface

The ILMVUserCallback interface is a user-defined interface. It must be registered by calling the put_ReceiveProcObj method of the ILMVCallback interface. This interface has one method.

Interface Methods:

HRESULT ReceiveProc (BYTE *pData, long lWidth, long lHeight, long lBitCount, long lSize, bool bTopDown)

Parameters

pData

a valid pointer to the frame data.

lWidth

width of the frame

lHeight

height of the frame

lBitCount

bits per pixel of the frame

lSize

size of the frame buffer, in bytes

bTopDown

indicates whether the image in the passed buffer (pData) is top-down (TRUE) or bottom-up (FALSE).

Description

This method is called for each frame received by the Video Callback Filter.

Return

After working on the frame data, this function can return one of the following values:

Value

Meaning

VDCALBK_ERR_OK

Success. the filter will continue normally be delivering the processed frame.

VDCALBK_ERR_DROP

Instructs the filter not to deliver the frame. The filter will drop the frame and continue normally with the next frame in the stream.

VDCALBK_ERR_DELIVERLASTFRAME

instructs the filter to deliver the previous frame--the last one delivered. The filter saves the last frame it delivers downstream in case the user wants to deliver the same frame more than once.

 

HRESULT ReceiveProc (long pData, long lWidth, long lHeight, long lBitCount, long lSize, long bTopDown)

Parameters

pData

a valid pointer to the frame data, passed in a long variable.

lWidth

width of the frame

lHeight

height of the frame

lBitCount

bits per pixel of the frame

lSize

size of the frame buffer, in bytes

bTopDown

indicates whether the image in the passed buffer (pData) is top-down (1) or bottom-up (0).

Description

This method is called for each frame received by the Video Callback Filter. The user can do any effect over the frames by making changes on the frame's data.

Return

After working on the frame data, this function can return one of the following values:

Value

Meaning

VDCALBK_ERR_OK

Success. the filter will continue normally be delivering the processed frame.

VDCALBK_ERR_DROP

Instructs the filter not to deliver the frame. The filter will drop the frame and continue normally with the next frame in the stream.

VDCALBK_ERR_DELIVERLASTFRAME

Instructs the filter to deliver the previous frame--the last one delivered. The filter saves the last frame it delivers downstream in case the user wants to deliver the same frame more than once.