From 971f8de35a13c27b967151c28ae4e737a773a26a Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Wed, 25 Oct 2023 14:31:03 +0200 Subject: [PATCH] Remove MediaContentDescriptionImpl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit after dependencies adopted the RtpMediaContentDescription which this is currently aliased to. Also move definition of AudioCodecs and VideoCodecs to the place where codecs are defined. BUG=webrtc:15214 Change-Id: I9b0456e1c69c8b23e0cc7665a59baae268872d9c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325021 Reviewed-by: Henrik Boström Commit-Queue: Philipp Hancke Reviewed-by: Florent Castelli Cr-Commit-Position: refs/heads/main@{#41020} --- media/base/codec.h | 5 ++++- pc/session_description.h | 15 ++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/media/base/codec.h b/media/base/codec.h index 036a1722a6..228acad07a 100644 --- a/media/base/codec.h +++ b/media/base/codec.h @@ -28,7 +28,7 @@ namespace cricket { -typedef std::map CodecParameterMap; +using CodecParameterMap = std::map; class FeedbackParam { public: @@ -187,6 +187,9 @@ struct RTC_EXPORT Codec { using VideoCodec = Codec; using AudioCodec = Codec; +using VideoCodecs = std::vector; +using AudioCodecs = std::vector; + Codec CreateAudioCodec(int id, const std::string& name, int clockrate, diff --git a/pc/session_description.h b/pc/session_description.h index 044fccf9c0..403e46529f 100644 --- a/pc/session_description.h +++ b/pc/session_description.h @@ -43,10 +43,8 @@ namespace cricket { -typedef std::vector AudioCodecs; -typedef std::vector VideoCodecs; -typedef std::vector CryptoParamsVec; -typedef std::vector RtpHeaderExtensions; +using CryptoParamsVec = std::vector; +using RtpHeaderExtensions = std::vector; // Options to control how session descriptions are generated. const int kAutoBandwidth = -1; @@ -258,8 +256,9 @@ class MediaContentDescription { } protected: - // TODO(bugs.webrtc.org/15214): move all RTP related things to a subclass that - // the SCTP content description does not inherit from. + // TODO(bugs.webrtc.org/15214): move all RTP related things to + // RtpMediaDescription that the SCTP content description does + // not inherit from. std::string protocol_; private: @@ -290,9 +289,7 @@ class MediaContentDescription { std::vector codecs_; }; -template -class MediaContentDescriptionImpl : public MediaContentDescription {}; -using RtpMediaContentDescription = MediaContentDescriptionImpl; +class RtpMediaContentDescription : public MediaContentDescription {}; class AudioContentDescription : public RtpMediaContentDescription { public: