| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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_COMMON_TYPES_H_ | 11 #ifndef WEBRTC_COMMON_TYPES_H_ |
| 12 #define WEBRTC_COMMON_TYPES_H_ | 12 #define WEBRTC_COMMON_TYPES_H_ |
| 13 | 13 |
| 14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 #include <string.h> | 15 #include <string.h> |
| 16 | 16 |
| 17 #include <ostream> |
| 17 #include <string> | 18 #include <string> |
| 18 #include <vector> | 19 #include <vector> |
| 19 | 20 |
| 20 #include "webrtc/base/checks.h" | 21 #include "webrtc/base/checks.h" |
| 21 #include "webrtc/base/optional.h" | 22 #include "webrtc/base/optional.h" |
| 22 #include "webrtc/common_video/rotation.h" | 23 #include "webrtc/common_video/rotation.h" |
| 23 #include "webrtc/typedefs.h" | 24 #include "webrtc/typedefs.h" |
| 24 | 25 |
| 25 #if defined(_MSC_VER) | 26 #if defined(_MSC_VER) |
| 26 // Disable "new behavior: elements of array will be default initialized" | 27 // Disable "new behavior: elements of array will be default initialized" |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 int rate; // bits/sec unlike {start,min,max}Bitrate elsewhere in this file! | 322 int rate; // bits/sec unlike {start,min,max}Bitrate elsewhere in this file! |
| 322 | 323 |
| 323 bool operator==(const CodecInst& other) const { | 324 bool operator==(const CodecInst& other) const { |
| 324 return pltype == other.pltype && | 325 return pltype == other.pltype && |
| 325 (STR_CASE_CMP(plname, other.plname) == 0) && | 326 (STR_CASE_CMP(plname, other.plname) == 0) && |
| 326 plfreq == other.plfreq && pacsize == other.pacsize && | 327 plfreq == other.plfreq && pacsize == other.pacsize && |
| 327 channels == other.channels && rate == other.rate; | 328 channels == other.channels && rate == other.rate; |
| 328 } | 329 } |
| 329 | 330 |
| 330 bool operator!=(const CodecInst& other) const { return !(*this == other); } | 331 bool operator!=(const CodecInst& other) const { return !(*this == other); } |
| 332 |
| 333 friend std::ostream& operator<<(std::ostream& os, const CodecInst& ci) { |
| 334 os << "{pltype: " << ci.pltype; |
| 335 os << ", plname: " << ci.plname; |
| 336 os << ", plfreq: " << ci.plfreq; |
| 337 os << ", pacsize: " << ci.pacsize; |
| 338 os << ", channels: " << ci.channels; |
| 339 os << ", rate: " << ci.rate << "}"; |
| 340 return os; |
| 341 } |
| 331 }; | 342 }; |
| 332 | 343 |
| 333 // RTP | 344 // RTP |
| 334 enum { kRtpCsrcSize = 15 }; // RFC 3550 page 13 | 345 enum { kRtpCsrcSize = 15 }; // RFC 3550 page 13 |
| 335 | 346 |
| 336 enum PayloadFrequencies { | 347 enum PayloadFrequencies { |
| 337 kFreq8000Hz = 8000, | 348 kFreq8000Hz = 8000, |
| 338 kFreq16000Hz = 16000, | 349 kFreq16000Hz = 16000, |
| 339 kFreq32000Hz = 32000 | 350 kFreq32000Hz = 32000 |
| 340 }; | 351 }; |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 enum class RtcpMode { kOff, kCompound, kReducedSize }; | 904 enum class RtcpMode { kOff, kCompound, kReducedSize }; |
| 894 | 905 |
| 895 enum NetworkState { | 906 enum NetworkState { |
| 896 kNetworkUp, | 907 kNetworkUp, |
| 897 kNetworkDown, | 908 kNetworkDown, |
| 898 }; | 909 }; |
| 899 | 910 |
| 900 } // namespace webrtc | 911 } // namespace webrtc |
| 901 | 912 |
| 902 #endif // WEBRTC_COMMON_TYPES_H_ | 913 #endif // WEBRTC_COMMON_TYPES_H_ |
| OLD | NEW |