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

Side by Side Diff: webrtc/api/rtpparameters.h

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: objc compile errors Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/mediastreamprovider.h ('k') | webrtc/api/rtpreceiver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_API_RTPPARAMETERS_H_ 11 #ifndef WEBRTC_API_RTPPARAMETERS_H_
12 #define WEBRTC_API_RTPPARAMETERS_H_ 12 #define WEBRTC_API_RTPPARAMETERS_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 namespace webrtc { 17 namespace webrtc {
18 18
19 // These structures are defined as part of the RtpSender interface. 19 // These structures are defined as part of the RtpSender interface.
20 // See http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface for details. 20 // See http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface for details.
21 struct RtpEncodingParameters { 21 struct RtpEncodingParameters {
22 bool active = true; 22 bool active = true;
23 int max_bitrate_bps = -1; 23 int max_bitrate_bps = -1;
24 24
25 bool operator==(const RtpEncodingParameters& o) const { 25 bool operator==(const RtpEncodingParameters& o) const {
26 return active == o.active && max_bitrate_bps == o.max_bitrate_bps; 26 return active == o.active && max_bitrate_bps == o.max_bitrate_bps;
27 } 27 }
28 bool operator!=(const RtpEncodingParameters& o) const {
29 return !(*this == o);
30 }
28 }; 31 };
29 32
30 struct RtpCodecParameters { 33 struct RtpCodecParameters {
31 int payload_type; 34 int payload_type;
32 std::string mime_type; 35 std::string mime_type;
33 int clock_rate; 36 int clock_rate;
34 int channels = 1; 37 int channels = 1;
35 // TODO(deadbeef): Add sdpFmtpLine field. 38 // TODO(deadbeef): Add sdpFmtpLine field.
36 39
37 bool operator==(const RtpCodecParameters& o) const { 40 bool operator==(const RtpCodecParameters& o) const {
38 return payload_type == o.payload_type && mime_type == o.mime_type && 41 return payload_type == o.payload_type && mime_type == o.mime_type &&
39 clock_rate == o.clock_rate && channels == o.channels; 42 clock_rate == o.clock_rate && channels == o.channels;
40 } 43 }
44 bool operator!=(const RtpCodecParameters& o) const { return !(*this == o); }
41 }; 45 };
42 46
43 struct RtpParameters { 47 struct RtpParameters {
44 std::vector<RtpEncodingParameters> encodings; 48 std::vector<RtpEncodingParameters> encodings;
45 std::vector<RtpCodecParameters> codecs; 49 std::vector<RtpCodecParameters> codecs;
46 50
47 bool operator==(const RtpParameters& o) const { 51 bool operator==(const RtpParameters& o) const {
48 return encodings == o.encodings && codecs == o.codecs; 52 return encodings == o.encodings && codecs == o.codecs;
49 } 53 }
54 bool operator!=(const RtpParameters& o) const { return !(*this == o); }
50 }; 55 };
51 56
52 } // namespace webrtc 57 } // namespace webrtc
53 58
54 #endif // WEBRTC_API_RTPPARAMETERS_H_ 59 #endif // WEBRTC_API_RTPPARAMETERS_H_
OLDNEW
« no previous file with comments | « webrtc/api/mediastreamprovider.h ('k') | webrtc/api/rtpreceiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698