Add support for enabling and negotiating raw RTP packetization.

Raw RTP packetization is done using the existing RtpPacketizerGeneric
without adding the generic payload header. It is intended to be used
together with generic frame descriptor RTP header extension.

Bug: webrtc:10625
Change-Id: I2e3d0a766e4933ddc4ad4abc1449b9b91ba6cd35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138061
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28154}
This commit is contained in:
Mirta Dvornicic
2019-06-04 15:38:50 +02:00
committed by Commit Bot
parent 961407f5e8
commit 479a3c0f92
18 changed files with 609 additions and 3 deletions

View File

@ -174,6 +174,29 @@ TEST(CodecTest, TestVideoCodecOperators) {
EXPECT_TRUE(c13 == c10);
}
TEST(CodecTest, TestVideoCodecIntersectPacketization) {
VideoCodec c1;
c1.packetization = "raw";
VideoCodec c2;
c2.packetization = "raw";
VideoCodec c3;
EXPECT_EQ(VideoCodec::IntersectPacketization(c1, c2), "raw");
EXPECT_EQ(VideoCodec::IntersectPacketization(c1, c3), absl::nullopt);
}
TEST(CodecTest, TestVideoCodecEqualsWithDifferentPacketization) {
VideoCodec c0(100, cricket::kVp8CodecName);
VideoCodec c1(100, cricket::kVp8CodecName);
VideoCodec c2(100, cricket::kVp8CodecName);
c2.packetization = "raw";
EXPECT_EQ(c0, c1);
EXPECT_NE(c0, c2);
EXPECT_NE(c2, c0);
EXPECT_EQ(c2, c2);
}
TEST(CodecTest, TestVideoCodecMatches) {
// Test a codec with a static payload type.
VideoCodec c0(95, "V");
@ -190,6 +213,15 @@ TEST(CodecTest, TestVideoCodecMatches) {
EXPECT_FALSE(c1.Matches(VideoCodec(95, "V")));
}
TEST(CodecTest, TestVideoCodecMatchesWithDifferentPacketization) {
VideoCodec c0(100, cricket::kVp8CodecName);
VideoCodec c1(101, cricket::kVp8CodecName);
c1.packetization = "raw";
EXPECT_TRUE(c0.Matches(c1));
EXPECT_TRUE(c1.Matches(c0));
}
// VP9 codecs compare profile information.
TEST(CodecTest, TestVP9CodecMatches) {
const char kProfile0[] = "0";