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

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/audio_decoder_opus.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) 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return WebRtcOpus_FecDurationEst(encoded, encoded_len); 80 return WebRtcOpus_FecDurationEst(encoded, encoded_len);
81 } 81 }
82 82
83 bool AudioDecoderOpus::PacketHasFec(const uint8_t* encoded, 83 bool AudioDecoderOpus::PacketHasFec(const uint8_t* encoded,
84 size_t encoded_len) const { 84 size_t encoded_len) const {
85 int fec; 85 int fec;
86 fec = WebRtcOpus_PacketHasFec(encoded, encoded_len); 86 fec = WebRtcOpus_PacketHasFec(encoded, encoded_len);
87 return (fec == 1); 87 return (fec == 1);
88 } 88 }
89 89
90 int AudioDecoderOpus::SampleRateHz() const {
91 return 48000;
92 }
93
90 size_t AudioDecoderOpus::Channels() const { 94 size_t AudioDecoderOpus::Channels() const {
91 return channels_; 95 return channels_;
92 } 96 }
93 97
94 } // namespace webrtc 98 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698