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

Side by Side Diff: webrtc/api/audio_codecs/g722/audio_decoder_g722.cc

Issue 2940833002: G722 implementation of the AudioDecoderFactoryTemplate API (Closed)
Patch Set: Created 3 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
(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/g722/audio_decoder_g722.h"
12
13 #include <memory>
14 #include <vector>
15
16 #include "webrtc/base/ptr_util.h"
17 #include "webrtc/base/safe_conversions.h"
18 #include "webrtc/common_types.h"
19 #include "webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h"
20
21 namespace webrtc {
22
23 rtc::Optional<AudioDecoderG722::Config> AudioDecoderG722::SdpToConfig(
24 const SdpAudioFormat& format) {
25 return STR_CASE_CMP(format.name.c_str(), "g722") == 0 &&
26 format.clockrate_hz == 8000
27 ? rtc::Optional<Config>(Config())
28 : rtc::Optional<Config>();
29 }
30
31 void AudioDecoderG722::AppendSupportedDecoders(
32 std::vector<AudioCodecSpec>* specs) {
33 specs->push_back({{"g722", 8000, 1}, {16000, 1, 64000}});
34 }
35
36 std::unique_ptr<AudioDecoder> AudioDecoderG722::MakeAudioDecoder(
37 Config config) {
38 return rtc::MakeUnique<AudioDecoderG722Impl>();
39 }
40
41 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/audio_codecs/g722/audio_decoder_g722.h ('k') | webrtc/api/audio_codecs/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698