VideoEncodeCallBack
Function
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
typedef APP_ERROR (*VideoEncodeCallBack)(std::shared_ptr<uint8_t>& outDataPtr, uint32_t& outDataSize,
uint32_t& channelId, uint32_t& frameId, void* userData);
Parameter Description
Parameter |
Description |
|---|---|
outDataPtr |
Output memory address for storing encoded video frame data |
outDataSize |
Output memory size for storing encoded video frame data |
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: Data Structure