FVID2 callback parameters that are setup during Fvid2_create().
FVID2 supports the driver call back. Driver call the application on specific events like, completion of buffer capture, displayed or process. Or in case of error where application needs to take some action. Following is the structure defined by the FVID2 API for the application to pass the callback functions to be invoked by the driver.
Data Fields | |
Fvid2_CbFxn | cbFxn |
Fvid2_ErrCbFxn | errCbFxn |
void * | errList |
void * | appData |
Fvid2_CbFxn Fvid2_CbParams::cbFxn |
Application callback function used by the driver to intimate any operation has completed or not. This is an optional parameter in case application decides to use polling method and so could be set to NULL.
Fvid2_ErrCbFxn Fvid2_CbParams::errCbFxn |
Application error callback function used by the driver to intimate any error occurs at the time of streaming. This is an optional parameter in case application decides not to get any error callback and so could be set to NULL.
void* Fvid2_CbParams::errList |
Pointer to a valid Fvid2_FrameList in case of capture and display drivers or a pointer to a valid Fvid2_ProcessList in case of M2M drivers where the driver copies the aborted/error packet. The memory of this list should be allocated by the application and provided to the driver at the time of driver creation. When the application gets this callback, it has to empty this list and taken necessary action like freeing up memories etc. The driver will then reuse the same list for future error callback. This could be NULL if errCbFxn is NULL. Otherwise this should be non-NULL.
void* Fvid2_CbParams::appData |
Application specific data which is returned in the callback function as it is. This could be set to NULL if not used.