9 #include <ptlib/videoio.h>
10 #include <ptlib/vconvert.h>
12 #include <linux/videodev.h>
15 class PVideoInputV4l2Device
: public PVideoInputDevice
18 PCLASSINFO(PVideoInputV4l2Device
, PVideoInputDevice
);
22 PVideoInputV4l2Device();
23 ~PVideoInputV4l2Device();
25 void ReadDeviceDirectory (PDirectory
, POrdinalToString
&);
27 static PStringList
GetInputDeviceNames();
29 PStringList
GetDeviceNames() const
30 { return GetInputDeviceNames(); }
32 BOOL
Open(const PString
&deviceName
, BOOL startImmediate
);
43 PINDEX
GetMaxFrameBytes();
45 BOOL
GetFrame(PBYTEArray
& frame
);
46 BOOL
GetFrameData(BYTE
*, PINDEX
*);
47 BOOL
GetFrameDataNoDelay(BYTE
*, PINDEX
*);
49 BOOL
GetFrameSizeLimits(unsigned int&, unsigned int&,
50 unsigned int&, unsigned int&);
52 BOOL
TestAllFormats();
54 BOOL
SetFrameSize(unsigned int, unsigned int);
55 BOOL
SetFrameRate(unsigned int);
56 BOOL
VerifyHardwareFrameSize(unsigned int, unsigned int);
58 BOOL
GetParameters(int*, int*, int*, int*, int*);
60 BOOL
SetColourFormat(const PString
&);
63 BOOL
SetContrast(unsigned int);
65 BOOL
SetBrightness(unsigned int);
67 BOOL
SetWhiteness(unsigned int);
69 BOOL
SetColour(unsigned int);
71 BOOL
SetHue(unsigned int);
73 BOOL
SetVideoChannelFormat(int, PVideoDevice::VideoFormat
);
74 BOOL
SetVideoFormat(PVideoDevice::VideoFormat
);
78 BOOL
NormalReadProcess(BYTE
*, PINDEX
*);
84 struct v4l2_capability videoCapability
;
85 struct v4l2_streamparm videoStreamParm
;
92 BYTE
* videoBuffer
[NUM_VIDBUF
];
93 uint videoBufferCount
;