#include "modules/video_capture/linux/video_capture_v4l2.h"
#include <errno.h>
#include <fcntl.h>
#include <linux/videodev2.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/select.h>
#include <time.h>
#include <unistd.h>
#include <new>
#include <string>
#include "api/scoped_refptr.h"
#include "media/base/video_common.h"
#include "modules/video_capture/video_capture.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 {
VideoCaptureModuleV4L2::VideoCaptureModuleV4L2()
: … { … }
int32_t VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8) { … }
VideoCaptureModuleV4L2::~VideoCaptureModuleV4L2() { … }
int32_t VideoCaptureModuleV4L2::StartCapture(
const VideoCaptureCapability& capability) { … }
int32_t VideoCaptureModuleV4L2::StopCapture() { … }
bool VideoCaptureModuleV4L2::AllocateVideoBuffers() { … }
bool VideoCaptureModuleV4L2::DeAllocateVideoBuffers() { … }
bool VideoCaptureModuleV4L2::CaptureStarted() { … }
bool VideoCaptureModuleV4L2::CaptureProcess() { … }
int32_t VideoCaptureModuleV4L2::CaptureSettings(
VideoCaptureCapability& settings) { … }
}
}
#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