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/voice_engine/include/voe_base.h

Issue 1993783002: Moved CreateBuiltinDecoderFactory out to VoEBaseImpl. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-injections-2
Patch Set: Created 4 years, 7 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 16 matching lines...) Expand all
27 // base->StartPlayout(ch); 27 // base->StartPlayout(ch);
28 // ... 28 // ...
29 // base->DeleteChannel(ch); 29 // base->DeleteChannel(ch);
30 // base->Terminate(); 30 // base->Terminate();
31 // base->Release(); 31 // base->Release();
32 // VoiceEngine::Delete(voe); 32 // VoiceEngine::Delete(voe);
33 // 33 //
34 #ifndef WEBRTC_VOICE_ENGINE_VOE_BASE_H 34 #ifndef WEBRTC_VOICE_ENGINE_VOE_BASE_H
35 #define WEBRTC_VOICE_ENGINE_VOE_BASE_H 35 #define WEBRTC_VOICE_ENGINE_VOE_BASE_H
36 36
37 #include <memory>
ossu 2016/05/18 16:12:27 This one isn't necessary.
kwiberg-webrtc 2016/05/25 09:19:16 Acknowledged.
38
39 #include "webrtc/base/scoped_ref_ptr.h"
40 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
37 #include "webrtc/common_types.h" 41 #include "webrtc/common_types.h"
38 42
39 namespace webrtc { 43 namespace webrtc {
40 44
41 class AudioDeviceModule; 45 class AudioDeviceModule;
42 class AudioProcessing; 46 class AudioProcessing;
43 class AudioTransport; 47 class AudioTransport;
44 class Config; 48 class Config;
45 49
46 const int kVoEDefault = -1; 50 const int kVoEDefault = -1;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 virtual int DeRegisterVoiceEngineObserver() = 0; 120 virtual int DeRegisterVoiceEngineObserver() = 0;
117 121
118 // Initializes all common parts of the VoiceEngine; e.g. all 122 // Initializes all common parts of the VoiceEngine; e.g. all
119 // encoders/decoders, the sound card and core receiving components. 123 // encoders/decoders, the sound card and core receiving components.
120 // This method also makes it possible to install some user-defined external 124 // This method also makes it possible to install some user-defined external
121 // modules: 125 // modules:
122 // - The Audio Device Module (ADM) which implements all the audio layer 126 // - The Audio Device Module (ADM) which implements all the audio layer
123 // functionality in a separate (reference counted) module. 127 // functionality in a separate (reference counted) module.
124 // - The AudioProcessing module handles capture-side processing. VoiceEngine 128 // - The AudioProcessing module handles capture-side processing. VoiceEngine
125 // takes ownership of this object. 129 // takes ownership of this object.
130 // - An AudioDecoderFactory - used to create audio decoders.
126 // If NULL is passed for any of these, VoiceEngine will create its own. 131 // If NULL is passed for any of these, VoiceEngine will create its own.
127 // Returns -1 in case of an error, 0 otherwise. 132 // Returns -1 in case of an error, 0 otherwise.
128 // TODO(ajm): Remove default NULLs. 133 // TODO(ajm): Remove default NULLs.
129 virtual int Init(AudioDeviceModule* external_adm = NULL, 134 virtual int Init(AudioDeviceModule* external_adm = NULL,
130 AudioProcessing* audioproc = NULL) = 0; 135 AudioProcessing* audioproc = NULL,
136 const rtc::scoped_refptr<AudioDecoderFactory>&
137 decoder_factory = nullptr) = 0;
kwiberg-webrtc 2016/05/25 09:19:16 Not your fault, but ew! Default values for argumen
ossu 2016/05/26 12:09:53 Yeah. :/ Fortunately, they're all "no-value" defau
131 138
132 // Returns NULL before Init() is called. 139 // Returns NULL before Init() is called.
133 virtual AudioProcessing* audio_processing() = 0; 140 virtual AudioProcessing* audio_processing() = 0;
134 141
135 // This method is WIP - DO NOT USE! 142 // This method is WIP - DO NOT USE!
136 // Returns NULL before Init() is called. 143 // Returns NULL before Init() is called.
137 virtual AudioDeviceModule* audio_device_module() = 0; 144 virtual AudioDeviceModule* audio_device_module() = 0;
138 145
139 // Terminates all VoiceEngine functions and releases allocated resources. 146 // Terminates all VoiceEngine functions and releases allocated resources.
140 // Returns 0. 147 // Returns 0.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0; 197 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0;
191 198
192 protected: 199 protected:
193 VoEBase() {} 200 VoEBase() {}
194 virtual ~VoEBase() {} 201 virtual ~VoEBase() {}
195 }; 202 };
196 203
197 } // namespace webrtc 204 } // namespace webrtc
198 205
199 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H 206 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698