VideoEncodeCallBack
Description
Defines the input callback function for video encoding.
Use the user-defined userData to receive the video encoding callback result, and do not perform complex operations in the callback function. Otherwise, the callback thread is suspended and the video encoding speed becomes slow.
Structure Definition
1 2 | typedef APP_ERROR (*VideoEncodeCallBack)(std::shared_ptr<uint8_t>& outDataPtr, uint32_t& outDataSize, uint32_t& channelId, uint32_t& frameId, void* userData); |
Parameters
Parameter |
Description |
|---|---|
outDataPtr |
Memory address for storing the output video frame data after encoding. |
outDataSize |
Memory size of the output video frame data after encoding. |
channelId |
Video stream index, which is set by the constructor of the VideoEncoder class. |
frameId |
Video frame index, which is set by the Encode function of the VideoEncoder class. |
userData |
Input data type of the user-defined callback function, which is used to obtain the encoded data. |
Parent topic: General Data Structures