定义视频流解码使用的结构体。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | struct VdecConfig { uint32_t width = 0; uint32_t height = 0; MxbaseStreamFormat inputVideoFormat = MXBASE_STREAM_FORMAT_H264_MAIN_LEVEL; MxbasePixelFormat outputImageFormat = MXBASE_PIXEL_FORMAT_YUV_SEMIPLANAR_420; uint32_t channelId = 0; uint32_t deviceId = 0; pthread_t threadId = 0; DecodeCallBackFunction callbackFunc = nullptr; uint32_t outMode = 0; uint32_t videoChannel = 0; uint32_t skipInterval = 0; uint32_t cscMatrix = 0; void* userData = nullptr; }; |
参数名 |
输入/输出 |
说明 |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
width |
输入 |
图像的宽度。 |
||||||||||||
height |
输入 |
图像的高度。 |
||||||||||||
inputVideoFormat |
输入 |
输入图像的格式。 |
||||||||||||
outputImageFormat |
输入 |
输出图像的格式。 |
||||||||||||
channelId |
输入 |
解码的通道编号。 |
||||||||||||
deviceId |
输入 |
设备编号。 |
||||||||||||
threadId |
输入 |
回调线程编号。 |
||||||||||||
callbackFunc |
输入 |
回调函数。 结构为: APP_ERROR (*DecodeCallBackFunction)(std::shared_ptr<void> buffer, DvppDataInfo& dvppDataInfo, void* userData)
|
||||||||||||
outMode |
输入 |
选择出帧模式。默认值为“0”,可取值为“0”或“1”。
|
||||||||||||
videoChannel |
输入 |
预留参数。 |
||||||||||||
skipInterval |
输入 |
跳帧参数。 |
||||||||||||
cscMatrix |
输入 |
色域转换选项。当前仅支持
|
||||||||||||
userData |
输入 |
用户自定义数据。 |