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/api/audio_codecs/ilbc/audio_decoder_ilbc.cc

Issue 2951873002: Expose ILBC codec in webrtc/api/audio_codecs/ (Closed)
Patch Set: Fix tests Created 3 years, 5 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
(Empty)
1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h"
12
13 #include <memory>
14 #include <vector>
15
16 #include "webrtc/base/ptr_util.h"
17 #include "webrtc/common_types.h"
18 #include "webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
19
20 namespace webrtc {
21
22 rtc::Optional<AudioDecoderIlbc::Config> AudioDecoderIlbc::SdpToConfig(
23 const SdpAudioFormat& format) {
24 return STR_CASE_CMP(format.name.c_str(), "ilbc") == 0 &&
25 format.clockrate_hz == 8000 && format.num_channels == 1
26 ? rtc::Optional<Config>(Config())
27 : rtc::Optional<Config>();
28 }
29
30 void AudioDecoderIlbc::AppendSupportedDecoders(
31 std::vector<AudioCodecSpec>* specs) {
32 specs->push_back({{"ILBC", 8000, 1}, {8000, 1, 13300}});
33 }
34
35 std::unique_ptr<AudioDecoder> AudioDecoderIlbc::MakeAudioDecoder(
36 Config config) {
37 return rtc::MakeUnique<AudioDecoderIlbcImpl>();
38 }
39
40 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698