初步完成H264 的 RTMP打包解包

This commit is contained in:
xiongziliang
2018-10-24 12:01:40 +08:00
parent 3850ecec96
commit 6c9d50b04b
11 changed files with 404 additions and 17 deletions

View File

@@ -188,6 +188,11 @@ public:
const static int channel[] = { 1, 2 };
return channel[flvStereoOrMono];
}
/**
* 返回不带0x00 00 00 01头的sps
* @return
*/
string getH264SPS() const {
string ret;
if (getMediaType() != 7) {
@@ -210,6 +215,11 @@ public:
ret.assign(strBuf.data() + 13, sps_size);
return ret;
}
/**
* 返回不带0x00 00 00 01头的pps
* @return
*/
string getH264PPS() const {
string ret;
if (getMediaType() != 7) {
@@ -258,4 +268,8 @@ public:
}
};
#endif