OLD | NEW |
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 <vector> | 15 #include <vector> |
15 | 16 |
16 namespace webrtc { | 17 namespace webrtc { |
17 | 18 |
18 // These structures are defined as part of the RtpSender interface. | 19 // These structures are defined as part of the RtpSender interface. |
19 // See http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface for details. | 20 // See http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface for details. |
20 struct RtpEncodingParameters { | 21 struct RtpEncodingParameters { |
21 bool active = true; | 22 bool active = true; |
22 int max_bitrate_bps = -1; | 23 int max_bitrate_bps = -1; |
| 24 |
| 25 bool operator==(const RtpEncodingParameters& o) const { |
| 26 return active == o.active && max_bitrate_bps == o.max_bitrate_bps; |
| 27 } |
| 28 }; |
| 29 |
| 30 struct RtpCodecParameters { |
| 31 int payload_type; |
| 32 std::string mime_type; |
| 33 int clock_rate; |
| 34 int channels = 1; |
| 35 // TODO(deadbeef): Add sdpFmtpLine field. |
| 36 |
| 37 bool operator==(const RtpCodecParameters& o) const { |
| 38 return payload_type == o.payload_type && mime_type == o.mime_type && |
| 39 clock_rate == o.clock_rate && channels == o.channels; |
| 40 } |
23 }; | 41 }; |
24 | 42 |
25 struct RtpParameters { | 43 struct RtpParameters { |
26 std::vector<RtpEncodingParameters> encodings; | 44 std::vector<RtpEncodingParameters> encodings; |
| 45 std::vector<RtpCodecParameters> codecs; |
| 46 |
| 47 bool operator==(const RtpParameters& o) const { |
| 48 return encodings == o.encodings && codecs == o.codecs; |
| 49 } |
27 }; | 50 }; |
28 | 51 |
29 } // namespace webrtc | 52 } // namespace webrtc |
30 | 53 |
31 #endif // WEBRTC_API_RTPPARAMETERS_H_ | 54 #endif // WEBRTC_API_RTPPARAMETERS_H_ |
OLD | NEW |