Chromium Code Reviews| Index: webrtc/api/audio_codecs/audio_format.cc |
| diff --git a/webrtc/api/audio_codecs/audio_format.cc b/webrtc/api/audio_codecs/audio_format.cc |
| index b0a86e25bd8a7c2ae225ed539666cbf879cf03a5..ab438e1e1d0a7bb27a1ac5c02a97169c7136cc53 100644 |
| --- a/webrtc/api/audio_codecs/audio_format.cc |
| +++ b/webrtc/api/audio_codecs/audio_format.cc |
| @@ -77,9 +77,34 @@ std::ostream& operator<<(std::ostream& os, const SdpAudioFormat& saf) { |
| return os; |
| } |
| -AudioCodecSpec::AudioCodecSpec(const SdpAudioFormat& format) : format(format) {} |
| +AudioFormatInfo::AudioFormatInfo() |
| + : sample_rate_hz(0), |
| + num_channels(0), |
| + min_bitrate_bps(0), |
| + max_bitrate_bps(0) {} |
|
kwiberg-webrtc
2017/02/19 21:41:09
Also initialize default_bitrate_bps?
In general,
ossu
2017/02/20 12:20:25
Uh-oh, will fix!
|
| -AudioCodecSpec::AudioCodecSpec(SdpAudioFormat&& format) |
| - : format(std::move(format)) {} |
| +AudioFormatInfo::AudioFormatInfo(int sample_rate_hz, |
| + int num_channels, |
| + int bitrate_bps) |
| + : AudioFormatInfo(sample_rate_hz, |
| + num_channels, |
| + bitrate_bps, |
| + bitrate_bps, |
| + bitrate_bps) {} |
| + |
| +AudioFormatInfo::AudioFormatInfo(int sample_rate_hz, |
| + int num_channels, |
| + int default_bitrate_bps, |
| + int min_bitrate_bps, |
| + int max_bitrate_bps) |
| + : sample_rate_hz(sample_rate_hz), |
| + num_channels(num_channels), |
| + default_bitrate_bps(default_bitrate_bps), |
| + min_bitrate_bps(min_bitrate_bps), |
| + max_bitrate_bps(max_bitrate_bps) { |
| + RTC_DCHECK_GE(min_bitrate_bps, 0); |
| + RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps); |
| + RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps); |
| +} |
| } // namespace webrtc |