Bug 1137472: test vp9 sdp in sdp_unittests r=bwc

This commit is contained in:
Randell Jesup 2015-03-03 23:46:16 -05:00
parent 4bf829e3b1
commit 467a185a7a

View File

@ -1161,15 +1161,20 @@ const std::string kBasicAudioVideoOffer =
"a=candidate:0 2 UDP 2130379006 10.0.0.36 55428 typ host" CRLF
"a=end-of-candidates" CRLF
"a=ssrc:5150" CRLF
"m=video 9 RTP/SAVPF 120" CRLF
"m=video 9 RTP/SAVPF 120 121" CRLF
"c=IN IP6 ::1" CRLF
"a=mid:second" CRLF
"a=rtpmap:120 VP8/90000" CRLF
"a=fmtp:120 max-fs=3600;max-fr=30" CRLF
"a=rtpmap:121 VP9/90000" CRLF
"a=fmtp:121 max-fs=3600;max-fr=30" CRLF
"a=recvonly" CRLF
"a=rtcp-fb:120 nack" CRLF
"a=rtcp-fb:120 nack pli" CRLF
"a=rtcp-fb:120 ccm fir" CRLF
"a=rtcp-fb:121 nack" CRLF
"a=rtcp-fb:121 nack pli" CRLF
"a=rtcp-fb:121 ccm fir" CRLF
"a=setup:active" CRLF
"a=rtcp-mux" CRLF
"a=msid:streama tracka" CRLF
@ -1309,8 +1314,9 @@ TEST_P(NewSdpTest, CheckMlines) {
mSdp->GetMediaSection(1).GetProtocol())
<< "Wrong protocol for video";
auto video_formats = mSdp->GetMediaSection(1).GetFormats();
ASSERT_EQ(1U, video_formats.size()) << "Wrong number of formats for video";
ASSERT_EQ(2U, video_formats.size()) << "Wrong number of formats for video";
ASSERT_EQ("120", video_formats[0]);
ASSERT_EQ("121", video_formats[1]);
ASSERT_EQ(SdpMediaSection::kAudio, mSdp->GetMediaSection(2).GetMediaType())
<< "Wrong type for third media section";
@ -1408,14 +1414,23 @@ TEST_P(NewSdpTest, CheckRtpmap) {
audiosec.GetFormats()[4],
rtpmap);
const SdpMediaSection& videosec = mSdp->GetMediaSection(1);
const SdpMediaSection& videosec1 = mSdp->GetMediaSection(1);
CheckRtpmap("120",
SdpRtpmapAttributeList::kVP8,
"VP8",
90000,
0,
videosec.GetFormats()[0],
videosec.GetAttributeList().GetRtpmap());
videosec1.GetFormats()[0],
videosec1.GetAttributeList().GetRtpmap());
const SdpMediaSection& videosec2 = mSdp->GetMediaSection(1);
CheckRtpmap("121",
SdpRtpmapAttributeList::kVP9,
"VP9",
90000,
0,
videosec2.GetFormats()[1],
videosec2.GetAttributeList().GetRtpmap());
}
const std::string kH264AudioVideoOffer =