Commit 8b2bd588 by xiongziliang

sdp中添加vps

parent c9950dda
...@@ -58,7 +58,7 @@ Sdp::Ptr Factory::getSdpByTrack(const Track::Ptr &track) { ...@@ -58,7 +58,7 @@ Sdp::Ptr Factory::getSdpByTrack(const Track::Ptr &track) {
WarnL << "该Track未准备好"; WarnL << "该Track未准备好";
return nullptr; return nullptr;
} }
return std::make_shared<H265Sdp>(h265Track->getSps(),h265Track->getPps()); return std::make_shared<H265Sdp>(h265Track->getVps(),h265Track->getSps(),h265Track->getPps());
} }
case CodecAAC:{ case CodecAAC:{
......
...@@ -358,7 +358,8 @@ public: ...@@ -358,7 +358,8 @@ public:
* @param playload_type rtp playload type 默认96 * @param playload_type rtp playload type 默认96
* @param bitrate 比特率 * @param bitrate 比特率
*/ */
H265Sdp(const string &strSPS, H265Sdp(const string &strVPS,
const string &strSPS,
const string &strPPS, const string &strPPS,
int playload_type = 96, int playload_type = 96,
int bitrate = 4000) : Sdp(90000,playload_type) { int bitrate = 4000) : Sdp(90000,playload_type) {
...@@ -366,7 +367,10 @@ public: ...@@ -366,7 +367,10 @@ public:
_printer << "m=video 0 RTP/AVP " << playload_type << "\r\n"; _printer << "m=video 0 RTP/AVP " << playload_type << "\r\n";
_printer << "b=AS:" << bitrate << "\r\n"; _printer << "b=AS:" << bitrate << "\r\n";
_printer << "a=rtpmap:" << playload_type << " H265/" << 90000 << "\r\n"; _printer << "a=rtpmap:" << playload_type << " H265/" << 90000 << "\r\n";
_printer << "a=fmtp:" << playload_type << " sprop-sps="; _printer << "a=fmtp:" << playload_type << " ";
_printer << "sprop-vps=";
_printer << encodeBase64(strVPS) << "; ";
_printer << "sprop-sps=";
_printer << encodeBase64(strSPS) << "; "; _printer << encodeBase64(strSPS) << "; ";
_printer << "sprop-pps="; _printer << "sprop-pps=";
_printer << encodeBase64(strPPS) << "\r\n"; _printer << encodeBase64(strPPS) << "\r\n";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论