Correct wrong usage of WebRtc_Word8 in video capture
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1811 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -32,42 +32,42 @@ class VideoCaptureModule: public RefCountedModule {
|
||||
// Null terminated otherwise.
|
||||
virtual WebRtc_Word32 GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8 = 0,
|
||||
char* productUniqueIdUTF8 = 0,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length = 0) = 0;
|
||||
|
||||
|
||||
// Returns the number of capabilities this device.
|
||||
virtual WebRtc_Word32 NumberOfCapabilities(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8) = 0;
|
||||
const char* deviceUniqueIdUTF8) = 0;
|
||||
|
||||
// Gets the capabilities of the named device.
|
||||
virtual WebRtc_Word32 GetCapability(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability) = 0;
|
||||
|
||||
// Gets clockwise angle the captured frames should be rotated in order
|
||||
// to be displayed correctly on a normally rotated display.
|
||||
virtual WebRtc_Word32 GetOrientation(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation) = 0;
|
||||
|
||||
// Gets the capability that best matches the requested width, height and
|
||||
// frame rate.
|
||||
// Returns the deviceCapabilityNumber on success.
|
||||
virtual WebRtc_Word32 GetBestMatchedCapability(
|
||||
const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting) = 0;
|
||||
|
||||
// Display OS /capture device specific settings dialog
|
||||
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8,
|
||||
void* parentWindow,
|
||||
WebRtc_UWord32 positionX,
|
||||
WebRtc_UWord32 positionY) = 0;
|
||||
@@ -125,7 +125,7 @@ class VideoCaptureModule: public RefCountedModule {
|
||||
virtual WebRtc_Word32 StopSendImage() = 0;
|
||||
|
||||
// Returns the name of the device used by this module.
|
||||
virtual const WebRtc_UWord8* CurrentDeviceName() const = 0;
|
||||
virtual const char* CurrentDeviceName() const = 0;
|
||||
|
||||
// Returns true if the capture device is running
|
||||
virtual bool CaptureStarted() = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -25,7 +25,7 @@ class VideoCaptureFactory {
|
||||
// deviceUniqueIdUTF8 - name of the device.
|
||||
// Available names can be found by using GetDeviceName
|
||||
static VideoCaptureModule* Create(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
const char* deviceUniqueIdUTF8);
|
||||
|
||||
// Create a video capture module object used for external capture.
|
||||
// id - unique identifier of this video capture module object
|
||||
|
||||
@@ -86,11 +86,11 @@ WebRtc_UWord32 DeviceInfoAndroid::NumberOfDevices()
|
||||
|
||||
WebRtc_Word32 DeviceInfoAndroid::GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* /*productUniqueIdUTF8*/,
|
||||
char* /*productUniqueIdUTF8*/,
|
||||
WebRtc_UWord32 /*productUniqueIdUTF8Length*/)
|
||||
{
|
||||
|
||||
@@ -172,7 +172,7 @@ WebRtc_Word32 DeviceInfoAndroid::GetDeviceName(
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
|
||||
MapItem* item = NULL;
|
||||
@@ -277,7 +277,7 @@ WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
|
||||
}
|
||||
|
||||
_lastUsedDeviceNameLength = strlen((char*) deviceUniqueIdUTF8);
|
||||
_lastUsedDeviceName = (WebRtc_UWord8*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceName = (char*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceNameLength + 1);
|
||||
memcpy(_lastUsedDeviceName,
|
||||
deviceUniqueIdUTF8,
|
||||
@@ -291,7 +291,7 @@ WebRtc_Word32 DeviceInfoAndroid::CreateCapabilityMap(
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoAndroid::GetOrientation(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation)
|
||||
{
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -12,8 +12,8 @@
|
||||
#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_ANDROID_DEVICE_INFO_ANDROID_H_
|
||||
|
||||
#include <jni.h>
|
||||
#include "video_capture_impl.h"
|
||||
#include "device_info_impl.h"
|
||||
#include "../video_capture_impl.h"
|
||||
#include "../device_info_impl.h"
|
||||
|
||||
#define AndroidJavaCaptureDeviceInfoClass "org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid"
|
||||
#define AndroidJavaCaptureCapabilityClass "org/webrtc/videoengine/CaptureCapabilityAndroid"
|
||||
@@ -36,21 +36,21 @@ public:
|
||||
virtual ~DeviceInfoAndroid();
|
||||
virtual WebRtc_UWord32 NumberOfDevices();
|
||||
virtual WebRtc_Word32 GetDeviceName(WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8 = 0,
|
||||
char* productUniqueIdUTF8 = 0,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length = 0);
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(const char* deviceUniqueIdUTF8);
|
||||
|
||||
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* /*deviceUniqueIdUTF8*/,
|
||||
const WebRtc_UWord8* /*dialogTitleUTF8*/,
|
||||
const char* /*deviceUniqueIdUTF8*/,
|
||||
const char* /*dialogTitleUTF8*/,
|
||||
void* /*parentWindow*/,
|
||||
WebRtc_UWord32 /*positionX*/,
|
||||
WebRtc_UWord32 /*positionY*/){return -1;}
|
||||
virtual WebRtc_Word32 GetOrientation(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
virtual WebRtc_Word32 GetOrientation(const char* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation);
|
||||
private:
|
||||
bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace videocapturemodule
|
||||
{
|
||||
VideoCaptureModule* VideoCaptureImpl::Create(
|
||||
const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
|
||||
RefCountImpl<videocapturemodule::VideoCaptureAndroid>* implementation =
|
||||
@@ -299,16 +299,16 @@ VideoCaptureAndroid::VideoCaptureAndroid(const WebRtc_Word32 id)
|
||||
// VideoCaptureAndroid.java
|
||||
// ----------------------------------------------------------------------------
|
||||
WebRtc_Word32 VideoCaptureAndroid::Init(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
const int nameLength = strlen((char*) deviceUniqueIdUTF8);
|
||||
const int nameLength = strlen(deviceUniqueIdUTF8);
|
||||
if (nameLength >= kVideoCaptureUniqueNameLength)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Store the device name
|
||||
_deviceUniqueId = new WebRtc_UWord8[nameLength + 1];
|
||||
_deviceUniqueId = new char[nameLength + 1];
|
||||
memcpy(_deviceUniqueId, deviceUniqueIdUTF8, nameLength + 1);
|
||||
|
||||
if (_capInfo.Init() != 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <jni.h>
|
||||
#include "device_info_android.h"
|
||||
#include "video_capture_impl.h"
|
||||
#include "../video_capture_impl.h"
|
||||
|
||||
#define AndroidJavaCaptureClass "org/webrtc/videoengine/VideoCaptureAndroid"
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
VideoCaptureAndroid(const WebRtc_Word32 id);
|
||||
virtual WebRtc_Word32 Init(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
const char* deviceUniqueIdUTF8);
|
||||
|
||||
|
||||
virtual WebRtc_Word32 StartCapture(const VideoCaptureCapability& capability);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -30,16 +30,16 @@ class ExternalDeviceInfo : public DeviceInfoImpl {
|
||||
WebRtc_UWord32 /*positionY*/) { return -1; }
|
||||
virtual WebRtc_Word32 GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8=0,
|
||||
char* productUniqueIdUTF8=0,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length=0) {
|
||||
return -1;
|
||||
}
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8) { return 0; }
|
||||
const char* deviceUniqueIdUTF8) { return 0; }
|
||||
virtual WebRtc_Word32 Init() { return 0; }
|
||||
};
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@ WebRtc_UWord32 DeviceInfoLinux::NumberOfDevices()
|
||||
|
||||
WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* /*productUniqueIdUTF8*/,
|
||||
char* /*productUniqueIdUTF8*/,
|
||||
WebRtc_UWord32 /*productUniqueIdUTF8Length*/)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceApiCall, webrtc::kTraceVideoCapture, _id, "%s", __FUNCTION__);
|
||||
@@ -161,7 +161,7 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
int fd;
|
||||
char device[32];
|
||||
@@ -232,7 +232,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
|
||||
|
||||
// Store the new used device name
|
||||
_lastUsedDeviceNameLength = deviceUniqueIdUTF8Length;
|
||||
_lastUsedDeviceName = (WebRtc_UWord8*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceName = (char*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceNameLength + 1);
|
||||
memcpy(_lastUsedDeviceName, deviceUniqueIdUTF8, _lastUsedDeviceNameLength + 1);
|
||||
|
||||
@@ -243,7 +243,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
|
||||
}
|
||||
|
||||
bool DeviceInfoLinux::IsDeviceNameMatches(const char* name,
|
||||
const char* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
if (strncmp(deviceUniqueIdUTF8, name, strlen(name)) == 0)
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -24,22 +24,24 @@ public:
|
||||
DeviceInfoLinux(const WebRtc_Word32 id);
|
||||
virtual ~DeviceInfoLinux();
|
||||
virtual WebRtc_UWord32 NumberOfDevices();
|
||||
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);
|
||||
virtual WebRtc_Word32 GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
char* productUniqueIdUTF8=0,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length=0);
|
||||
/*
|
||||
* Fills the membervariable _captureCapabilities with capabilites for the given device name.
|
||||
*/
|
||||
virtual WebRtc_Word32 CreateCapabilityMap (const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
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 CreateCapabilityMap (const char* deviceUniqueIdUTF8);
|
||||
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
|
||||
const char* /*deviceUniqueIdUTF8*/,
|
||||
const char* /*dialogTitleUTF8*/,
|
||||
void* /*parentWindow*/,
|
||||
WebRtc_UWord32 /*positionX*/,
|
||||
WebRtc_UWord32 /*positionY*/) { return -1;}
|
||||
WebRtc_Word32 FillCapabilityMap(int fd);
|
||||
WebRtc_Word32 Init();
|
||||
private:
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace webrtc
|
||||
namespace videocapturemodule
|
||||
{
|
||||
VideoCaptureModule* VideoCaptureImpl::Create(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueId)
|
||||
const char* deviceUniqueId)
|
||||
{
|
||||
RefCountImpl<videocapturemodule::VideoCaptureModuleV4L2>* implementation =
|
||||
new RefCountImpl<videocapturemodule::VideoCaptureModuleV4L2>(id);
|
||||
@@ -62,10 +62,10 @@ VideoCaptureModuleV4L2::VideoCaptureModuleV4L2(const WebRtc_Word32 id)
|
||||
{
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureModuleV4L2::Init(const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
WebRtc_Word32 VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
int len = strlen((const char*) deviceUniqueIdUTF8);
|
||||
_deviceUniqueId = new (std::nothrow) WebRtc_UWord8[len + 1];
|
||||
_deviceUniqueId = new (std::nothrow) char[len + 1];
|
||||
if (_deviceUniqueId)
|
||||
{
|
||||
memcpy(_deviceUniqueId, deviceUniqueIdUTF8, len + 1);
|
||||
|
||||
@@ -25,7 +25,7 @@ class VideoCaptureModuleV4L2: public VideoCaptureImpl
|
||||
public:
|
||||
VideoCaptureModuleV4L2(WebRtc_Word32 id);
|
||||
virtual ~VideoCaptureModuleV4L2();
|
||||
virtual WebRtc_Word32 Init(const WebRtc_UWord8* deviceUniqueId);
|
||||
virtual WebRtc_Word32 Init(const char* deviceUniqueId);
|
||||
virtual WebRtc_Word32 StartCapture(const VideoCaptureCapability& capability);
|
||||
virtual WebRtc_Word32 StopCapture();
|
||||
virtual bool CaptureStarted();
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
* Gets the capabilities of the named device
|
||||
*/
|
||||
virtual WebRtc_Word32 GetCapability(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability);
|
||||
|
||||
/*
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
* Returns the deviceCapabilityNumber on success.
|
||||
*/
|
||||
virtual WebRtc_Word32 GetBestMatchedCapability(
|
||||
const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting);
|
||||
|
||||
@@ -79,13 +79,13 @@ public:
|
||||
* Display OS /capture device specific settings dialog
|
||||
*/
|
||||
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8, void* parentWindow,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8, void* parentWindow,
|
||||
WebRtc_UWord32 positionX, WebRtc_UWord32 positionY);
|
||||
|
||||
protected:
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
const char* deviceUniqueIdUTF8);
|
||||
|
||||
VideoCaptureMacQTKitInfoObjC* _captureInfo;
|
||||
};
|
||||
|
||||
@@ -48,9 +48,9 @@ WebRtc_UWord32 VideoCaptureMacQuickTimeInfo::NumberOfDevices()
|
||||
|
||||
// don't care about these variables... dummy vars to call GetCaptureDevices
|
||||
const int kNameLength = 1024;
|
||||
WebRtc_UWord8 deviceNameUTF8[kNameLength] = "";
|
||||
WebRtc_UWord8 deviceUniqueIdUTF8[kNameLength] = "";
|
||||
WebRtc_UWord8 productUniqueIdUTF8[kNameLength] = "";
|
||||
char deviceNameUTF8[kNameLength] = "";
|
||||
char deviceUniqueIdUTF8[kNameLength] = "";
|
||||
char productUniqueIdUTF8[kNameLength] = "";
|
||||
|
||||
if (GetCaptureDevices(0, deviceNameUTF8, kNameLength, deviceUniqueIdUTF8,
|
||||
kNameLength, productUniqueIdUTF8, kNameLength,
|
||||
@@ -63,9 +63,9 @@ WebRtc_UWord32 VideoCaptureMacQuickTimeInfo::NumberOfDevices()
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber, WebRtc_UWord8* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameUTF8Length, WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length, WebRtc_UWord8* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceNumber, char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameUTF8Length, char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length, char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetDeviceName(
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::NumberOfCapabilities(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
|
||||
"NumberOfCapabilities is not supported on the Mac platform.");
|
||||
@@ -85,7 +85,7 @@ WebRtc_Word32 VideoCaptureMacQuickTimeInfo::NumberOfCapabilities(
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetCapability(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetCapability(
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetBestMatchedCapability(
|
||||
const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const char*deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested, VideoCaptureCapability& resulting)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideoCapture, _id,
|
||||
@@ -104,15 +104,15 @@ WebRtc_Word32 VideoCaptureMacQuickTimeInfo::GetBestMatchedCapability(
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8, void* parentWindow,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8, void* parentWindow,
|
||||
WebRtc_UWord32 positionX, WebRtc_UWord32 positionY)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_Word32 VideoCaptureMacQuickTimeInfo::CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideoCapture, _id,
|
||||
"NumberOfCapabilities is not supported on the Mac platform.");
|
||||
@@ -120,9 +120,9 @@ WebRtc_Word32 VideoCaptureMacQuickTimeInfo::CreateCapabilityMap(
|
||||
}
|
||||
|
||||
int VideoCaptureMacQuickTimeInfo::GetCaptureDevices(
|
||||
WebRtc_UWord32 deviceNumber, WebRtc_UWord8* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameUTF8Length, WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length, WebRtc_UWord8* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceNumber, char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameUTF8Length, char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length, char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length, int& numberOfDevices)
|
||||
{
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
* Gets the capabilities of the named device
|
||||
*/
|
||||
virtual WebRtc_Word32 GetCapability(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability);
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
* Returns the deviceCapabilityNumber on success.
|
||||
*/
|
||||
virtual WebRtc_Word32 GetBestMatchedCapability(
|
||||
const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting);
|
||||
|
||||
@@ -91,13 +91,13 @@ public:
|
||||
* Display OS /capture device specific settings dialog
|
||||
*/
|
||||
virtual WebRtc_Word32 DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8, void* parentWindow,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8, void* parentWindow,
|
||||
WebRtc_UWord32 positionX, WebRtc_UWord32 positionY);
|
||||
|
||||
protected:
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
const char* deviceUniqueIdUTF8);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -111,11 +111,11 @@ WebRtc_UWord32 DeviceInfoWindows::NumberOfDevices()
|
||||
}
|
||||
WebRtc_Word32 DeviceInfoWindows::GetDeviceName(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length)
|
||||
{
|
||||
ReadLockScoped cs(_apiLock);
|
||||
@@ -130,11 +130,11 @@ WebRtc_Word32 DeviceInfoWindows::GetDeviceName(
|
||||
|
||||
WebRtc_Word32 DeviceInfoWindows::GetDeviceInfo(
|
||||
WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length)
|
||||
|
||||
{
|
||||
@@ -256,8 +256,8 @@ WebRtc_Word32 DeviceInfoWindows::GetDeviceInfo(
|
||||
}
|
||||
|
||||
IBaseFilter * DeviceInfoWindows::GetDeviceFilter(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length)
|
||||
{
|
||||
|
||||
@@ -371,7 +371,7 @@ WebRtc_Word32 DeviceInfoWindows::GetWindowsCapability(
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoWindows::CreateCapabilityMap(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
|
||||
{
|
||||
// Reset old capability list
|
||||
@@ -394,7 +394,7 @@ WebRtc_Word32 DeviceInfoWindows::CreateCapabilityMap(
|
||||
"CreateCapabilityMap called for device %s", deviceUniqueIdUTF8);
|
||||
|
||||
|
||||
WebRtc_UWord8 productId[kVideoCaptureProductIdLength];
|
||||
char productId[kVideoCaptureProductIdLength];
|
||||
IBaseFilter* captureDevice = DeviceInfoWindows::GetDeviceFilter(
|
||||
deviceUniqueIdUTF8,
|
||||
productId,
|
||||
@@ -673,7 +673,7 @@ WebRtc_Word32 DeviceInfoWindows::CreateCapabilityMap(
|
||||
|
||||
// Store the new used device name
|
||||
_lastUsedDeviceNameLength = deviceUniqueIdUTF8Length;
|
||||
_lastUsedDeviceName = (WebRtc_UWord8*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceName = (char*) realloc(_lastUsedDeviceName,
|
||||
_lastUsedDeviceNameLength
|
||||
+ 1);
|
||||
memcpy(_lastUsedDeviceName, deviceUniqueIdUTF8, _lastUsedDeviceNameLength+ 1);
|
||||
@@ -689,8 +689,8 @@ WebRtc_Word32 DeviceInfoWindows::CreateCapabilityMap(
|
||||
"\\?\usb#vid_0408&pid_2010&mi_00#7&258e7aaf&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
|
||||
"\\?\avc#sony&dv-vcr&camcorder&dv#65b2d50301460008#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
|
||||
*/
|
||||
void DeviceInfoWindows::GetProductId(const WebRtc_UWord8* devicePath,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
void DeviceInfoWindows::GetProductId(const char* devicePath,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length)
|
||||
{
|
||||
*productUniqueIdUTF8 = '\0';
|
||||
@@ -730,8 +730,8 @@ void DeviceInfoWindows::GetProductId(const WebRtc_UWord8* devicePath,
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoWindows::DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8,
|
||||
void* parentWindow,
|
||||
WebRtc_UWord32 positionX,
|
||||
WebRtc_UWord32 positionY)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -47,11 +47,11 @@ public:
|
||||
*/
|
||||
virtual WebRtc_Word32
|
||||
GetDeviceName(WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length);
|
||||
|
||||
/*
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
*/
|
||||
virtual WebRtc_Word32
|
||||
DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord8* dialogTitleUTF8,
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const char* dialogTitleUTF8,
|
||||
void* parentWindow,
|
||||
WebRtc_UWord32 positionX,
|
||||
WebRtc_UWord32 positionY);
|
||||
@@ -70,29 +70,29 @@ public:
|
||||
/* Gets a capture device filter
|
||||
The user of this API is responsible for releasing the filter when it not needed.
|
||||
*/
|
||||
IBaseFilter * GetDeviceFilter(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord8* productUniqueIdUTF8 = NULL,
|
||||
IBaseFilter * GetDeviceFilter(const char* deviceUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8 = NULL,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length = 0);
|
||||
|
||||
WebRtc_Word32
|
||||
GetWindowsCapability(const WebRtc_Word32 capabilityIndex,
|
||||
VideoCaptureCapabilityWindows& windowsCapability);
|
||||
|
||||
static void GetProductId(const WebRtc_UWord8* devicePath,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
static void GetProductId(const char* devicePath,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length);
|
||||
protected:
|
||||
|
||||
WebRtc_Word32 GetDeviceInfo(WebRtc_UWord32 deviceNumber,
|
||||
WebRtc_UWord8* deviceNameUTF8,
|
||||
char* deviceNameUTF8,
|
||||
WebRtc_UWord32 deviceNameLength,
|
||||
WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
char* deviceUniqueIdUTF8,
|
||||
WebRtc_UWord32 deviceUniqueIdUTF8Length,
|
||||
WebRtc_UWord8* productUniqueIdUTF8,
|
||||
char* productUniqueIdUTF8,
|
||||
WebRtc_UWord32 productUniqueIdUTF8Length);
|
||||
|
||||
virtual WebRtc_Word32
|
||||
CreateCapabilityMap(const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
CreateCapabilityMap(const char* deviceUniqueIdUTF8);
|
||||
|
||||
private:
|
||||
ICreateDevEnum* _dsDevEnum;
|
||||
|
||||
@@ -43,7 +43,7 @@ DeviceInfoImpl::~DeviceInfoImpl(void)
|
||||
delete &_apiLock;
|
||||
}
|
||||
WebRtc_Word32 DeviceInfoImpl::NumberOfCapabilities(
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8)
|
||||
const char* deviceUniqueIdUTF8)
|
||||
{
|
||||
|
||||
if (!deviceUniqueIdUTF8)
|
||||
@@ -77,7 +77,7 @@ WebRtc_Word32 DeviceInfoImpl::NumberOfCapabilities(
|
||||
return ret;
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoImpl::GetCapability(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_Word32 DeviceInfoImpl::GetCapability(const char* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ WebRtc_Word32 DeviceInfoImpl::GetCapability(const WebRtc_UWord8* deviceUniqueIdU
|
||||
}
|
||||
|
||||
WebRtc_Word32 DeviceInfoImpl::GetBestMatchedCapability(
|
||||
const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const char*deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting)
|
||||
{
|
||||
@@ -314,7 +314,7 @@ WebRtc_Word32 DeviceInfoImpl::GetBestMatchedCapability(
|
||||
WebRtc_Word32 DeviceInfoImpl::GetExpectedCaptureDelay(
|
||||
const DelayValues delayValues[],
|
||||
const WebRtc_UWord32 sizeOfDelayValues,
|
||||
const WebRtc_UWord8* productId,
|
||||
const char* productId,
|
||||
const WebRtc_UWord32 width,
|
||||
const WebRtc_UWord32 height)
|
||||
{
|
||||
@@ -388,7 +388,7 @@ WebRtc_Word32 DeviceInfoImpl::GetExpectedCaptureDelay(
|
||||
}
|
||||
|
||||
//Default implementation. This should be overridden by Mobile implementations.
|
||||
WebRtc_Word32 DeviceInfoImpl::GetOrientation(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
WebRtc_Word32 DeviceInfoImpl::GetOrientation(const char* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation)
|
||||
{
|
||||
orientation = kCameraRotate0;
|
||||
|
||||
@@ -26,16 +26,19 @@ class DeviceInfoImpl: public VideoCaptureModule::DeviceInfo
|
||||
public:
|
||||
DeviceInfoImpl(const WebRtc_Word32 id);
|
||||
virtual ~DeviceInfoImpl(void);
|
||||
virtual WebRtc_Word32 NumberOfCapabilities(const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
virtual WebRtc_Word32 GetCapability(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability);
|
||||
virtual WebRtc_Word32 NumberOfCapabilities(const char* deviceUniqueIdUTF8);
|
||||
virtual WebRtc_Word32 GetCapability(
|
||||
const char* deviceUniqueIdUTF8,
|
||||
const WebRtc_UWord32 deviceCapabilityNumber,
|
||||
VideoCaptureCapability& capability);
|
||||
|
||||
virtual WebRtc_Word32 GetBestMatchedCapability(const WebRtc_UWord8*deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting);
|
||||
virtual WebRtc_Word32 GetOrientation(const WebRtc_UWord8* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation);
|
||||
virtual WebRtc_Word32 GetBestMatchedCapability(
|
||||
const char*deviceUniqueIdUTF8,
|
||||
const VideoCaptureCapability& requested,
|
||||
VideoCaptureCapability& resulting);
|
||||
virtual WebRtc_Word32 GetOrientation(
|
||||
const char* deviceUniqueIdUTF8,
|
||||
VideoCaptureRotation& orientation);
|
||||
|
||||
protected:
|
||||
/* Initialize this object*/
|
||||
@@ -44,12 +47,12 @@ protected:
|
||||
/*
|
||||
* Fills the member variable _captureCapabilities with capabilities for the given device name.
|
||||
*/
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(const WebRtc_UWord8* deviceUniqueIdUTF8)=0;
|
||||
virtual WebRtc_Word32 CreateCapabilityMap(const char* deviceUniqueIdUTF8)=0;
|
||||
|
||||
/* Returns the expected Capture delay*/
|
||||
WebRtc_Word32 GetExpectedCaptureDelay(const DelayValues delayValues[],
|
||||
const WebRtc_UWord32 sizeOfDelayValues,
|
||||
const WebRtc_UWord8* productId,
|
||||
const char* productId,
|
||||
const WebRtc_UWord32 width,
|
||||
const WebRtc_UWord32 height);
|
||||
protected:
|
||||
@@ -57,7 +60,7 @@ protected:
|
||||
WebRtc_Word32 _id;
|
||||
MapWrapper _captureCapabilities;
|
||||
RWLockWrapper& _apiLock;
|
||||
WebRtc_UWord8* _lastUsedDeviceName;
|
||||
char* _lastUsedDeviceName;
|
||||
WebRtc_UWord32 _lastUsedDeviceNameLength;
|
||||
};
|
||||
} //namespace videocapturemodule
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -18,7 +18,7 @@ namespace webrtc
|
||||
{
|
||||
|
||||
VideoCaptureModule* VideoCaptureFactory::Create(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8) {
|
||||
const char* deviceUniqueIdUTF8) {
|
||||
return videocapturemodule::VideoCaptureImpl::Create(id, deviceUniqueIdUTF8);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ VideoCaptureModule* VideoCaptureImpl::Create(
|
||||
return implementation;
|
||||
}
|
||||
|
||||
const WebRtc_UWord8* VideoCaptureImpl::CurrentDeviceName() const
|
||||
const char* VideoCaptureImpl::CurrentDeviceName() const
|
||||
{
|
||||
return _deviceUniqueId;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
* deviceUniqueIdUTF8 - name of the device. Available names can be found by using GetDeviceName
|
||||
*/
|
||||
static VideoCaptureModule* Create(const WebRtc_Word32 id,
|
||||
const WebRtc_UWord8* deviceUniqueIdUTF8);
|
||||
const char* deviceUniqueIdUTF8);
|
||||
|
||||
/*
|
||||
* Create a video capture module object used for external capture.
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
virtual WebRtc_Word32 EnableFrameRateCallback(const bool enable);
|
||||
virtual WebRtc_Word32 EnableNoPictureAlarm(const bool enable);
|
||||
|
||||
virtual const WebRtc_UWord8* CurrentDeviceName() const;
|
||||
virtual const char* CurrentDeviceName() const;
|
||||
|
||||
// Module handling
|
||||
virtual WebRtc_Word32 TimeUntilNextProcess();
|
||||
@@ -106,7 +106,7 @@ protected:
|
||||
WebRtc_Word64 capture_time, VideoCodecType codec_type);
|
||||
|
||||
WebRtc_Word32 _id; // Module ID
|
||||
WebRtc_UWord8* _deviceUniqueId; // current Device unique name;
|
||||
char* _deviceUniqueId; // current Device unique name;
|
||||
CriticalSectionWrapper& _apiCs;
|
||||
WebRtc_Word32 _captureDelay; // Current capture delay. May be changed of platform dependent parts.
|
||||
VideoCaptureCapability _requestedCapability; // Should be set by platform dependent code in StartCapture.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -203,8 +203,8 @@ class VideoCaptureTest : public testing::Test {
|
||||
webrtc::scoped_refptr<VideoCaptureModule> OpenVideoCaptureDevice(
|
||||
unsigned int device,
|
||||
VideoCaptureDataCallback* callback) {
|
||||
WebRtc_UWord8 device_name[256];
|
||||
WebRtc_UWord8 unique_name[256];
|
||||
char device_name[256];
|
||||
char unique_name[256];
|
||||
|
||||
EXPECT_EQ(0, device_info_->GetDeviceName(
|
||||
device, device_name, 256, unique_name, 256));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -19,7 +19,7 @@ void TestI420CallSetup(webrtc::ViECodec* codec_interface,
|
||||
webrtc::ViEBase* base_interface,
|
||||
webrtc::ViENetwork* network_interface,
|
||||
int video_channel,
|
||||
const unsigned char *device_name) {
|
||||
const char *device_name) {
|
||||
webrtc::VideoCodec video_codec;
|
||||
memset(&video_codec, 0, sizeof(webrtc::VideoCodec));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -27,6 +27,6 @@ void TestI420CallSetup(webrtc::ViECodec* codec_interface,
|
||||
webrtc::ViEBase* base_interface,
|
||||
webrtc::ViENetwork* network_interface,
|
||||
int video_channel,
|
||||
const unsigned char *device_name);
|
||||
const char *device_name);
|
||||
|
||||
#endif // SRC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_SOURCE_BASE_PRIMITIVES_H_
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "vie_to_file_renderer.h"
|
||||
|
||||
void FindCaptureDeviceOnSystem(webrtc::ViECapture* capture,
|
||||
unsigned char* device_name,
|
||||
char* device_name,
|
||||
unsigned int device_name_length,
|
||||
int* device_id,
|
||||
webrtc::VideoCaptureModule** device_video) {
|
||||
@@ -26,7 +26,7 @@ void FindCaptureDeviceOnSystem(webrtc::ViECapture* capture,
|
||||
webrtc::VideoCaptureFactory::CreateDeviceInfo(0);
|
||||
|
||||
const unsigned int kMaxUniqueIdLength = 256;
|
||||
WebRtc_UWord8 unique_id[kMaxUniqueIdLength];
|
||||
char unique_id[kMaxUniqueIdLength];
|
||||
memset(unique_id, 0, kMaxUniqueIdLength);
|
||||
|
||||
for (unsigned int i = 0; i < dev_info->NumberOfDevices(); i++) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -34,7 +34,7 @@ const int kDoNotForceResolution = 0;
|
||||
// parameters. If this operation fails, device_id is assigned a negative value
|
||||
// and number_of_errors is incremented.
|
||||
void FindCaptureDeviceOnSystem(webrtc::ViECapture* capture,
|
||||
unsigned char* device_name,
|
||||
char* device_name,
|
||||
const unsigned int kDeviceNameLength,
|
||||
int* device_id,
|
||||
webrtc::VideoCaptureModule** device_video);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -35,10 +35,10 @@ TbI420Encoder::~TbI420Encoder()
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_Word32 TbI420Encoder::VersionStatic(WebRtc_Word8* version,
|
||||
WebRtc_Word32 TbI420Encoder::VersionStatic(char* version,
|
||||
WebRtc_Word32 length)
|
||||
{
|
||||
const WebRtc_Word8* str = "I420 version 1.0.0\n";
|
||||
const char* str = "I420 version 1.0.0\n";
|
||||
WebRtc_Word32 verLen = (WebRtc_Word32) strlen(str);
|
||||
if (verLen > length)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ WebRtc_Word32 TbI420Encoder::VersionStatic(WebRtc_Word8* version,
|
||||
return verLen;
|
||||
}
|
||||
|
||||
WebRtc_Word32 TbI420Encoder::Version(WebRtc_Word8 *version,
|
||||
WebRtc_Word32 TbI420Encoder::Version(char *version,
|
||||
WebRtc_Word32 length) const
|
||||
{
|
||||
return VersionStatic(version, length);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -17,9 +17,9 @@ TbCaptureDevice::TbCaptureDevice(TbInterfaces& Engine) :
|
||||
{
|
||||
const unsigned int KMaxDeviceNameLength = 128;
|
||||
const unsigned int KMaxUniqueIdLength = 256;
|
||||
WebRtc_UWord8 deviceName[KMaxDeviceNameLength];
|
||||
char deviceName[KMaxDeviceNameLength];
|
||||
memset(deviceName, 0, KMaxDeviceNameLength);
|
||||
WebRtc_UWord8 uniqueId[KMaxUniqueIdLength];
|
||||
char uniqueId[KMaxUniqueIdLength];
|
||||
memset(uniqueId, 0, KMaxUniqueIdLength);
|
||||
|
||||
bool captureDeviceSet = false;
|
||||
|
||||
@@ -42,7 +42,7 @@ void ViEAutoTest::ViEBaseStandardTest() {
|
||||
|
||||
webrtc::VideoCaptureModule* video_capture_module(NULL);
|
||||
const unsigned int kMaxDeviceNameLength = 128;
|
||||
WebRtc_UWord8 device_name[kMaxDeviceNameLength];
|
||||
char device_name[kMaxDeviceNameLength];
|
||||
memset(device_name, 0, kMaxDeviceNameLength);
|
||||
int capture_id;
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ void ViEAutoTest::ViECaptureStandardTest()
|
||||
deviceIndex < numberOfCaptureDevices;
|
||||
++deviceIndex)
|
||||
{
|
||||
WebRtc_UWord8 deviceName[128];
|
||||
WebRtc_UWord8 deviceUniqueName[512];
|
||||
char deviceName[128];
|
||||
char deviceUniqueName[512];
|
||||
|
||||
EXPECT_EQ(0, devInfo->GetDeviceName(deviceIndex,
|
||||
deviceName,
|
||||
@@ -182,8 +182,8 @@ void ViEAutoTest::ViECaptureStandardTest()
|
||||
deviceIndex < numberOfCaptureDevices;
|
||||
++deviceIndex)
|
||||
{
|
||||
WebRtc_UWord8 deviceName[128];
|
||||
WebRtc_UWord8 deviceUniqueName[512];
|
||||
char deviceName[128];
|
||||
char deviceUniqueName[512];
|
||||
|
||||
EXPECT_EQ(0, devInfo->GetDeviceName(deviceIndex,
|
||||
deviceName,
|
||||
@@ -290,8 +290,8 @@ void ViEAutoTest::ViECaptureAPITest()
|
||||
|
||||
ViE.capture->NumberOfCaptureDevices();
|
||||
|
||||
WebRtc_UWord8 deviceName[128];
|
||||
WebRtc_UWord8 deviceUniqueName[512];
|
||||
char deviceName[128];
|
||||
char deviceUniqueName[512];
|
||||
int captureId = 0;
|
||||
|
||||
webrtc::VideoCaptureModule::DeviceInfo* devInfo =
|
||||
@@ -370,7 +370,7 @@ void ViEAutoTest::ViECaptureAPITest()
|
||||
|
||||
// Test GetOrientation.
|
||||
webrtc::VideoCaptureRotation orientation;
|
||||
WebRtc_UWord8 dummy_name[5];
|
||||
char dummy_name[5];
|
||||
EXPECT_NE(0, devInfo->GetOrientation(dummy_name, orientation));
|
||||
|
||||
// Test SetRotation.
|
||||
|
||||
@@ -55,8 +55,7 @@ bool ViEFileBasedComparisonTests::TestCallSetup(
|
||||
RenderToFile(render_interface, video_channel, remote_file_renderer);
|
||||
|
||||
// Run the test itself:
|
||||
const WebRtc_UWord8* device_name =
|
||||
reinterpret_cast<const WebRtc_UWord8*>("Fake Capture Device");
|
||||
const char* device_name = "Fake Capture Device";
|
||||
|
||||
::TestI420CallSetup(interfaces.codec, interfaces.video_engine,
|
||||
interfaces.base, interfaces.network, video_channel,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -97,8 +97,8 @@ int ViECaptureImpl::GetCaptureDevice(unsigned int list_number,
|
||||
}
|
||||
return shared_data_->input_manager()->GetDeviceName(
|
||||
list_number,
|
||||
reinterpret_cast<WebRtc_UWord8*>(device_nameUTF8), device_nameUTF8Length,
|
||||
reinterpret_cast<WebRtc_UWord8*>(unique_idUTF8), unique_idUTF8Length);
|
||||
device_nameUTF8, device_nameUTF8Length,
|
||||
unique_idUTF8, unique_idUTF8Length);
|
||||
}
|
||||
|
||||
int ViECaptureImpl::AllocateCaptureDevice(
|
||||
@@ -116,8 +116,9 @@ int ViECaptureImpl::AllocateCaptureDevice(
|
||||
}
|
||||
const WebRtc_Word32 result =
|
||||
shared_data_->input_manager()->CreateCaptureDevice(
|
||||
reinterpret_cast<const WebRtc_UWord8*>(unique_idUTF8),
|
||||
static_cast<const WebRtc_UWord32>(unique_idUTF8Length), capture_id);
|
||||
unique_idUTF8,
|
||||
static_cast<const WebRtc_UWord32>(unique_idUTF8Length),
|
||||
capture_id);
|
||||
if (result != 0) {
|
||||
shared_data_->SetLastError(result);
|
||||
return -1;
|
||||
@@ -431,7 +432,7 @@ int ViECaptureImpl::NumberOfCapabilities(
|
||||
return -1;
|
||||
}
|
||||
return shared_data_->input_manager()->NumberOfCaptureCapabilities(
|
||||
reinterpret_cast<const WebRtc_UWord8*>(unique_idUTF8));
|
||||
unique_idUTF8);
|
||||
}
|
||||
|
||||
|
||||
@@ -461,8 +462,7 @@ int ViECaptureImpl::GetCaptureCapability(const char* unique_idUTF8,
|
||||
return -1;
|
||||
}
|
||||
if (shared_data_->input_manager()->GetCaptureCapability(
|
||||
reinterpret_cast<const WebRtc_UWord8*>(unique_idUTF8),
|
||||
capability_number, capability) != 0) {
|
||||
unique_idUTF8, capability_number, capability) != 0) {
|
||||
shared_data_->SetLastError(kViECaptureDeviceUnknownError);
|
||||
return -1;
|
||||
}
|
||||
@@ -492,8 +492,7 @@ int ViECaptureImpl::ShowCaptureSettingsDialogBox(
|
||||
unique_idUTF8);
|
||||
|
||||
return shared_data_->input_manager()->DisplayCaptureSettingsDialogBox(
|
||||
reinterpret_cast<const WebRtc_UWord8*>(unique_idUTF8),
|
||||
reinterpret_cast<const WebRtc_UWord8*>(dialog_title),
|
||||
unique_idUTF8, dialog_title,
|
||||
parent_window, x, y);
|
||||
}
|
||||
|
||||
@@ -510,7 +509,7 @@ int ViECaptureImpl::GetOrientation(const char* unique_idUTF8,
|
||||
return -1;
|
||||
}
|
||||
if (shared_data_->input_manager()->GetOrientation(
|
||||
reinterpret_cast<const WebRtc_UWord8*>(unique_idUTF8),
|
||||
unique_idUTF8,
|
||||
orientation) != 0) {
|
||||
shared_data_->SetLastError(kViECaptureDeviceUnknownError);
|
||||
return -1;
|
||||
|
||||
@@ -152,7 +152,7 @@ WebRtc_Word32 ViECapturer::Init(VideoCaptureModule& capture_module) {
|
||||
ViECapturer* ViECapturer::CreateViECapture(
|
||||
int capture_id,
|
||||
int engine_id,
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_unique_idUTF8Length,
|
||||
ProcessThread& module_process_thread) {
|
||||
ViECapturer* capture = new ViECapturer(capture_id, engine_id,
|
||||
@@ -166,7 +166,7 @@ ViECapturer* ViECapturer::CreateViECapture(
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViECapturer::Init(
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_unique_idUTF8Length) {
|
||||
assert(capture_module_ == NULL);
|
||||
if (device_unique_idUTF8 == NULL) {
|
||||
@@ -269,7 +269,7 @@ bool ViECapturer::Started() {
|
||||
return capture_module_->CaptureStarted();
|
||||
}
|
||||
|
||||
const WebRtc_UWord8* ViECapturer::CurrentDeviceName() const {
|
||||
const char* ViECapturer::CurrentDeviceName() const {
|
||||
return capture_module_->CurrentDeviceName();
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ bool ViECapturer::CaptureCapabilityFixed() {
|
||||
requested_capability_.maxFPS != 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 ViECapturer::Version(WebRtc_Word8* version,
|
||||
WebRtc_Word32 ViECapturer::Version(char* version,
|
||||
WebRtc_Word32 length) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -49,7 +49,7 @@ class ViECapturer
|
||||
static ViECapturer* CreateViECapture(
|
||||
int capture_id,
|
||||
int engine_id,
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
WebRtc_UWord32 device_unique_idUTF8Length,
|
||||
ProcessThread& module_process_thread);
|
||||
|
||||
@@ -100,7 +100,7 @@ class ViECapturer
|
||||
bool IsObserverRegistered();
|
||||
|
||||
// Information.
|
||||
const WebRtc_UWord8* CurrentDeviceName() const;
|
||||
const char* CurrentDeviceName() const;
|
||||
|
||||
// Set device image.
|
||||
WebRtc_Word32 SetCaptureDeviceImage(const VideoFrame& capture_device_image);
|
||||
@@ -111,7 +111,7 @@ class ViECapturer
|
||||
ProcessThread& module_process_thread);
|
||||
|
||||
WebRtc_Word32 Init(VideoCaptureModule& capture_module);
|
||||
WebRtc_Word32 Init(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
WebRtc_Word32 Init(const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_unique_idUTF8Length);
|
||||
|
||||
// Implements VideoCaptureDataCallback.
|
||||
@@ -134,7 +134,7 @@ class ViECapturer
|
||||
WebRtc_Word32 DecImageProcRefCount();
|
||||
|
||||
// Implements VideoEncoder.
|
||||
virtual WebRtc_Word32 Version(WebRtc_Word8* version,
|
||||
virtual WebRtc_Word32 Version(char* version,
|
||||
WebRtc_Word32 length) const;
|
||||
virtual WebRtc_Word32 InitEncode(const VideoCodec* codec_settings,
|
||||
WebRtc_Word32 number_of_cores,
|
||||
|
||||
@@ -76,9 +76,9 @@ int ViEInputManager::NumberOfCaptureDevices() {
|
||||
}
|
||||
|
||||
int ViEInputManager::GetDeviceName(WebRtc_UWord32 device_number,
|
||||
WebRtc_UWord8* device_nameUTF8,
|
||||
char* device_nameUTF8,
|
||||
WebRtc_UWord32 device_name_length,
|
||||
WebRtc_UWord8* device_unique_idUTF8,
|
||||
char* device_unique_idUTF8,
|
||||
WebRtc_UWord32 device_unique_idUTF8Length) {
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_),
|
||||
"%s(device_number: %d)", __FUNCTION__, device_number);
|
||||
@@ -90,7 +90,7 @@ int ViEInputManager::GetDeviceName(WebRtc_UWord32 device_number,
|
||||
}
|
||||
|
||||
int ViEInputManager::NumberOfCaptureCapabilities(
|
||||
const WebRtc_UWord8* device_unique_idUTF8) {
|
||||
const char* device_unique_idUTF8) {
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_), "%s",
|
||||
__FUNCTION__);
|
||||
assert(capture_device_info_);
|
||||
@@ -98,7 +98,7 @@ int ViEInputManager::NumberOfCaptureCapabilities(
|
||||
}
|
||||
|
||||
int ViEInputManager::GetCaptureCapability(
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_capability_number,
|
||||
CaptureCapability& capability) {
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_),
|
||||
@@ -123,7 +123,7 @@ int ViEInputManager::GetCaptureCapability(
|
||||
return result;
|
||||
}
|
||||
|
||||
int ViEInputManager::GetOrientation(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
int ViEInputManager::GetOrientation(const char* device_unique_idUTF8,
|
||||
RotateCapturedFrame& orientation) {
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_),
|
||||
"%s(device_unique_idUTF8: %s,)", __FUNCTION__,
|
||||
@@ -151,8 +151,8 @@ int ViEInputManager::GetOrientation(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
}
|
||||
|
||||
int ViEInputManager::DisplayCaptureSettingsDialogBox(
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const WebRtc_UWord8* dialog_titleUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
const char* dialog_titleUTF8,
|
||||
void* parent_window,
|
||||
WebRtc_UWord32 positionX,
|
||||
WebRtc_UWord32 positionY) {
|
||||
@@ -163,7 +163,7 @@ int ViEInputManager::DisplayCaptureSettingsDialogBox(
|
||||
}
|
||||
|
||||
int ViEInputManager::CreateCaptureDevice(
|
||||
const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_unique_idUTF8Length,
|
||||
int& capture_id) {
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(engine_id_),
|
||||
@@ -198,8 +198,8 @@ int ViEInputManager::CreateCaptureDevice(
|
||||
return -1;
|
||||
}
|
||||
|
||||
WebRtc_UWord8 found_name[kVideoCaptureDeviceNameLength] = "";
|
||||
WebRtc_UWord8 found_unique_name[kVideoCaptureUniqueNameLength] = "";
|
||||
char found_name[kVideoCaptureDeviceNameLength] = "";
|
||||
char found_unique_name[kVideoCaptureUniqueNameLength] = "";
|
||||
capture_device_info_->GetDeviceName(device_index, found_name,
|
||||
kVideoCaptureDeviceNameLength,
|
||||
found_unique_name,
|
||||
@@ -363,7 +363,7 @@ int ViEInputManager::CreateExternalCaptureDevice(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ViEInputManager::CreateFilePlayer(const WebRtc_Word8* file_nameUTF8,
|
||||
int ViEInputManager::CreateFilePlayer(const char* file_nameUTF8,
|
||||
const bool loop,
|
||||
const webrtc::FileFormats file_format,
|
||||
VoiceEngine* voe_ptr, int& file_id) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 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
|
||||
@@ -43,32 +43,32 @@ class ViEInputManager : private ViEManagerBase {
|
||||
|
||||
// Gets name and id for a capture device.
|
||||
int GetDeviceName(WebRtc_UWord32 device_number,
|
||||
WebRtc_UWord8* device_nameUTF8,
|
||||
char* device_nameUTF8,
|
||||
WebRtc_UWord32 device_name_length,
|
||||
WebRtc_UWord8* device_unique_idUTF8,
|
||||
char* device_unique_idUTF8,
|
||||
WebRtc_UWord32 device_unique_idUTF8Length);
|
||||
|
||||
// Returns the number of capture capabilities for a specified device.
|
||||
int NumberOfCaptureCapabilities(const WebRtc_UWord8* device_unique_idUTF8);
|
||||
int NumberOfCaptureCapabilities(const char* device_unique_idUTF8);
|
||||
|
||||
// Gets a specific capability for a capture device.
|
||||
int GetCaptureCapability(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
int GetCaptureCapability(const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_capability_number,
|
||||
CaptureCapability& capability);
|
||||
|
||||
// Show OS specific Capture settings.
|
||||
int DisplayCaptureSettingsDialogBox(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
const WebRtc_UWord8* dialog_titleUTF8,
|
||||
int DisplayCaptureSettingsDialogBox(const char* device_unique_idUTF8,
|
||||
const char* dialog_titleUTF8,
|
||||
void* parent_window,
|
||||
WebRtc_UWord32 positionX,
|
||||
WebRtc_UWord32 positionY);
|
||||
int GetOrientation(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
int GetOrientation(const char* device_unique_idUTF8,
|
||||
RotateCapturedFrame& orientation);
|
||||
|
||||
// Creates a capture module for the specified capture device and assigns
|
||||
// a capture device id for the device.
|
||||
// Return zero on success, ViEError on failure.
|
||||
int CreateCaptureDevice(const WebRtc_UWord8* device_unique_idUTF8,
|
||||
int CreateCaptureDevice(const char* device_unique_idUTF8,
|
||||
const WebRtc_UWord32 device_unique_idUTF8Length,
|
||||
int& capture_id);
|
||||
int CreateCaptureDevice(VideoCaptureModule& capture_module,
|
||||
@@ -77,7 +77,7 @@ class ViEInputManager : private ViEManagerBase {
|
||||
int& capture_id);
|
||||
int DestroyCaptureDevice(int capture_id);
|
||||
|
||||
int CreateFilePlayer(const WebRtc_Word8* file_nameUTF8, const bool loop,
|
||||
int CreateFilePlayer(const char* file_nameUTF8, const bool loop,
|
||||
const FileFormats file_format,
|
||||
VoiceEngine* voe_ptr,
|
||||
int& file_id);
|
||||
|
||||
Reference in New Issue
Block a user