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

Side by Side Diff: webrtc/modules/audio_coding/codecs/audio_decoder.cc

Issue 2029543002: AudioDecoder: Remove the default implementation of SampleRateHz (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@samprate0
Patch Set: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 int AudioDecoder::PacketDurationRedundant(const uint8_t* encoded, 75 int AudioDecoder::PacketDurationRedundant(const uint8_t* encoded,
76 size_t encoded_len) const { 76 size_t encoded_len) const {
77 return kNotImplemented; 77 return kNotImplemented;
78 } 78 }
79 79
80 bool AudioDecoder::PacketHasFec(const uint8_t* encoded, 80 bool AudioDecoder::PacketHasFec(const uint8_t* encoded,
81 size_t encoded_len) const { 81 size_t encoded_len) const {
82 return false; 82 return false;
83 } 83 }
84 84
85 int AudioDecoder::SampleRateHz() const {
86 return -1;
87 }
88
89 AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) { 85 AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) {
90 switch (type) { 86 switch (type) {
91 case 0: // TODO(hlundin): Both iSAC and Opus return 0 for speech. 87 case 0: // TODO(hlundin): Both iSAC and Opus return 0 for speech.
92 case 1: 88 case 1:
93 return kSpeech; 89 return kSpeech;
94 case 2: 90 case 2:
95 return kComfortNoise; 91 return kComfortNoise;
96 default: 92 default:
97 assert(false); 93 assert(false);
98 return kSpeech; 94 return kSpeech;
99 } 95 }
100 } 96 }
101 97
102 } // namespace webrtc 98 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698