From 467a185a7a7bcad3967b3530b229c0ffa5b89d4b Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Tue, 3 Mar 2015 23:46:16 -0500 Subject: [PATCH] Bug 1137472: test vp9 sdp in sdp_unittests r=bwc --- media/webrtc/signaling/test/sdp_unittests.cpp | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/media/webrtc/signaling/test/sdp_unittests.cpp b/media/webrtc/signaling/test/sdp_unittests.cpp index 7f9d1a5a9a2..2014d04edca 100644 --- a/media/webrtc/signaling/test/sdp_unittests.cpp +++ b/media/webrtc/signaling/test/sdp_unittests.cpp @@ -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 =