DjiPayloadCamera_SendVideoStream()接口如何使用?
已完成使用DjiPayloadCamera_SendVideoStream()传输视频流失败,视频流大小和数据都存在,但报错如下:
encode 1 frame.
outPkt->size 67511.
[92.920][utils]-[Error]-[DjiFlowController_TryPutDataToBuffer:793) put data to buffer error: 0x00000102.
[92.920][utils]-[Error]-[DjiFlowController_SendData:358) try to put data to buffer error: 0x00000102.
[92.920][channel]-[Error]-[DjiHighSpeedDataChannel_SendVideoStreamData:613) Send video stream error: 0x00000102.
[92.920][utils]-[Error]-[DjiFlowController_TryPutDataToBuffer:793) put data to buffer error: 0x00000102.
[92.920][utils]-[Error]-[DjiFlowController_SendData:358) try to put data to buffer error: 0x00000102.
[92.920][channel]-[Error]-[DjiHighSpeedDataChannel_SendVideoStreamData:613) Send video stream error: 0x00000102.
具体代码如下:
int lengthOfDataHaveBeenSent = 0;
while (dataLength - lengthOfDataHaveBeenSent)
{ // 如果发送完成一帧
uint16_t lengthOfDataToBeSent = USER_UTIL_MIN(60000, dataLength - lengthOfDataHaveBeenSent);
DjiPayloadCamera_SendVideoStream((const uint8_t *)outPkt->data + lengthOfDataHaveBeenSent, lengthOfDataToBeSent); // 发送一帧
lengthOfDataHaveBeenSent += lengthOfDataToBeSent; // 发送的大小
}
请先登录再写评论。
评论
3 条评论