1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
--- plugins/vidinput_bsd/vidinput_bsd.h.orig Tue Aug 9 11:08:09 2005
+++ plugins/vidinput_bsd/vidinput_bsd.h Thu Apr 6 09:37:11 2006
@@ -1,13 +1,24 @@
+#ifndef _PVIDEOIOBSDCAPTURE
-//#include <sys/mman.h>
-//#include <sys/time.h>
+#define _PVIDEOIOBSDCAPTURE
+
+#ifdef __GNUC__
+#pragma interface
+#endif
+
+#include <sys/mman.h>
#include <ptlib.h>
#include <ptlib/videoio.h>
#include <ptlib/vconvert.h>
#if defined(P_FREEBSD)
+#include <sys/param.h>
+# if __FreeBSD_version >= 502100
+#include <dev/bktr/ioctl_meteor.h>
+# else
#include <machine/ioctl_meteor.h>
+# endif
#endif
#if defined(P_OPENBSD) || defined(P_NETBSD)
@@ -20,19 +30,24 @@
#endif
#endif
-class PVideoInputDevice_BSDCAPTURE: public PVideoInputDevice
+#if !P_USE_INLINES
+#include <ptlib/contain.inl>
+#endif
+
+
+class PVideoInputDevice_BSDCAPTURE : public PVideoInputDevice
{
+ PCLASSINFO(PVideoInputDevice_BSDCAPTURE, PVideoInputDevice);
+
public:
PVideoInputDevice_BSDCAPTURE();
~PVideoInputDevice_BSDCAPTURE();
- static PStringList GetInputDeviceNames();
-
- PStringList GetDeviceNames() const
- { return GetInputDeviceNames(); }
-
- BOOL Open(const PString &deviceName, BOOL startImmediate);
+ BOOL Open(
+ const PString &deviceName,
+ BOOL startImmediate = TRUE
+ );
BOOL IsOpen();
@@ -43,11 +58,24 @@
BOOL IsCapturing();
+ static PStringList GetInputDeviceNames();
+
+ PStringList GetDeviceNames() const
+ { return GetInputDeviceNames(); }
+
PINDEX GetMaxFrameBytes();
- BOOL GetFrame(PBYTEArray & frame);
- BOOL GetFrameData(BYTE*, PINDEX*);
- BOOL GetFrameDataNoDelay(BYTE*, PINDEX*);
+// BOOL GetFrame(
+// PBYTEArray & frame
+// );
+ BOOL GetFrameData(
+ BYTE * buffer,
+ PINDEX * bytesReturned = NULL
+ );
+ BOOL GetFrameDataNoDelay(
+ BYTE * buffer,
+ PINDEX * bytesReturned = NULL
+ );
BOOL GetFrameSizeLimits(unsigned int&, unsigned int&,
unsigned int&, unsigned int&);
@@ -99,3 +127,5 @@
int mmap_size;
};
+
+#endif
|