CodecCallback
Overview
Related Modules:
Description:
Defines callbacks and their parameters.
Summary
Data Fields
OnEvent )(UINTPTR comp, UINTPTR appData, EventType event, uint32_t data1, uint32_t data2, UINTPTR eventData) |
|
InputBufferAvailable )(UINTPTR comp, UINTPTR appData, InputInfo inBuf) |
|
OutputBufferAvailable )(UINTPTR comp, UINTPTR appData, OutputInfo outBuf) |
Details
Field Documentation
InputBufferAvailable
int(* CodecCallback::InputBufferAvailable) ([UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [InputInfo]($api-api-SmartVision-Devices-InputInfo.md) *inBuf)
Description:
Reports that the input data has been used.
This callback is invoked in asynchronous mode.
Parameters:
hComponent | Indicates the handle of the codec component. |
pAppData | Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is set. |
pBuffer | Indicates the pointer to the input data that has been used. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
OnEvent
int(* CodecCallback::OnEvent) ([UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [EventType]($api-api-SmartVision-Devices-Codec.md#ga2628ea8d12e8b2563c32f05dc7fff6fa) event, uint32_t data1, uint32_t data2, [UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) eventData)
Description:
Reports an event.
Reports event errors and output format changes.
Parameters:
hComponent | Indicates the handle of the codec component. |
pAppData | Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is set. |
EVENTTYPE | Indicates the event type. |
nData1 | Indicates the first value contained in the reported event. This parameter is optional. |
nData2 | Indicates the second value contained in the reported event. This parameter is optional. |
pEventData | Indicates the pointer to data contained in the reported event. This parameter is optional. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.
OutputBufferAvailable
int(* CodecCallback::OutputBufferAvailable) ([UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR]($api-api-SmartVision-Devices-Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [OutputInfo]($api-api-SmartVision-Devices-OutputInfo.md) *outBuf)
Description:
Reports that the output is complete.
This callback is invoked in asynchronous mode.
Parameters:
hComponent | Indicates the handle of the codec component. |
pAppData | Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is registered. |
pBuffer | Indicates the pointer to the output data that has been generated. |
Returns:
Returns 0 if the operation is successful; returns a non-zero value otherwise.