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

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

Issue 1845673002: Removing `preference` field from `cricket::Codec`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing sort order (got reversed when optimizations were made) Created 4 years, 8 months 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/api/webrtcsession_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 7476c026942761d48a4fd0172b24331a0e6931e7..c79a3fafc8f754cd9f1ce3f3e708b095155eb316 100644
--- a/webrtc/media/base/codec.h
+++ b/webrtc/media/base/codec.h
@@ -64,12 +64,11 @@ struct Codec {
int id;
std::string name;
int clockrate;
- int preference;
CodecParameterMap params;
FeedbackParams feedback_params;
// Creates a codec with the given parameters.
- Codec(int id, const std::string& name, int clockrate, int preference);
+ Codec(int id, const std::string& name, int clockrate);
// Creates an empty codec.
Codec();
Codec(const Codec& c);
@@ -92,10 +91,6 @@ struct Codec {
bool HasFeedbackParam(const FeedbackParam& param) const;
void AddFeedbackParam(const FeedbackParam& param);
- static bool Preferable(const Codec& first, const Codec& other) {
- return first.preference > other.preference;
- }
-
// Filter |this| feedbacks params such that only those shared by both |this|
// and |other| are kept.
void IntersectFeedbackParams(const Codec& other);
@@ -118,8 +113,7 @@ struct AudioCodec : public Codec {
const std::string& name,
int clockrate,
int bitrate,
- size_t channels,
- int preference);
+ size_t channels);
// Creates an empty codec.
AudioCodec();
AudioCodec(const AudioCodec& c);
@@ -128,10 +122,6 @@ struct AudioCodec : public Codec {
// Indicates if this codec is compatible with the specified codec.
bool Matches(const AudioCodec& codec) const;
- static bool Preferable(const AudioCodec& first, const AudioCodec& other) {
- return first.preference > other.preference;
- }
-
std::string ToString() const;
AudioCodec& operator=(const AudioCodec& c);
@@ -153,18 +143,13 @@ struct VideoCodec : public Codec {
const std::string& name,
int width,
int height,
- int framerate,
- int preference);
+ int framerate);
VideoCodec(int id, const std::string& name);
// Creates an empty codec.
VideoCodec();
VideoCodec(const VideoCodec& c);
~VideoCodec() = default;
- static bool Preferable(const VideoCodec& first, const VideoCodec& other) {
- return first.preference > other.preference;
- }
-
std::string ToString() const;
VideoCodec& operator=(const VideoCodec& c);
@@ -193,7 +178,7 @@ struct VideoCodec : public Codec {
};
struct DataCodec : public Codec {
- DataCodec(int id, const std::string& name, int preference);
+ DataCodec(int id, const std::string& name);
DataCodec();
DataCodec(const DataCodec& c);
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/media/base/codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698