| OLD | NEW |
| 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 Loading... |
| 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> |
| 38 |
| 37 #include "webrtc/common_types.h" | 39 #include "webrtc/common_types.h" |
| 38 | 40 |
| 39 namespace webrtc { | 41 namespace webrtc { |
| 40 | 42 |
| 43 class AudioDecoderFactory; |
| 41 class AudioDeviceModule; | 44 class AudioDeviceModule; |
| 42 class AudioProcessing; | 45 class AudioProcessing; |
| 43 class AudioTransport; | 46 class AudioTransport; |
| 44 class Config; | 47 class Config; |
| 45 | 48 |
| 46 const int kVoEDefault = -1; | 49 const int kVoEDefault = -1; |
| 47 | 50 |
| 48 // VoiceEngineObserver | 51 // VoiceEngineObserver |
| 49 class WEBRTC_DLLEXPORT VoiceEngineObserver { | 52 class WEBRTC_DLLEXPORT VoiceEngineObserver { |
| 50 public: | 53 public: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 virtual int DeRegisterVoiceEngineObserver() = 0; | 119 virtual int DeRegisterVoiceEngineObserver() = 0; |
| 117 | 120 |
| 118 // Initializes all common parts of the VoiceEngine; e.g. all | 121 // Initializes all common parts of the VoiceEngine; e.g. all |
| 119 // encoders/decoders, the sound card and core receiving components. | 122 // encoders/decoders, the sound card and core receiving components. |
| 120 // This method also makes it possible to install some user-defined external | 123 // This method also makes it possible to install some user-defined external |
| 121 // modules: | 124 // modules: |
| 122 // - The Audio Device Module (ADM) which implements all the audio layer | 125 // - The Audio Device Module (ADM) which implements all the audio layer |
| 123 // functionality in a separate (reference counted) module. | 126 // functionality in a separate (reference counted) module. |
| 124 // - The AudioProcessing module handles capture-side processing. VoiceEngine | 127 // - The AudioProcessing module handles capture-side processing. VoiceEngine |
| 125 // takes ownership of this object. | 128 // takes ownership of this object. |
| 129 // - An AudioDecoderFactory - used to create audio decoders. |
| 126 // If NULL is passed for any of these, VoiceEngine will create its own. | 130 // If NULL is passed for any of these, VoiceEngine will create its own. |
| 127 // Returns -1 in case of an error, 0 otherwise. | 131 // Returns -1 in case of an error, 0 otherwise. |
| 128 // TODO(ajm): Remove default NULLs. | 132 // TODO(ajm): Remove default NULLs. |
| 129 virtual int Init(AudioDeviceModule* external_adm = NULL, | 133 virtual int Init(AudioDeviceModule* external_adm = NULL, |
| 130 AudioProcessing* audioproc = NULL) = 0; | 134 AudioProcessing* audioproc = NULL, |
| 135 std::shared_ptr<AudioDecoderFactory> decoder_factory = |
| 136 std::shared_ptr<AudioDecoderFactory>()) = 0; |
| 131 | 137 |
| 132 // Returns NULL before Init() is called. | 138 // Returns NULL before Init() is called. |
| 133 virtual AudioProcessing* audio_processing() = 0; | 139 virtual AudioProcessing* audio_processing() = 0; |
| 134 | 140 |
| 135 // This method is WIP - DO NOT USE! | 141 // This method is WIP - DO NOT USE! |
| 136 // Returns NULL before Init() is called. | 142 // Returns NULL before Init() is called. |
| 137 virtual AudioDeviceModule* audio_device_module() = 0; | 143 virtual AudioDeviceModule* audio_device_module() = 0; |
| 138 | 144 |
| 139 // Terminates all VoiceEngine functions and releases allocated resources. | 145 // Terminates all VoiceEngine functions and releases allocated resources. |
| 140 // Returns 0. | 146 // Returns 0. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0; | 196 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0; |
| 191 | 197 |
| 192 protected: | 198 protected: |
| 193 VoEBase() {} | 199 VoEBase() {} |
| 194 virtual ~VoEBase() {} | 200 virtual ~VoEBase() {} |
| 195 }; | 201 }; |
| 196 | 202 |
| 197 } // namespace webrtc | 203 } // namespace webrtc |
| 198 | 204 |
| 199 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H | 205 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H |
| OLD | NEW |