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

Side by Side Diff: webrtc/modules/audio_coding/acm2/rent_a_codec.cc

Issue 2355503002: Stopped using the NetEqDecoder enum internally in NetEq. (Closed)
Patch Set: Clarified comments. Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 case NetEqDecoder::kDecoderG722_2ch: 87 case NetEqDecoder::kDecoderG722_2ch:
88 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("g722", 8000, 2)); 88 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("g722", 8000, 2));
89 case NetEqDecoder::kDecoderOpus: 89 case NetEqDecoder::kDecoderOpus:
90 return rtc::Optional<SdpAudioFormat>( 90 return rtc::Optional<SdpAudioFormat>(
91 SdpAudioFormat("opus", 48000, 2, 91 SdpAudioFormat("opus", 48000, 2,
92 std::map<std::string, std::string>{{"stereo", "0"}})); 92 std::map<std::string, std::string>{{"stereo", "0"}}));
93 case NetEqDecoder::kDecoderOpus_2ch: 93 case NetEqDecoder::kDecoderOpus_2ch:
94 return rtc::Optional<SdpAudioFormat>( 94 return rtc::Optional<SdpAudioFormat>(
95 SdpAudioFormat("opus", 48000, 2, 95 SdpAudioFormat("opus", 48000, 2,
96 std::map<std::string, std::string>{{"stereo", "1"}})); 96 std::map<std::string, std::string>{{"stereo", "1"}}));
97 97 case NetEqDecoder::kDecoderRED:
98 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("red", 8000, 1));
99 case NetEqDecoder::kDecoderAVT:
100 return rtc::Optional<SdpAudioFormat>(
101 SdpAudioFormat("telephone-event", 8000, 1));
102 case NetEqDecoder::kDecoderCNGnb:
103 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("cn", 8000, 1));
104 case NetEqDecoder::kDecoderCNGwb:
105 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("cn", 16000, 1));
106 case NetEqDecoder::kDecoderCNGswb32kHz:
107 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("cn", 32000, 1));
108 case NetEqDecoder::kDecoderCNGswb48kHz:
109 return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("cn", 48000, 1));
98 default: 110 default:
99 return rtc::Optional<SdpAudioFormat>(); 111 return rtc::Optional<SdpAudioFormat>();
100 } 112 }
101 } 113 }
102 114
103 rtc::Optional<RentACodec::CodecId> RentACodec::CodecIdByParams( 115 rtc::Optional<RentACodec::CodecId> RentACodec::CodecIdByParams(
104 const char* payload_name, 116 const char* payload_name,
105 int sampling_freq_hz, 117 int sampling_freq_hz,
106 size_t channels) { 118 size_t channels) {
107 return CodecIdFromIndex( 119 return CodecIdFromIndex(
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 371 }
360 return encoder_stack; 372 return encoder_stack;
361 } 373 }
362 374
363 std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder(int sample_rate_hz) { 375 std::unique_ptr<AudioDecoder> RentACodec::RentIsacDecoder(int sample_rate_hz) {
364 return CreateIsacDecoder(sample_rate_hz, isac_bandwidth_info_); 376 return CreateIsacDecoder(sample_rate_hz, isac_bandwidth_info_);
365 } 377 }
366 378
367 } // namespace acm2 379 } // namespace acm2
368 } // namespace webrtc 380 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_receiver.cc ('k') | webrtc/modules/audio_coding/neteq/decoder_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698