Chromium Code Reviews| 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 AudioFormatInfo::AudioFormatInfo() |
| 81 : AudioFormatInfo(0, 0, 0) {} | |
|
kwiberg-webrtc
2017/03/15 13:33:17
Sorry if I've already asked about this, but why is
ossu
2017/03/16 18:03:56
It was necessary for one of the previous incarnati
| |
| 81 | 82 |
| 82 AudioCodecSpec::AudioCodecSpec(SdpAudioFormat&& format) | 83 AudioFormatInfo::AudioFormatInfo(int sample_rate_hz, |
| 83 : format(std::move(format)) {} | 84 int num_channels, |
| 85 int bitrate_bps) | |
| 86 : AudioFormatInfo(sample_rate_hz, | |
| 87 num_channels, | |
| 88 bitrate_bps, | |
| 89 bitrate_bps, | |
| 90 bitrate_bps) {} | |
| 91 | |
| 92 AudioFormatInfo::AudioFormatInfo(int sample_rate_hz, | |
| 93 int num_channels, | |
| 94 int default_bitrate_bps, | |
| 95 int min_bitrate_bps, | |
| 96 int max_bitrate_bps) | |
| 97 : sample_rate_hz(sample_rate_hz), | |
| 98 num_channels(num_channels), | |
| 99 default_bitrate_bps(default_bitrate_bps), | |
| 100 min_bitrate_bps(min_bitrate_bps), | |
| 101 max_bitrate_bps(max_bitrate_bps) { | |
| 102 RTC_DCHECK_GE(min_bitrate_bps, 0); | |
| 103 RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps); | |
| 104 RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps); | |
|
kwiberg-webrtc
2017/03/15 13:33:17
Also check that sample_rate_hz and num_channels ar
ossu
2017/03/16 18:03:56
Sure. I've just done the most basic of checks, tha
kwiberg-webrtc
2017/03/17 10:20:01
Excellent, that was exactly what I meant.
| |
| 105 } | |
| 84 | 106 |
| 85 } // namespace webrtc | 107 } // namespace webrtc |
| OLD | NEW |