RFC 3984 sprop-parameter-sets SDP unit test
BUG=webrtc:5948 Review-Url: https://codereview.webrtc.org/2023913002 Cr-Commit-Position: refs/heads/master@{#13026}
This commit is contained in:
@ -2915,6 +2915,42 @@ TEST_F(WebRtcSdpTest, DeserializeVideoFmtp) {
|
||||
EXPECT_EQ(found->second, "40");
|
||||
}
|
||||
|
||||
TEST_F(WebRtcSdpTest, DeserializeVideoFmtpWithSprops) {
|
||||
JsepSessionDescription jdesc_output(kDummyString);
|
||||
|
||||
const char kSdpWithFmtpString[] =
|
||||
"v=0\r\n"
|
||||
"o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n"
|
||||
"s=-\r\n"
|
||||
"t=0 0\r\n"
|
||||
"m=video 49170 RTP/AVP 98\r\n"
|
||||
"a=rtpmap:98 H264/90000\r\n"
|
||||
"a=fmtp:98 profile-level-id=42A01E; "
|
||||
"sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==\r\n";
|
||||
|
||||
// Deserialize.
|
||||
SdpParseError error;
|
||||
EXPECT_TRUE(
|
||||
webrtc::SdpDeserialize(kSdpWithFmtpString, &jdesc_output, &error));
|
||||
|
||||
const ContentInfo* vc = GetFirstVideoContent(jdesc_output.description());
|
||||
ASSERT_TRUE(vc != NULL);
|
||||
const VideoContentDescription* vcd =
|
||||
static_cast<const VideoContentDescription*>(vc->description);
|
||||
ASSERT_TRUE(vcd != NULL);
|
||||
ASSERT_FALSE(vcd->codecs().empty());
|
||||
cricket::VideoCodec h264 = vcd->codecs()[0];
|
||||
EXPECT_EQ("H264", h264.name);
|
||||
EXPECT_EQ(98, h264.id);
|
||||
cricket::CodecParameterMap::const_iterator found =
|
||||
h264.params.find("profile-level-id");
|
||||
ASSERT_TRUE(found != h264.params.end());
|
||||
EXPECT_EQ(found->second, "42A01E");
|
||||
found = h264.params.find("sprop-parameter-sets");
|
||||
ASSERT_TRUE(found != h264.params.end());
|
||||
EXPECT_EQ(found->second, "Z0IACpZTBYmI,aMljiA==");
|
||||
}
|
||||
|
||||
TEST_F(WebRtcSdpTest, DeserializeVideoFmtpWithSpace) {
|
||||
JsepSessionDescription jdesc_output(kDummyString);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user