Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: webrtc/api/audio_codecs/audio_format.cc

Issue 2936533003: Implement operator<< for AudioCodecInfo and AudioCodecSpec (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/audio_codecs/audio_format.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 default_bitrate_bps(default_bitrate_bps), 101 default_bitrate_bps(default_bitrate_bps),
102 min_bitrate_bps(min_bitrate_bps), 102 min_bitrate_bps(min_bitrate_bps),
103 max_bitrate_bps(max_bitrate_bps) { 103 max_bitrate_bps(max_bitrate_bps) {
104 RTC_DCHECK_GT(sample_rate_hz, 0); 104 RTC_DCHECK_GT(sample_rate_hz, 0);
105 RTC_DCHECK_GT(num_channels, 0); 105 RTC_DCHECK_GT(num_channels, 0);
106 RTC_DCHECK_GE(min_bitrate_bps, 0); 106 RTC_DCHECK_GE(min_bitrate_bps, 0);
107 RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps); 107 RTC_DCHECK_LE(min_bitrate_bps, default_bitrate_bps);
108 RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps); 108 RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps);
109 } 109 }
110 110
111 std::ostream& operator<<(std::ostream& os, const AudioCodecInfo& aci) {
112 os << "{sample_rate_hz: " << aci.sample_rate_hz;
113 os << ", num_channels: " << aci.num_channels;
114 os << ", default_bitrate_bps: " << aci.default_bitrate_bps;
115 os << ", min_bitrate_bps: " << aci.min_bitrate_bps;
116 os << ", max_bitrate_bps: " << aci.max_bitrate_bps;
117 os << ", allow_comfort_noise: " << aci.allow_comfort_noise;
118 os << ", supports_network_adaption: " << aci.supports_network_adaption;
119 os << "}";
120 return os;
121 }
122
123 std::ostream& operator<<(std::ostream& os, const AudioCodecSpec& acs) {
124 os << "{format: " << acs.format;
125 os << ", info: " << acs.info;
126 os << "}";
127 return os;
128 }
129
111 } // namespace webrtc 130 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/audio_codecs/audio_format.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698