OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 os << ", parameters: {"; | 70 os << ", parameters: {"; |
71 const char* sep = ""; | 71 const char* sep = ""; |
72 for (const auto& kv : saf.parameters) { | 72 for (const auto& kv : saf.parameters) { |
73 os << sep << kv.first << ": " << kv.second; | 73 os << sep << kv.first << ": " << kv.second; |
74 sep = ", "; | 74 sep = ", "; |
75 } | 75 } |
76 os << "}}"; | 76 os << "}}"; |
77 return os; | 77 return os; |
78 } | 78 } |
79 | 79 |
80 AudioCodecSpec::AudioCodecSpec(const SdpAudioFormat& format) : format(format) {} | 80 AudioCodecInfo::AudioCodecInfo(int sample_rate_hz, |
| 81 int num_channels, |
| 82 int bitrate_bps) |
| 83 : AudioCodecInfo(sample_rate_hz, |
| 84 num_channels, |
| 85 bitrate_bps, |
| 86 bitrate_bps, |
| 87 bitrate_bps) {} |
81 | 88 |
82 AudioCodecSpec::AudioCodecSpec(SdpAudioFormat&& format) | 89 AudioCodecInfo::AudioCodecInfo(int sample_rate_hz, |
83 : format(std::move(format)) {} | 90 int num_channels, |
| 91 int default_bitrate_bps, |
| 92 int min_bitrate_bps, |
| 93 int max_bitrate_bps) |
| 94 : sample_rate_hz(sample_rate_hz), |
| 95 num_channels(num_channels), |
| 96 default_bitrate_bps(default_bitrate_bps), |
| 97 min_bitrate_bps(min_bitrate_bps), |
| 98 max_bitrate_bps(max_bitrate_bps) { |
| 99 RTC_DCHECK_GT(sample_rate_hz, 0); |
| 100 RTC_DCHECK_GT(num_channels, 0); |
| 101 RTC_DCHECK_GE(min_bitrate_bps, 0); |
| 102 RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps); |
| 103 RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps); |
| 104 } |
84 | 105 |
85 } // namespace webrtc | 106 } // namespace webrtc |
OLD | NEW |