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}
diff --git a/media/base/codec.cc b/media/base/codec.cc
index e95517d..168e7a7 100644
--- a/media/base/codec.cc
+++ b/media/base/codec.cc
@@ -294,7 +294,7 @@
 }
 
 bool VideoCodec::operator==(const VideoCodec& c) const {
-  return Codec::operator==(c);
+  return Codec::operator==(c) && packetization == c.packetization;
 }
 
 bool VideoCodec::Matches(const VideoCodec& other) const {
@@ -302,6 +302,15 @@
          IsSameCodecSpecific(name, params, other.name, other.params);
 }
 
+absl::optional<std::string> VideoCodec::IntersectPacketization(
+    const VideoCodec& local_codec,
+    const VideoCodec& remote_codec) {
+  if (local_codec.packetization == remote_codec.packetization) {
+    return local_codec.packetization;
+  }
+  return absl::nullopt;
+}
+
 VideoCodec VideoCodec::CreateRtxCodec(int rtx_payload_type,
                                       int associated_payload_type) {
   VideoCodec rtx_codec(rtx_payload_type, kRtxCodecName);