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

Unified Diff: webrtc/voice_engine/voice_engine_impl.cc

Issue 1459083007: Open backdoor in VoiceEngineImpl to get at the actual voe::Channel objects from an ID. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/voice_engine/voice_engine_impl.cc
diff --git a/webrtc/voice_engine/voice_engine_impl.cc b/webrtc/voice_engine/voice_engine_impl.cc
index 814d619589e755fd16b515b39519bbf34d29938e..cb8313579f99269302be269271467d0df42e0c17 100644
--- a/webrtc/voice_engine/voice_engine_impl.cc
+++ b/webrtc/voice_engine/voice_engine_impl.cc
@@ -15,8 +15,11 @@
#include "webrtc/modules/utility/include/jvm_android.h"
#endif
+#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/trace.h"
+#include "webrtc/voice_engine/channel_proxy.h"
#include "webrtc/voice_engine/voice_engine_impl.h"
namespace webrtc {
@@ -77,6 +80,13 @@ int VoiceEngineImpl::Release() {
return new_ref;
}
+voe::ChannelProxy* VoiceEngineImpl::GetChannelProxy(int channel_id) {
+ RTC_DCHECK(channel_id >= 0);
+ CriticalSectionScoped cs(crit_sec());
+ RTC_DCHECK(statistics().Initialized());
+ return new voe::ChannelProxy(channel_manager().GetChannel(channel_id));
+}
kwiberg-webrtc 2015/11/25 10:44:59 I think this should return a scoped_ptr instead of
the sun 2015/11/25 12:28:01 Yes, that works great. Thanks.
+
VoiceEngine* VoiceEngine::Create() {
Config* config = new Config();
return GetVoiceEngine(config, true);
« webrtc/voice_engine/channel_proxy.cc ('K') | « webrtc/voice_engine/voice_engine_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698