Move functionality from AudioCodec and VideoCodec into cricket::Codec
Part 1 of the migration towards merging the types.
Any method that could belong to the Codec type was moved, the others
are deprecated.
Alternatives to the AudioCodec and VideoCodec constructors are introduced
to allow creating objects of an indefinite type without having to
reference the old classes.
Bug: webrtc:15214
Change-Id: I20e1aa32962821cad98e9a92c2ec86f8f75e5dd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40213}
diff --git a/pc/peer_connection_media_unittest.cc b/pc/peer_connection_media_unittest.cc
index 7ed47db..c454536 100644
--- a/pc/peer_connection_media_unittest.cc
+++ b/pc/peer_connection_media_unittest.cc
@@ -613,7 +613,7 @@
auto* offer_description =
cricket::GetFirstVideoContentDescription(offer->description());
for (const auto& codec : offer_description->codecs()) {
- if (codec.GetCodecType() == cricket::VideoCodec::CODEC_VIDEO) {
+ if (codec.IsMediaCodec()) {
EXPECT_EQ(codec.packetization, cricket::kPacketizationParamRaw);
}
}
@@ -624,7 +624,7 @@
auto* answer_description =
cricket::GetFirstVideoContentDescription(answer->description());
for (const auto& codec : answer_description->codecs()) {
- if (codec.GetCodecType() == cricket::VideoCodec::CODEC_VIDEO) {
+ if (codec.IsMediaCodec()) {
EXPECT_EQ(codec.packetization, cricket::kPacketizationParamRaw);
}
}