mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
Owner: machong
打印 prevThread nextThread

请问cusdk如何获取视频流

[copyURL]

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
owner
poston 2018-5-23 11:33 | 显示全部楼层
在打开会话传输成功后,BVCU_DialogParam 中的结构体有个 BVCU_Result (*afterDecode)(BVCU_HDialog hDialog, SAVCodec_Context* pCodec, SAV_Frame* pFrame); 回调,其中pFrame便是BVCU库解码后的码流,可通过该回调获取码流
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
sofa
poston 2018-5-23 11:40 | 显示全部楼层
machong post on2018-5-23 11:35
那afterDecode_TSP 或 afterDecode_GPS 什么区别啊?  解码视频是不是用 afterDecode_TSP

afterDecode_TSP 是接收串口数据流的回调,afterDecode_GPS 是接收GPS数据流的回调
他们本质上都是afterDecode()回调的重写,只不过MFC demo 重写了接收TSP流和GPS流的afterDecode回调,没有写接收音视频流的afterDecode回调
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
bench
poston 2018-5-23 16:08 | 显示全部楼层
machong post on2018-5-23 15:43
您好  请问SAV_Frame* pFrame->ppData[],其中ppData[0] ppData[1] ppData[2] ppData[3],分别保存的是什 ...

ppData[0]指向音视频数据,其中保存的是ffmpeg AVFrame 中extended_data数据的第0个值,iDataSize[0]则是该帧数据长度。具体参考头文件SAVCommon.h中SAV_Frame结构体说明。
/**
        * video:pointer to the picture planes and the stride of each plane line.
        * audio:pointer to the audio data and length.Only pData[0]/iDataSize[0] is used
        * data:pointer to the data and length.Only pData[0]/iDataSize[0] is used
        * - encode:set by user. The memory is allocated/freed by user.
        * - decode:set by library. Video:The memory is allocated/freed by library. Audio:The memory is allocated/freed by user
        */
        SAV_TYPE_UINT8* ppData[SAV_IMG_COMPONENT];
        SAV_TYPE_INT32 iDataSize[SAV_IMG_COMPONENT];
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
ground
poston 2018-5-24 09:58 | 显示全部楼层
machong post on2018-5-24 09:40
SAV_PIX_FMT_YUV420P,1920*1080,iDataSize[0]=1920,iDataSize[1]=960,iDataSize[2]=960;pFrame->ppD ...

您好,获取的视频流是否为SAV_PIX_FMT_YUV420P,可由 afterDecode 回调中的第二个参数SAVCodec_Context,中的SAV_VideoParam结构中的SAV_PixelFormat来确定,SAV_VideoParam中也有分辨率信息,先通过这个信息确定原始数据格式
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
5#
poston 2018-5-24 10:03 | 显示全部楼层
machong post on2018-5-24 10:01
sdk有64位的吗?>

64位有的。另外,对于视频流,SAV_Frame中的iDataSize是ffmpeg 中AVFrame 的linesize,即原始数据行数,不能算作帧数据大小
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
6#
poston 2018-5-24 10:55 | 显示全部楼层

libBVCU暂时不支持64位
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-5-15 18:31 , Processed in 0.061525 second(s), 18 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList