#include "modules/video_capture/linux/device_info_v4l2.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <linux/videodev2.h>
#include <vector>
#include "modules/video_capture/video_capture.h"
#include "modules/video_capture/video_capture_defines.h"
#include "modules/video_capture/video_capture_impl.h"
#include "rtc_base/logging.h"
#ifndef V4L2_PIX_FMT_ABGR32
#define ABGR32_OVERRIDE …
#define V4L2_PIX_FMT_ABGR32 …
#endif
#ifndef V4L2_PIX_FMT_ARGB32
#define ARGB32_OVERRIDE …
#define V4L2_PIX_FMT_ARGB32 …
#endif
#ifndef V4L2_PIX_FMT_RGBA32
#define RGBA32_OVERRIDE …
#define V4L2_PIX_FMT_RGBA32 …
#endif
namespace webrtc {
namespace videocapturemodule {
DeviceInfoV4l2::DeviceInfoV4l2() : … { … }
int32_t DeviceInfoV4l2::Init() { … }
DeviceInfoV4l2::~DeviceInfoV4l2() { … }
uint32_t DeviceInfoV4l2::NumberOfDevices() { … }
int32_t DeviceInfoV4l2::GetDeviceName(uint32_t deviceNumber,
char* deviceNameUTF8,
uint32_t deviceNameLength,
char* deviceUniqueIdUTF8,
uint32_t deviceUniqueIdUTF8Length,
char* ,
uint32_t ) { … }
int32_t DeviceInfoV4l2::CreateCapabilityMap(const char* deviceUniqueIdUTF8) { … }
int32_t DeviceInfoV4l2::DisplayCaptureSettingsDialogBox(
const char* ,
const char* ,
void* ,
uint32_t ,
uint32_t ) { … }
bool DeviceInfoV4l2::IsDeviceNameMatches(const char* name,
const char* deviceUniqueIdUTF8) { … }
int32_t DeviceInfoV4l2::FillCapabilities(int fd) { … }
}
}
#ifdef ABGR32_OVERRIDE
#undef ABGR32_OVERRIDE
#undef V4L2_PIX_FMT_ABGR32
#endif
#ifdef ARGB32_OVERRIDE
#undef ARGB32_OVERRIDE
#undef V4L2_PIX_FMT_ARGB32
#endif
#ifdef RGBA32_OVERRIDE
#undef RGBA32_OVERRIDE
#undef V4L2_PIX_FMT_RGBA32
#endif