CodecCallback
Overview
Related Modules:
Description:
Defines callbacks and their parameters.
Summary
Data Fields
| Variable Name | Description |
|---|---|
| OnEvent )(UINTPTR comp, UINTPTR appData, EventType event, uint32_t data1, uint32_t data2, UINTPTR eventData) | int( Reports an event. |
| InputBufferAvailable )(UINTPTR comp, UINTPTR appData, InputInfo inBuf) | int( Reports that the input data has been used. |
| OutputBufferAvailable )(UINTPTR comp, UINTPTR appData, OutputInfo outBuf) | int(* Reports that the output is complete. |
Details
Field Documentation
InputBufferAvailable
1. 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:
| Name | Description |
|---|---|
| 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
1. 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:
| Name | Description |
|---|---|
| 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
1. 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:
| Name | Description |
|---|---|
| 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.
