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

Side by Side Diff: webrtc/voice_engine/voe_external_media_impl.cc

Issue 2549443002: Remove API-related #defines from voice_engine_configurations.h (Closed)
Patch Set: Created 4 years 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/voice_engine/voe_codec_impl.cc ('k') | webrtc/voice_engine/voe_file_impl.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/voice_engine/voe_external_media_impl.h" 11 #include "webrtc/voice_engine/voe_external_media_impl.h"
12 12
13 #include "webrtc/system_wrappers/include/trace.h" 13 #include "webrtc/system_wrappers/include/trace.h"
14 #include "webrtc/voice_engine/channel.h" 14 #include "webrtc/voice_engine/channel.h"
15 #include "webrtc/voice_engine/include/voe_errors.h" 15 #include "webrtc/voice_engine/include/voe_errors.h"
16 #include "webrtc/voice_engine/output_mixer.h" 16 #include "webrtc/voice_engine/output_mixer.h"
17 #include "webrtc/voice_engine/transmit_mixer.h" 17 #include "webrtc/voice_engine/transmit_mixer.h"
18 #include "webrtc/voice_engine/voice_engine_impl.h" 18 #include "webrtc/voice_engine/voice_engine_impl.h"
19 19
20 #ifndef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
21 #error "Deprecated"
22 #endif
23
24 namespace webrtc { 20 namespace webrtc {
25 21
26 VoEExternalMedia* VoEExternalMedia::GetInterface(VoiceEngine* voiceEngine) { 22 VoEExternalMedia* VoEExternalMedia::GetInterface(VoiceEngine* voiceEngine) {
27 #ifndef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
28 return NULL;
29 #else
30 if (NULL == voiceEngine) { 23 if (NULL == voiceEngine) {
31 return NULL; 24 return NULL;
32 } 25 }
33 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine); 26 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine);
34 s->AddRef(); 27 s->AddRef();
35 return s; 28 return s;
36 #endif
37 } 29 }
38 30
39 #ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
40
41 VoEExternalMediaImpl::VoEExternalMediaImpl(voe::SharedData* shared) 31 VoEExternalMediaImpl::VoEExternalMediaImpl(voe::SharedData* shared)
42 : 32 :
43 #ifdef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT 33 #ifdef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
44 playout_delay_ms_(0), 34 playout_delay_ms_(0),
45 #endif 35 #endif
46 shared_(shared) { 36 shared_(shared) {
47 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(shared_->instance_id(), -1), 37 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(shared_->instance_id(), -1),
48 "VoEExternalMediaImpl() - ctor"); 38 "VoEExternalMediaImpl() - ctor");
49 } 39 }
50 40
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel); 165 voe::ChannelOwner ch = shared_->channel_manager().GetChannel(channel);
176 voe::Channel* channelPtr = ch.channel(); 166 voe::Channel* channelPtr = ch.channel();
177 if (channelPtr == NULL) { 167 if (channelPtr == NULL) {
178 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, 168 shared_->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
179 "SetExternalMixing() failed to locate channel"); 169 "SetExternalMixing() failed to locate channel");
180 return -1; 170 return -1;
181 } 171 }
182 return channelPtr->SetExternalMixing(enable); 172 return channelPtr->SetExternalMixing(enable);
183 } 173 }
184 174
185 #endif // WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
186
187 } // namespace webrtc 175 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/voe_codec_impl.cc ('k') | webrtc/voice_engine/voe_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698