2 //#include <sys/mman.h>
3 //#include <sys/time.h>
6 #include <ptlib/videoio.h>
7 #include <ptlib/vconvert.h>
10 #include <machine/ioctl_meteor.h>
13 #if defined(P_OPENBSD) || defined(P_NETBSD)
14 #if P_OPENBSD >= 200105
15 #include <dev/ic/bt8xx.h>
16 #elif P_NETBSD >= 105000000
17 #include <dev/ic/bt8xx.h>
19 #include <i386/ioctl_meteor.h>
23 class PVideoInputBSDDevice
: public PVideoInputDevice
27 PVideoInputBSDDevice();
28 ~PVideoInputBSDDevice();
30 static PStringList
GetInputDeviceNames();
32 PStringList
GetDeviceNames() const
33 { return GetInputDeviceNames(); }
35 BOOL
Open(const PString
&deviceName
, BOOL startImmediate
);
46 PINDEX
GetMaxFrameBytes();
48 BOOL
GetFrame(PBYTEArray
& frame
);
49 BOOL
GetFrameData(BYTE
*, PINDEX
*);
50 BOOL
GetFrameDataNoDelay(BYTE
*, PINDEX
*);
52 BOOL
GetFrameSizeLimits(unsigned int&, unsigned int&,
53 unsigned int&, unsigned int&);
55 BOOL
TestAllFormats();
57 BOOL
SetFrameSize(unsigned int, unsigned int);
58 BOOL
SetFrameRate(unsigned int);
59 BOOL
VerifyHardwareFrameSize(unsigned int, unsigned int);
61 BOOL
GetParameters(int*, int*, int*, int*, int*);
63 BOOL
SetColourFormat(const PString
&);
66 BOOL
SetContrast(unsigned int);
68 BOOL
SetBrightness(unsigned int);
69 // int GetWhiteness();
70 // BOOL SetWhiteness(unsigned int);
72 // BOOL SetColour(unsigned int);
74 BOOL
SetHue(unsigned int);
76 // BOOL SetVideoChannelFormat(int, PVideoDevice::VideoFormat);
77 BOOL
SetVideoFormat(PVideoDevice::VideoFormat
);
81 BOOL
NormalReadProcess(BYTE
*, PINDEX
*);
85 struct video_capability
87 int channels
; /* Num channels */
88 int maxwidth
; /* Supported width */
89 int maxheight
; /* And height */
90 int minwidth
; /* Supported width */
91 int minheight
; /* And height */
95 struct video_capability videoCapability
;
96 int canMap
; // -1 = don't know, 0 = no, 1 = yes