Move the SetAndroidObjects to VideoCaptureFactory so that ViE can get access to it.
Review URL: http://webrtc-codereview.appspot.com/244002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@852 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f1a45d77fb
commit
e9f909b575
@ -36,6 +36,10 @@ class VideoCaptureFactory {
|
||||
static VideoCaptureModule::DeviceInfo* CreateDeviceInfo(
|
||||
const WebRtc_Word32 id);
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
static WebRtc_Word32 SetAndroidObjects(void* javaVM, void* javaContext);
|
||||
#endif
|
||||
|
||||
private:
|
||||
~VideoCaptureFactory();
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ LOCAL_SRC_FILES := \
|
||||
video_capture_impl.cc \
|
||||
vplib_conversions.cc \
|
||||
device_info_impl.cc \
|
||||
video_capture_factory.cc \
|
||||
Android/video_capture_android.cc \
|
||||
Android/device_info_android.cc
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
#include "video_capture_factory.h"
|
||||
#include "video_capture_impl.h"
|
||||
#ifdef WEBRTC_ANDROID
|
||||
#include "video_capture_android.h"
|
||||
#endif
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
@ -29,4 +32,12 @@ VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo(
|
||||
return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo(id);
|
||||
}
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
WebRtc_Word32 VideoCaptureFactory::SetAndroidObjects(void* javaVM,
|
||||
void* javaContext) {
|
||||
return videocapturemodule::VideoCaptureAndroid::SetAndroidObjects(javaVM,
|
||||
javaContext);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -35,14 +35,6 @@ VideoCaptureModule* VideoCaptureImpl::Create(
|
||||
return implementation;
|
||||
}
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
WebRtc_Word32 VideoCaptureImpl::SetAndroidObjects(void* javaVM,void* javaContext)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceModuleCall, webrtc::kTraceVideoCapture, 0, "SetAndroidObjects");
|
||||
return videocapturemodule::VideoCaptureAndroid::SetAndroidObjects(javaVM,javaContext);
|
||||
}
|
||||
#endif
|
||||
|
||||
WebRtc_Word32 VideoCaptureImpl::Version(WebRtc_Word8* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position) const
|
||||
|
@ -50,10 +50,6 @@ public:
|
||||
|
||||
static DeviceInfo* CreateDeviceInfo(const WebRtc_Word32 id);
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
static WebRtc_Word32 SetAndroidObjects(void* javaVM, void* javaContext);
|
||||
#endif
|
||||
|
||||
static WebRtc_Word32 GetVersion(WebRtc_Word8* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position);
|
||||
|
@ -65,6 +65,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/../../../modules/utility/interface \
|
||||
$(LOCAL_PATH)/../../../modules/video_capture/main/interface \
|
||||
$(LOCAL_PATH)/../../../modules/video_capture/main/source \
|
||||
$(LOCAL_PATH)/../../../modules/video_capture/main/source/Android \
|
||||
$(LOCAL_PATH)/../../../modules/video_coding/codecs/interface \
|
||||
$(LOCAL_PATH)/../../../modules/video_coding/main/interface \
|
||||
$(LOCAL_PATH)/../../../modules/video_mixer/main/interface \
|
||||
|
@ -21,7 +21,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
#include "video_capture.h"
|
||||
#include "video_capture_factory.h"
|
||||
#include "video_render.h"
|
||||
#endif
|
||||
|
||||
@ -281,7 +281,7 @@ int VideoEngine::SetAndroidObjects(void* javaVM, void* javaContext)
|
||||
"SetAndroidObjects()");
|
||||
|
||||
#ifdef WEBRTC_ANDROID
|
||||
if (videocapturemodule::VideoCaptureImpl::SetAndroidObjects(javaVM,javaContext) != 0)
|
||||
if (VideoCaptureFactory::SetAndroidObjects(javaVM,javaContext) != 0)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, gViEActiveInstanceCounter,
|
||||
"Could not set capture module Android objects");
|
||||
@ -295,6 +295,8 @@ int VideoEngine::SetAndroidObjects(void* javaVM, void* javaContext)
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, gViEActiveInstanceCounter,
|
||||
"WEBRTC_ANDROID not defined for VideoEngine::SetAndroidObjects");
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user