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

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

Issue 2024633002: AudioDecoder: New method SampleRateHz, + implementations for our codecs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add TODO fix PCM A U at 8 kHz 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
85 AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) { 89 AudioDecoder::SpeechType AudioDecoder::ConvertSpeechType(int16_t type) {
86 switch (type) { 90 switch (type) {
87 case 0: // TODO(hlundin): Both iSAC and Opus return 0 for speech. 91 case 0: // TODO(hlundin): Both iSAC and Opus return 0 for speech.
88 case 1: 92 case 1:
89 return kSpeech; 93 return kSpeech;
90 case 2: 94 case 2:
91 return kComfortNoise; 95 return kComfortNoise;
92 default: 96 default:
93 assert(false); 97 assert(false);
94 return kSpeech; 98 return kSpeech;
95 } 99 }
96 } 100 }
97 101
98 } // namespace webrtc 102 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698