mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 3165|reply: 22
打印 prevThread nextThread

请问cusdk如何获取视频流

[copyURL]

3

主题

78

帖子

219

积分

midMem

Rank: 3Rank: 3

积分
219
jumpTo
owner
poston 2018-5-23 11:26 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
如题,请问sdk是否可以获取视频流?  demo种播放视频,是直接调用的Browse函数,里面没有获取流的方法   还有afterDecode_TSP 或 afterDecode_GPS有什么区别
reply

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

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

使用道具 report

3

主题

78

帖子

219

积分

midMem

Rank: 3Rank: 3

积分
219
bench
 Owner| poston 2018-5-23 11:35 | authorOnly
Mitarai post on2018-5-23 11:33
在打开会话传输成功后,BVCU_DialogParam 中的结构体有个 BVCU_Result (*afterDecode)(BVCU_HDialog hDialo ...

那afterDecode_TSP 或 afterDecode_GPS 什么区别啊?  解码视频是不是用 afterDecode_TSP
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
ground
poston 2018-5-23 11:40 | authorOnly
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

3

主题

78

帖子

219

积分

midMem

Rank: 3Rank: 3

积分
219
5#
 Owner| poston 2018-5-23 12:07 | authorOnly
Mitarai post on2018-5-23 11:40
afterDecode_TSP 是接收串口数据流的回调,afterDecode_GPS 是接收GPS数据流的回调
他们本质上都是after ...

那接收音视频流是要自己去重写afterDecode()对吗?
reply agree Against

使用道具 report

10

主题

531

帖子

2429

积分

admin

Rank: 9Rank: 9Rank: 9

积分
2429
6#
poston 2018-5-23 12:16 | authorOnly
是的,参考模仿着写下即可。
reply agree Against

使用道具 report

3

主题

78

帖子

219

积分

midMem

Rank: 3Rank: 3

积分
219
7#
 Owner| poston 2018-5-23 15:43 | authorOnly
admin post on2018-5-23 12:16
是的,参考模仿着写下即可。

您好  请问SAV_Frame* pFrame->ppData[],其中ppData[0] ppData[1] ppData[2] ppData[3],分别保存的是什么数据?还有  对应的iDataSize[]是什么含义?
reply agree Against

使用道具 report

2

主题

96

帖子

472

积分

midMem

Rank: 3Rank: 3

积分
472
8#
poston 2018-5-23 16:08 | authorOnly
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

3

主题

78

帖子

219

积分

midMem

Rank: 3Rank: 3

积分
219
9#
 Owner| poston 2018-5-23 18:44 | authorOnly
Mitarai post on2018-5-23 16:08
ppData[0]指向音视频数据,其中保存的是ffmpeg AVFrame 中extended_data数据的第0个值,iDataSize[0]则是 ...

我在回调函数中返回的SAV_Frame* pFrame中其数据格式为SAV_PIX_FMT_YUV420P,1920*1080,iDataSize[0]=1920,iDataSize[1]=960,iDataSize[2]=960;pFrame->ppData[0]中存的Y分量,ppData[1]和ppData[2]分别存的UV分量是这样吗?但如果是这样,数据大小又不对,因为YUV420P格式中u和v分量大小应该是1920/4=480才对。
reply agree Against

使用道具 report

10

主题

531

帖子

2429

积分

admin

Rank: 9Rank: 9Rank: 9

积分
2429
10#
poston 2018-5-23 21:57 | authorOnly
可自己动手分析下
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-4-19 15:03 , Processed in 0.067386 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList