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

Unified Diff: webrtc/api/rtpparameters.h

Issue 1885473004: Adding codecs to the RtpParameters returned by an RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Responding to review comments. 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
Index: webrtc/api/rtpparameters.h
diff --git a/webrtc/api/rtpparameters.h b/webrtc/api/rtpparameters.h
index 2c29d9843d9ee597c81e313e2476f05344065b40..729f841ab65c2bb51eeacd02910fbd61b16ef2a4 100644
--- a/webrtc/api/rtpparameters.h
+++ b/webrtc/api/rtpparameters.h
@@ -11,6 +11,7 @@
#ifndef WEBRTC_API_RTPPARAMETERS_H_
#define WEBRTC_API_RTPPARAMETERS_H_
+#include <string>
#include <vector>
namespace webrtc {
@@ -20,10 +21,32 @@ namespace webrtc {
struct RtpEncodingParameters {
bool active = true;
int max_bitrate_bps = -1;
+
+ bool operator==(const RtpEncodingParameters& o) const {
+ return active == o.active && max_bitrate_bps == o.max_bitrate_bps;
+ }
+};
+
+struct RtpCodecParameters {
+ int payload_type;
+ std::string mime_type;
+ int clock_rate;
+ int channels = 1;
+ // TODO(deadbeef): Add sdpFmtpLine field.
+
+ bool operator==(const RtpCodecParameters& o) const {
+ return payload_type == o.payload_type && mime_type == o.mime_type &&
+ clock_rate == o.clock_rate && channels == o.channels;
+ }
};
struct RtpParameters {
std::vector<RtpEncodingParameters> encodings;
+ std::vector<RtpCodecParameters> codecs;
+
+ bool operator==(const RtpParameters& o) const {
+ return encodings == o.encodings && codecs == o.codecs;
+ }
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698