* Add include_internal_video_capture and include_internal_video_render to include/exclude the internal VCM and VRM.

* Split the WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER into WEBRTC_INCLUDE_INTERNAL_VIDEO_CAPTURE and WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER.
* Add DummyDeviceInfo for the case when WEBRTC_INCLUDE_INTERNAL_VIDEO_CAPTURE is not defined.
Review URL: http://webrtc-codereview.appspot.com/224005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@778 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org 2011-10-19 18:42:17 +00:00
parent 509c9c5d09
commit f3f2f6abdb
11 changed files with 255 additions and 197 deletions

View File

@ -60,6 +60,12 @@
# Exclude internal ADM since Chromium uses its own IO handling. # Exclude internal ADM since Chromium uses its own IO handling.
'include_internal_audio_device%': 0, 'include_internal_audio_device%': 0,
# Exclude internal VCM on Chromium build
'include_internal_video_capture%': 0,
# Exclude internal video render module on Chromium build
'include_internal_video_render%': 0,
'webrtc_root%': '<(DEPTH)/third_party/webrtc', 'webrtc_root%': '<(DEPTH)/third_party/webrtc',
}, { }, {
# Settings for the standalone (not-in-Chromium) build. # Settings for the standalone (not-in-Chromium) build.
@ -67,6 +73,10 @@
'include_internal_audio_device%': 1, 'include_internal_audio_device%': 1,
'include_internal_video_capture%': 1,
'include_internal_video_render%': 1,
'webrtc_root%': '<(DEPTH)/src', 'webrtc_root%': '<(DEPTH)/src',
}], }],
], # conditions ], # conditions
@ -102,11 +112,6 @@
'WEBRTC_TARGET_PC', 'WEBRTC_TARGET_PC',
], ],
}], }],
['build_with_chromium==1', {
'defines': [
'WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER',
],
}],
], # conditions ], # conditions
'target_conditions': [ 'target_conditions': [

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2011 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.
*/
#include "../device_info_impl.h"
#include "../video_capture_impl.h"
namespace webrtc {
namespace videocapturemodule {
class ExternalDeviceInfo : public DeviceInfoImpl {
public:
ExternalDeviceInfo(const WebRtc_Word32 id)
: DeviceInfoImpl(id) {
}
virtual ~ExternalDeviceInfo() {}
virtual WebRtc_UWord32 NumberOfDevices() { return 0; }
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
const WebRtc_UWord8* /*deviceUniqueIdUTF8*/,
const WebRtc_UWord8* /*dialogTitleUTF8*/,
void* /*parentWindow*/,
WebRtc_UWord32 /*positionX*/,
WebRtc_UWord32 /*positionY*/) { return -1; }
virtual WebRtc_Word32 GetDeviceName(
WebRtc_UWord32 deviceNumber,
WebRtc_UWord8* deviceNameUTF8,
WebRtc_UWord32 deviceNameLength,
WebRtc_UWord8* deviceUniqueIdUTF8,
WebRtc_UWord32 deviceUniqueIdUTF8Length,
WebRtc_UWord8* productUniqueIdUTF8=0,
WebRtc_UWord32 productUniqueIdUTF8Length=0) {
return -1;
}
virtual WebRtc_Word32 CreateCapabilityMap(
const WebRtc_UWord8* deviceUniqueIdUTF8) { return 0; }
virtual WebRtc_Word32 Init() { return 0; }
};
VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo(
const WebRtc_Word32 id) {
return new ExternalDeviceInfo(id);
}
} // namespace videocapturemodule
} // namespace webrtc

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2011 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.
*/
#include "../video_capture_impl.h"
#include "ref_count.h"
namespace webrtc {
namespace videocapturemodule {
VideoCaptureModule* VideoCaptureImpl::Create(
const WebRtc_Word32 id,
const WebRtc_UWord8* deviceUniqueIdUTF8) {
RefCountImpl<VideoCaptureImpl>* implementation =
new RefCountImpl<VideoCaptureImpl>(id);
return implementation;
}
} // namespace videocapturemodule
} // namespace webrtc

View File

@ -46,9 +46,16 @@
'vplib_conversions.cc', 'vplib_conversions.cc',
'device_info_impl.cc', 'device_info_impl.cc',
], ],
'conditions': [
['include_internal_video_capture==0', {
'sources': [
'External/device_info_external.cc',
'External/video_capture_external.cc',
],
},{ # include_internal_video_capture == 1
'conditions': [ 'conditions': [
# DEFINE PLATFORM SPECIFIC SOURCE FILES # DEFINE PLATFORM SPECIFIC SOURCE FILES
['OS=="linux" and build_with_chromium==0', { ['OS=="linux"', {
'include_dirs': [ 'include_dirs': [
'Linux', 'Linux',
], ],
@ -58,8 +65,8 @@
'Linux/device_info_linux.cc', 'Linux/device_info_linux.cc',
'Linux/video_capture_linux.cc', 'Linux/video_capture_linux.cc',
], ],
}], }], # linux
['OS=="mac" and build_with_chromium==0', { ['OS=="mac"', {
'sources': [ 'sources': [
'Mac/QTKit/video_capture_recursive_lock.h', 'Mac/QTKit/video_capture_recursive_lock.h',
'Mac/QTKit/video_capture_qtkit.h', 'Mac/QTKit/video_capture_qtkit.h',
@ -84,8 +91,8 @@
], ],
}, },
}, },
}], }], # mac
['OS=="win" and build_with_chromium==0', { ['OS=="win"', {
'include_dirs': [ 'include_dirs': [
'Windows', 'Windows',
'<(direct_show_base_classes)', '<(direct_show_base_classes)',
@ -178,9 +185,10 @@
'AdditionalDependencies': 'Strmiids.lib', 'AdditionalDependencies': 'Strmiids.lib',
}, },
}, },
}], }], # win
], # conditions
}], # include_internal_video_capture
], # conditions ], # conditions
}, },
], ],
# Exclude the test targets when building with chromium. # Exclude the test targets when building with chromium.

View File

@ -36,10 +36,8 @@ using namespace std;
#include <stdio.h> #include <stdio.h>
#include "testExternalCapture.h" #include "testExternalCapture.h"
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
#include "testPlatformDependent.h" #include "testPlatformDependent.h"
#include "testCameraEncoder.h" #include "testCameraEncoder.h"
#endif
#if defined(_WIN32) #if defined(_WIN32)
int _tmain(int argc, _TCHAR* argv[]) int _tmain(int argc, _TCHAR* argv[])
@ -62,7 +60,6 @@ int main (int argc, const char * argv[])
printf("\nExternal capture test result %d\n",testResult); printf("\nExternal capture test result %d\n",testResult);
} }
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
{ {
webrtc::testPlatformDependent platformDependent; webrtc::testPlatformDependent platformDependent;
testResult=platformDependent.DoTest(); testResult=platformDependent.DoTest();
@ -74,7 +71,6 @@ int main (int argc, const char * argv[])
printf("\nCamera encoder test result %d\n",testResult); printf("\nCamera encoder test result %d\n",testResult);
} }
#endif
getchar(); getchar();

View File

@ -82,7 +82,12 @@
# TODO(andrew): with the proper suffix, these files will be excluded # TODO(andrew): with the proper suffix, these files will be excluded
# automatically. # automatically.
'conditions': [ 'conditions': [
['OS!="linux" or build_with_chromium==1', { ['include_internal_video_render==1', {
'defines': [
'WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',
],
}],
['OS!="linux" or include_internal_video_render==0', {
'sources!': [ 'sources!': [
'linux/video_render_linux_impl.h', 'linux/video_render_linux_impl.h',
'linux/video_x11_channel.h', 'linux/video_x11_channel.h',
@ -92,7 +97,7 @@
'linux/video_x11_render.cc', 'linux/video_x11_render.cc',
], ],
}], }],
['OS!="mac" or build_with_chromium==1', { ['OS!="mac" or include_internal_video_render==0', {
'sources!': [ 'sources!': [
'mac/cocoa_full_screen_window.h', 'mac/cocoa_full_screen_window.h',
'mac/cocoa_render_view.h', 'mac/cocoa_render_view.h',
@ -108,7 +113,7 @@
'mac/cocoa_full_screen_window.mm', 'mac/cocoa_full_screen_window.mm',
], ],
}], }],
['OS!="win" or build_with_chromium==1', { ['OS!="win" or include_internal_video_render==0', {
'sources!': [ 'sources!': [
'windows/i_video_render_win.h', 'windows/i_video_render_win.h',
'windows/video_render_direct3d9.h', 'windows/video_render_direct3d9.h',
@ -125,6 +130,11 @@
# Exclude the test target when building with chromium. # Exclude the test target when building with chromium.
'conditions': [ 'conditions': [
['include_internal_video_render==1', {
'defines': [
'WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER',
],
}],
['build_with_chromium==0', { ['build_with_chromium==0', {
'targets': [ 'targets': [
{ {

View File

@ -18,7 +18,7 @@
#include <cassert> #include <cassert>
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
#if defined (_WIN32) #if defined (_WIN32)
#include "windows/video_render_windows_impl.h" #include "windows/video_render_windows_impl.h"
@ -53,7 +53,7 @@
//Other platforms //Other platforms
#endif #endif
#endif // WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
// For external rendering // For external rendering
#include "external/video_render_external_impl.h" #include "external/video_render_external_impl.h"
@ -120,7 +120,7 @@ ModuleVideoRenderImpl::ModuleVideoRenderImpl(
// Create platform specific renderer // Create platform specific renderer
switch (videoRenderType) switch (videoRenderType)
{ {
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
#if defined(_WIN32) #if defined(_WIN32)
case kRenderWindows: case kRenderWindows:
@ -210,7 +210,7 @@ ModuleVideoRenderImpl::ModuleVideoRenderImpl(
// Other platforms // Other platforms
#endif #endif
#endif // WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
case kRenderExternal: case kRenderExternal:
{ {
VideoRenderExternalImpl* ptrRenderer(NULL); VideoRenderExternalImpl* ptrRenderer(NULL);
@ -264,7 +264,7 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl()
delete ptrRenderer; delete ptrRenderer;
} }
break; break;
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
#if defined(_WIN32) #if defined(_WIN32)
case kRenderWindows: case kRenderWindows:
@ -319,7 +319,7 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl()
//other platforms //other platforms
#endif #endif
#endif // WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #endif // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
default: default:
// Error... // Error...
@ -397,7 +397,7 @@ WebRtc_Word32 ModuleVideoRenderImpl::ChangeWindow(void* window)
WEBRTC_TRACE(kTraceModuleCall, kTraceVideoRenderer, _id, WEBRTC_TRACE(kTraceModuleCall, kTraceVideoRenderer, _id,
"%s", __FUNCTION__); "%s", __FUNCTION__);
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
#if defined(MAC_IPHONE) // MAC_IPHONE must go before WEBRTC_MAC or WEBRTC_MAC_INTEL #if defined(MAC_IPHONE) // MAC_IPHONE must go before WEBRTC_MAC or WEBRTC_MAC_INTEL
_ptrRenderer = NULL; _ptrRenderer = NULL;
@ -442,7 +442,7 @@ WebRtc_Word32 ModuleVideoRenderImpl::ChangeWindow(void* window)
#endif #endif
#else // WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER #else // WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
return -1; return -1;
#endif #endif
} }

View File

@ -362,7 +362,7 @@ int TestSingleStream(VideoRender* renderModule) {
VideoRenderCallback* renderCallback0 = renderModule->AddIncomingRenderStream(streamId0, 0, 0.0f, 0.0f, 1.0f, 1.0f); VideoRenderCallback* renderCallback0 = renderModule->AddIncomingRenderStream(streamId0, 0, 0.0f, 0.0f, 1.0f, 1.0f);
assert(renderCallback0 != NULL); assert(renderCallback0 != NULL);
#if defined (WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER) #ifndef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
MyRenderCallback externalRender; MyRenderCallback externalRender;
renderModule->AddExternalRenderCallback(streamId0, &externalRender); renderModule->AddExternalRenderCallback(streamId0, &externalRender);
#endif #endif
@ -407,8 +407,6 @@ int TestSingleStream(VideoRender* renderModule) {
int TestFullscreenStream(VideoRender* &renderModule, int TestFullscreenStream(VideoRender* &renderModule,
void* window, void* window,
const VideoRenderType videoRenderType) { const VideoRenderType videoRenderType) {
int error = 0;
VideoRender::DestroyVideoRender(renderModule); VideoRender::DestroyVideoRender(renderModule);
renderModule = VideoRender::CreateVideoRender(12345, window, true, videoRenderType); renderModule = VideoRender::CreateVideoRender(12345, window, true, videoRenderType);
@ -492,7 +490,6 @@ int TestBitmapText(VideoRender* renderModule) {
} }
int TestMultipleStreams(VideoRender* renderModule) { int TestMultipleStreams(VideoRender* renderModule) {
int error = 0;
// Add settings for a stream to render // Add settings for a stream to render
printf("Add stream 0\n"); printf("Add stream 0\n");
const int streamId0 = 0; const int streamId0 = 0;
@ -665,7 +662,7 @@ int main (int argc, const char * argv[])
window = (void*)testWindow; window = (void*)testWindow;
#endif #endif
#if defined (WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER) #ifndef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
windowType = kRenderExternal; windowType = kRenderExternal;
#endif #endif

View File

@ -204,7 +204,6 @@ WebRtc_Word32 ViECapturer::Init(const WebRtc_UWord8* deviceUniqueIdUTF8,
const WebRtc_UWord32 deviceUniqueIdUTF8Length) const WebRtc_UWord32 deviceUniqueIdUTF8Length)
{ {
assert(_captureModule == NULL); assert(_captureModule == NULL);
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
if (deviceUniqueIdUTF8 == NULL) if (deviceUniqueIdUTF8 == NULL)
{ {
_captureModule = VideoCaptureFactory::Create( _captureModule = VideoCaptureFactory::Create(
@ -214,7 +213,6 @@ WebRtc_Word32 ViECapturer::Init(const WebRtc_UWord8* deviceUniqueIdUTF8,
_captureModule = VideoCaptureFactory::Create( _captureModule = VideoCaptureFactory::Create(
ViEModuleId(_engineId, _captureId), deviceUniqueIdUTF8); ViEModuleId(_engineId, _captureId), deviceUniqueIdUTF8);
} }
#endif
if (!_captureModule) if (!_captureModule)
return -1; return -1;
_captureModule->AddRef(); _captureModule->AddRef();

View File

@ -54,13 +54,9 @@ ViEInputManager::ViEInputManager(const int engineId)
{ {
_freeCaptureDeviceId[idx] = true; _freeCaptureDeviceId[idx] = true;
} }
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
_ptrCaptureDeviceInfo=NULL;
#else
_ptrCaptureDeviceInfo = _ptrCaptureDeviceInfo =
VideoCaptureFactory::CreateDeviceInfo( VideoCaptureFactory::CreateDeviceInfo(
ViEModuleId(_engineId)); ViEModuleId(_engineId));
#endif
for (int idx = 0; idx < kViEMaxFilePlayers; idx++) for (int idx = 0; idx < kViEMaxFilePlayers; idx++)
{ {
_freeFileId[idx] = true; _freeFileId[idx] = true;
@ -87,13 +83,11 @@ ViEInputManager::~ViEInputManager()
} }
delete &_mapCritsect; delete &_mapCritsect;
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
if (_ptrCaptureDeviceInfo) if (_ptrCaptureDeviceInfo)
{ {
delete _ptrCaptureDeviceInfo; delete _ptrCaptureDeviceInfo;
_ptrCaptureDeviceInfo = NULL; _ptrCaptureDeviceInfo = NULL;
} }
#endif
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -116,9 +110,6 @@ int ViEInputManager::NumberOfCaptureDevices()
{ {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s", WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s",
__FUNCTION__); __FUNCTION__);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return 0;
#endif
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
return _ptrCaptureDeviceInfo->NumberOfDevices(); return _ptrCaptureDeviceInfo->NumberOfDevices();
} }
@ -135,9 +126,6 @@ int ViEInputManager::GetDeviceName(WebRtc_UWord32 deviceNumber,
{ {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceNumber: %d)", __FUNCTION__, deviceNumber); "%s(deviceNumber: %d)", __FUNCTION__, deviceNumber);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return 0;
#endif
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
return _ptrCaptureDeviceInfo->GetDeviceName(deviceNumber, deviceNameUTF8, return _ptrCaptureDeviceInfo->GetDeviceName(deviceNumber, deviceNameUTF8,
deviceNameLength, deviceNameLength,
@ -154,9 +142,6 @@ int ViEInputManager::GetDeviceName(WebRtc_UWord32 deviceNumber,
int ViEInputManager::NumberOfCaptureCapabilities( int ViEInputManager::NumberOfCaptureCapabilities(
const WebRtc_UWord8* deviceUniqueIdUTF8) const WebRtc_UWord8* deviceUniqueIdUTF8)
{ {
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return 0;
#endif
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s", WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s",
__FUNCTION__); __FUNCTION__);
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
@ -174,14 +159,14 @@ int ViEInputManager::GetCaptureCapability(const WebRtc_UWord8* deviceUniqueIdUTF
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceUniqueIdUTF8: %s, deviceCapabilityNumber: %d)", "%s(deviceUniqueIdUTF8: %s, deviceCapabilityNumber: %d)",
__FUNCTION__, deviceUniqueIdUTF8, deviceCapabilityNumber); __FUNCTION__, deviceUniqueIdUTF8, deviceCapabilityNumber);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return -1;
#endif
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
VideoCaptureCapability moduleCapability; VideoCaptureCapability moduleCapability;
int result = _ptrCaptureDeviceInfo->GetCapability(deviceUniqueIdUTF8, int result = _ptrCaptureDeviceInfo->GetCapability(deviceUniqueIdUTF8,
deviceCapabilityNumber, deviceCapabilityNumber,
moduleCapability); moduleCapability);
if (result != 0)
return result;
// Copy from module type to public type // Copy from module type to public type
capability.expectedCaptureDelay = moduleCapability.expectedCaptureDelay; capability.expectedCaptureDelay = moduleCapability.expectedCaptureDelay;
capability.height = moduleCapability.height; capability.height = moduleCapability.height;
@ -198,9 +183,6 @@ int ViEInputManager::GetOrientation(const WebRtc_UWord8* deviceUniqueIdUTF8,
{ {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceUniqueIdUTF8: %s,)", __FUNCTION__, deviceUniqueIdUTF8); "%s(deviceUniqueIdUTF8: %s,)", __FUNCTION__, deviceUniqueIdUTF8);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return -1;
#endif
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
VideoCaptureRotation moduleOrientation; VideoCaptureRotation moduleOrientation;
int result = _ptrCaptureDeviceInfo->GetOrientation(deviceUniqueIdUTF8, int result = _ptrCaptureDeviceInfo->GetOrientation(deviceUniqueIdUTF8,
@ -239,9 +221,6 @@ int ViEInputManager::DisplayCaptureSettingsDialogBox(
WebRtc_UWord32 positionX, WebRtc_UWord32 positionX,
WebRtc_UWord32 positionY) WebRtc_UWord32 positionY)
{ {
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
return -1;
#endif
assert(_ptrCaptureDeviceInfo); assert(_ptrCaptureDeviceInfo);
return _ptrCaptureDeviceInfo->DisplayCaptureSettingsDialogBox( return _ptrCaptureDeviceInfo->DisplayCaptureSettingsDialogBox(
deviceUniqueIdUTF8, deviceUniqueIdUTF8,
@ -263,12 +242,6 @@ int ViEInputManager::CreateCaptureDevice(const WebRtc_UWord8* deviceUniqueIdUTF8
{ {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceUniqueId: %s)", __FUNCTION__, deviceUniqueIdUTF8); "%s(deviceUniqueId: %s)", __FUNCTION__, deviceUniqueIdUTF8);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceUniqueId: Only external capture modules can be used.) "
, __FUNCTION__);
return -1;
#endif
CriticalSectionScoped cs(_mapCritsect); CriticalSectionScoped cs(_mapCritsect);
// Make sure the device is not already allocated // Make sure the device is not already allocated
@ -455,12 +428,6 @@ int ViEInputManager::CreateExternalCaptureDevice(ViEExternalCapture*& externalCa
{ {
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s", WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId), "%s",
__FUNCTION__); __FUNCTION__);
#ifdef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, ViEId(_engineId),
"%s(deviceUniqueId: Only external capture modules can be used.) "
, __FUNCTION__);
return -1;
#endif
CriticalSectionScoped cs(_mapCritsect); CriticalSectionScoped cs(_mapCritsect);
int newcaptureId = 0; int newcaptureId = 0;

View File

@ -173,11 +173,7 @@ ViERenderer* ViERenderManager::AddRenderStream(const WebRtc_Word32 renderId,
if (ptrRenderer == NULL) if (ptrRenderer == NULL)
{ {
// No render module for this window, create a new one // No render module for this window, create a new one
#ifndef WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
ptrRenderer = VideoRender::CreateVideoRender(ViEModuleId(_engineId, -1), window, false); ptrRenderer = VideoRender::CreateVideoRender(ViEModuleId(_engineId, -1), window, false);
#else
ptrRenderer = VideoRender::CreateVideoRender(ViEModuleId(_engineId, -1), window, false, kRenderExternal);
#endif //WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER
if (!ptrRenderer) if (!ptrRenderer)
{ {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, ViEId(_engineId), "Could not create new render module"); WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo, ViEId(_engineId), "Could not create new render module");