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

Unified Diff: webrtc/modules/video_capture/ensure_initialized.cc

Issue 1347083003: Remove the video capture module on Android. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed Android Java files Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_capture/ensure_initialized.cc
diff --git a/webrtc/modules/video_capture/ensure_initialized.cc b/webrtc/modules/video_capture/ensure_initialized.cc
deleted file mode 100644
index bc606bb88ed31d467363a6341df9841202ee4b8b..0000000000000000000000000000000000000000
--- a/webrtc/modules/video_capture/ensure_initialized.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// Platform-specific initialization bits, if any, go here.
-
-#ifndef ANDROID
-
-namespace webrtc {
-namespace videocapturemodule {
-void EnsureInitialized() {}
-} // namespace videocapturemodule
-} // namespace webrtc
-
-#else
-
-#include <pthread.h>
-
-// Note: this dependency is dangerous since it reaches into Chromium's base.
-// There's a risk of e.g. macro clashes. This file may only be used in tests.
-#include "base/android/jni_android.h"
-#include "webrtc/base/checks.h"
-#include "webrtc/modules/video_capture/video_capture_internal.h"
-
-namespace webrtc {
-namespace videocapturemodule {
-
-static pthread_once_t g_initialize_once = PTHREAD_ONCE_INIT;
-
-void EnsureInitializedOnce() {
- JNIEnv* jni = ::base::android::AttachCurrentThread();
- jobject context = ::base::android::GetApplicationContext();
- JavaVM* jvm = NULL;
- RTC_CHECK_EQ(0, jni->GetJavaVM(&jvm));
- RTC_CHECK_EQ(0, webrtc::SetCaptureAndroidVM(jvm, context));
-}
-
-void EnsureInitialized() {
- RTC_CHECK_EQ(0, pthread_once(&g_initialize_once, &EnsureInitializedOnce));
-}
-
-} // namespace videocapturemodule
-} // namespace webrtc
-
-#endif // !ANDROID
« no previous file with comments | « webrtc/modules/video_capture/ensure_initialized.h ('k') | webrtc/modules/video_capture/test/video_capture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698