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

Side by Side Diff: webrtc/modules/utility/source/coder.cc

Issue 1992763002: Moved injection of AudioDecoderFactory into voe::Channel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-1
Patch Set: Addressed nit. 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
« no previous file with comments | « webrtc/modules/audio_coding/test/TwoWayCommunication.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "webrtc/common_types.h" 11 #include "webrtc/common_types.h"
12 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
12 #include "webrtc/modules/include/module_common_types.h" 13 #include "webrtc/modules/include/module_common_types.h"
13 #include "webrtc/modules/utility/source/coder.h" 14 #include "webrtc/modules/utility/source/coder.h"
14 15
15 namespace webrtc { 16 namespace webrtc {
16 namespace { 17 namespace {
17 AudioCodingModule::Config GetAcmConfig(uint32_t id) { 18 AudioCodingModule::Config GetAcmConfig(uint32_t id) {
18 AudioCodingModule::Config config; 19 AudioCodingModule::Config config;
19 // This class does not handle muted output. 20 // This class does not handle muted output.
20 config.neteq_config.enable_muted_state = false; 21 config.neteq_config.enable_muted_state = false;
21 config.id = id; 22 config.id = id;
23 config.decoder_factory = CreateBuiltinAudioDecoderFactory();
22 return config; 24 return config;
23 } 25 }
24 } // namespace 26 } // namespace
25 27
26 AudioCoder::AudioCoder(uint32_t instance_id) 28 AudioCoder::AudioCoder(uint32_t instance_id)
27 : acm_(AudioCodingModule::Create(GetAcmConfig(instance_id))), 29 : acm_(AudioCodingModule::Create(GetAcmConfig(instance_id))),
28 receive_codec_(), 30 receive_codec_(),
29 encode_timestamp_(0), 31 encode_timestamp_(0),
30 encoded_data_(nullptr), 32 encoded_data_(nullptr),
31 encoded_length_in_bytes_(0), 33 encoded_length_in_bytes_(0),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 uint32_t /* time_stamp */, 106 uint32_t /* time_stamp */,
105 const uint8_t* payload_data, 107 const uint8_t* payload_data,
106 size_t payload_size, 108 size_t payload_size,
107 const RTPFragmentationHeader* /* fragmentation*/) { 109 const RTPFragmentationHeader* /* fragmentation*/) {
108 memcpy(encoded_data_, payload_data, sizeof(uint8_t) * payload_size); 110 memcpy(encoded_data_, payload_data, sizeof(uint8_t) * payload_size);
109 encoded_length_in_bytes_ = payload_size; 111 encoded_length_in_bytes_ = payload_size;
110 return 0; 112 return 0;
111 } 113 }
112 114
113 } // namespace webrtc 115 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/test/TwoWayCommunication.cc ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698