Chromium Code Reviews

Side by Side Diff: webrtc/voice_engine/include/voe_base.h

Issue 2307533004: Moving/renaming webrtc/common.h. (Closed)
Patch Set: gyp fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 18 matching lines...)
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 "webrtc/base/scoped_ref_ptr.h" 37 #include "webrtc/base/scoped_ref_ptr.h"
38 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" 38 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
39 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
39 #include "webrtc/common_types.h" 40 #include "webrtc/common_types.h"
40 41
41 namespace webrtc { 42 namespace webrtc {
42 43
43 class AudioDeviceModule; 44 class AudioDeviceModule;
44 class AudioProcessing; 45 class AudioProcessing;
45 class AudioTransport; 46 class AudioTransport;
46 class Config;
47 47
48 const int kVoEDefault = -1; 48 const int kVoEDefault = -1;
49 49
50 // VoiceEngineObserver 50 // VoiceEngineObserver
51 class WEBRTC_DLLEXPORT VoiceEngineObserver { 51 class WEBRTC_DLLEXPORT VoiceEngineObserver {
52 public: 52 public:
53 // This method will be called after the occurrence of any runtime error 53 // This method will be called after the occurrence of any runtime error
54 // code, or warning notification, when the observer interface has been 54 // code, or warning notification, when the observer interface has been
55 // installed using VoEBase::RegisterVoiceEngineObserver(). 55 // installed using VoEBase::RegisterVoiceEngineObserver().
56 virtual void CallbackOnError(int channel, int errCode) = 0; 56 virtual void CallbackOnError(int channel, int errCode) = 0;
57 57
58 protected: 58 protected:
59 virtual ~VoiceEngineObserver() {} 59 virtual ~VoiceEngineObserver() {}
60 }; 60 };
61 61
62 // VoiceEngine 62 // VoiceEngine
63 class WEBRTC_DLLEXPORT VoiceEngine { 63 class WEBRTC_DLLEXPORT VoiceEngine {
64 public: 64 public:
65 // Creates a VoiceEngine object, which can then be used to acquire 65 // Creates a VoiceEngine object, which can then be used to acquire
66 // sub-APIs. Returns NULL on failure. 66 // sub-APIs. Returns NULL on failure.
67 static VoiceEngine* Create(); 67 static VoiceEngine* Create();
68 static VoiceEngine* Create(const Config& config);
69 68
70 // Deletes a created VoiceEngine object and releases the utilized resources. 69 // Deletes a created VoiceEngine object and releases the utilized resources.
71 // Note that if there are outstanding references held via other interfaces, 70 // Note that if there are outstanding references held via other interfaces,
72 // the voice engine instance will not actually be deleted until those 71 // the voice engine instance will not actually be deleted until those
73 // references have been released. 72 // references have been released.
74 static bool Delete(VoiceEngine*& voiceEngine); 73 static bool Delete(VoiceEngine*& voiceEngine);
75 74
76 // Specifies the amount and type of trace information which will be 75 // Specifies the amount and type of trace information which will be
77 // created by the VoiceEngine. 76 // created by the VoiceEngine.
78 static int SetTraceFilter(unsigned int filter); 77 static int SetTraceFilter(unsigned int filter);
(...skipping 64 matching lines...)
143 142
144 // Terminates all VoiceEngine functions and releases allocated resources. 143 // Terminates all VoiceEngine functions and releases allocated resources.
145 // Returns 0. 144 // Returns 0.
146 virtual int Terminate() = 0; 145 virtual int Terminate() = 0;
147 146
148 // Creates a new channel and allocates the required resources for it. 147 // Creates a new channel and allocates the required resources for it.
149 // One can use |config| to configure the channel. Currently that is used for 148 // One can use |config| to configure the channel. Currently that is used for
150 // choosing between ACM1 and ACM2, when creating Audio Coding Module. 149 // choosing between ACM1 and ACM2, when creating Audio Coding Module.
151 // Returns channel ID or -1 in case of an error. 150 // Returns channel ID or -1 in case of an error.
152 virtual int CreateChannel() = 0; 151 virtual int CreateChannel() = 0;
153 virtual int CreateChannel(const Config& config) = 0; 152 virtual int CreateChannel(const AudioCodingModule::Config& acm_config) = 0;
154 153
155 // Deletes an existing channel and releases the utilized resources. 154 // Deletes an existing channel and releases the utilized resources.
156 // Returns -1 in case of an error, 0 otherwise. 155 // Returns -1 in case of an error, 0 otherwise.
157 virtual int DeleteChannel(int channel) = 0; 156 virtual int DeleteChannel(int channel) = 0;
158 157
159 // Prepares and initiates the VoiceEngine for reception of 158 // Prepares and initiates the VoiceEngine for reception of
160 // incoming RTP/RTCP packets on the specified |channel|. 159 // incoming RTP/RTCP packets on the specified |channel|.
161 virtual int StartReceive(int channel) = 0; 160 virtual int StartReceive(int channel) = 0;
162 161
163 // Stops receiving incoming RTP/RTCP packets on the specified |channel|. 162 // Stops receiving incoming RTP/RTCP packets on the specified |channel|.
(...skipping 31 matching lines...)
195 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0; 194 virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0;
196 195
197 protected: 196 protected:
198 VoEBase() {} 197 VoEBase() {}
199 virtual ~VoEBase() {} 198 virtual ~VoEBase() {}
200 }; 199 };
201 200
202 } // namespace webrtc 201 } // namespace webrtc
203 202
204 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H 203 #endif // WEBRTC_VOICE_ENGINE_VOE_BASE_H
OLDNEW

Powered by Google App Engine