Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: webrtc/media/base/codec.h

Issue 2483173002: Negotiate H264 profiles in SDP (Closed)
Patch Set: Extract IsSameH264Profile and don't check payload type in FindMatchingCodec Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/common_video/h264/profile_level_id_unittest.cc ('k') | webrtc/media/base/codec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/codec.h
diff --git a/webrtc/media/base/codec.h b/webrtc/media/base/codec.h
index 3bd93a92472c3384f41f95205b67605405f09974..ca439a6e2fc546d8e7f6d8886074e021819db88d 100644
--- a/webrtc/media/base/codec.h
+++ b/webrtc/media/base/codec.h
@@ -24,8 +24,6 @@ namespace cricket {
typedef std::map<std::string, std::string> CodecParameterMap;
-extern const int kMaxPayloadId;
-
class FeedbackParam {
public:
FeedbackParam(const std::string& id, const std::string& param)
@@ -154,6 +152,11 @@ struct VideoCodec : public Codec {
VideoCodec(VideoCodec&& c);
virtual ~VideoCodec() = default;
+ // Indicates if this video codec is the same as the other video codec, e.g. if
+ // they are both VP8 or VP9, or if they are both H264 with the same H264
+ // profile. H264 levels however are not compared.
+ bool Matches(const VideoCodec& codec) const;
+
std::string ToString() const;
VideoCodec& operator=(const VideoCodec& c);
@@ -213,8 +216,11 @@ webrtc::VideoCodecType CodecTypeFromName(const std::string& name);
bool HasNack(const Codec& codec);
bool HasRemb(const Codec& codec);
bool HasTransportCc(const Codec& codec);
-bool IsCodecSupported(const std::vector<VideoCodec>& supported_codecs,
- const VideoCodec& codec);
+// Returns the first codec in |supported_codecs| that matches |codec|, or
+// nullptr if no codec matches.
+const VideoCodec* FindMatchingCodec(
+ const std::vector<VideoCodec>& supported_codecs,
+ const VideoCodec& codec);
} // namespace cricket
« no previous file with comments | « webrtc/common_video/h264/profile_level_id_unittest.cc ('k') | webrtc/media/base/codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698