2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-03-01 16:30:40 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_
|
|
|
|
|
#define WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_
|
|
|
|
|
|
2013-07-12 10:03:52 +00:00
|
|
|
#include "webrtc/modules/video_capture/device_info_impl.h"
|
|
|
|
|
#include "webrtc/modules/video_capture/video_capture_impl.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc
|
|
|
|
|
{
|
|
|
|
|
namespace videocapturemodule
|
|
|
|
|
{
|
|
|
|
|
class DeviceInfoLinux: public DeviceInfoImpl
|
|
|
|
|
{
|
|
|
|
|
public:
|
2013-04-10 08:23:13 +00:00
|
|
|
DeviceInfoLinux(const int32_t id);
|
2011-07-07 08:21:25 +00:00
|
|
|
virtual ~DeviceInfoLinux();
|
2013-04-10 08:23:13 +00:00
|
|
|
virtual uint32_t NumberOfDevices();
|
|
|
|
|
virtual int32_t GetDeviceName(
|
|
|
|
|
uint32_t deviceNumber,
|
2012-03-01 16:30:40 +00:00
|
|
|
char* deviceNameUTF8,
|
2013-04-10 08:23:13 +00:00
|
|
|
uint32_t deviceNameLength,
|
2012-03-01 16:30:40 +00:00
|
|
|
char* deviceUniqueIdUTF8,
|
2013-04-10 08:23:13 +00:00
|
|
|
uint32_t deviceUniqueIdUTF8Length,
|
2012-03-01 16:30:40 +00:00
|
|
|
char* productUniqueIdUTF8=0,
|
2013-04-10 08:23:13 +00:00
|
|
|
uint32_t productUniqueIdUTF8Length=0);
|
2011-07-07 08:21:25 +00:00
|
|
|
/*
|
|
|
|
|
* Fills the membervariable _captureCapabilities with capabilites for the given device name.
|
|
|
|
|
*/
|
2013-04-10 08:23:13 +00:00
|
|
|
virtual int32_t CreateCapabilityMap (const char* deviceUniqueIdUTF8);
|
|
|
|
|
virtual int32_t DisplayCaptureSettingsDialogBox(
|
2012-03-01 16:30:40 +00:00
|
|
|
const char* /*deviceUniqueIdUTF8*/,
|
|
|
|
|
const char* /*dialogTitleUTF8*/,
|
|
|
|
|
void* /*parentWindow*/,
|
2013-04-10 08:23:13 +00:00
|
|
|
uint32_t /*positionX*/,
|
|
|
|
|
uint32_t /*positionY*/) { return -1;}
|
2013-09-25 17:01:42 +00:00
|
|
|
int32_t FillCapabilities(int fd);
|
2013-04-10 08:23:13 +00:00
|
|
|
int32_t Init();
|
2011-07-07 08:21:25 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
bool IsDeviceNameMatches(const char* name, const char* deviceUniqueIdUTF8);
|
|
|
|
|
};
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace videocapturemodule
|
|
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_LINUX_DEVICE_INFO_LINUX_H_
|