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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
===================================================================
RCS file: /cvsroot/openh323/pwlib/plugins/vidinput_dc/video4dc1394.cxx,v
retrieving revision 1.1
retrieving revision 1.5
diff -u -r1.1 -r1.5
--- openh323/pwlib/plugins/vidinput_dc/video4dc1394.cxx 2003/12/17 15:40:56 1.1
+++ openh323/pwlib/plugins/vidinput_dc/video4dc1394.cxx 2004/06/15 23:55:50 1.5
@@ -137,6 +137,18 @@
*
*
* $Log: not supported by cvs2svn $
+ * Revision 1.5 2004/06/15 23:55:50 csoutheren
+ * Added check for different versions of dc1394 API
+ *
+ * Revision 1.4 2004/06/15 15:38:29 dsandras
+ * Fixed bug with latest API of libdc1394.
+ *
+ * Revision 1.3 2004/06/14 20:43:33 dsandras
+ * Try to fix compilation.
+ *
+ * Revision 1.2 2004/05/10 10:09:19 csoutheren
+ * Removed printf that was interpreted as a trigraph
+ *
* Revision 1.1 2003/12/17 15:40:56 dominance
* Added DC Plugin as provided by Julien Puydt <julien.puydt@laposte.net>. Needs manual patching of plugins/configure for now though. (i.e. disabled by default, run autoconf in plugins/)
*
@@ -413,7 +425,7 @@
else if (supported_framerates & (1U << (31-0)))
framerate = FRAMERATE_1_875;
else {
- PTRACE(1, "No supported frame rate??!!" << supported_framerates);
+ PTRACE(1, "Frame rate " << supported_framerates << " is not supported");
return FALSE;
}
@@ -423,7 +435,11 @@
FORMAT_VGA_NONCOMPRESSED,
dc1394_mode,
P_DC1394_DEFAULT_SPEED,
- framerate, 4, 1, deviceName,
+ framerate, 4, 1,
+#ifdef NEW_DC_API
+ 1,
+#endif
+ deviceName,
&camera)!=DC1394_SUCCESS) ||
(!UseDMA && dc1394_setup_capture(handle,camera_nodes[channelNumber],
0, /* channel of IEEE 1394 */
===================================================================
RCS file: /cvsroot/openh323/pwlib/plugins/configure.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- openh323/pwlib/plugins/configure.in 2004/02/04 02:34:38 1.6
+++ openh323/pwlib/plugins/configure.in 2004/06/15 23:55:50 1.7
@@ -134,6 +134,35 @@
if test "${DC1394HDR:-unset}" != "unset" -a ${RAW1394HDR:-unset} != "unset"; then
AC_SUBST(HAS_DC1394, 1)
AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(if dc1394_dma_setup_capture has 12 parms)
+ AC_COMPILE_IFELSE([[
+#include "libdc1394/dc1394_control.h"
+int main(int ac,char **av)
+{
+ raw1394handle_t handle;
+ nodeid_t node;
+ int channel;
+ int format;
+ int mode;
+ int speed;
+ int frame_rate;
+ int num_dma_buffers;
+ int do_extra_buffering;
+ int drop_frames;
+ const char *dma_device_file;
+ dc1394_cameracapture *camera;
+ dc1394_dma_setup_capture(handle, node, channel, format, mode, speed, frame_rate, num_dma_buffers,
+ do_extra_buffering, drop_frames, dma_device_file, camera);
+ return 0;
+}
+]],NEW_DC_API=1, NEW_DC_API=0)
+ if test "$NEW_DC_API" = "1" ; then
+ AC_SUBST(DC_CFLAGS, -DNEW_DC_API)
+ AC_MSG_RESULT(yes)
+ else
+ AC_SUBST(DC_CFLAGS)
+ AC_MSG_RESULT(no)
+ fi
else
AC_MSG_RESULT(no)
fi
@@ -146,5 +175,6 @@
dnl output header file
AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES(vidinput_dc/Makefile)
AC_OUTPUT()
===================================================================
RCS file: /cvsroot/openh323/pwlib/plugins/configure,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- openh323/pwlib/plugins/configure 2004/02/04 02:34:37 1.3
+++ openh323/pwlib/plugins/configure 2004/06/15 23:55:50 1.4
@@ -308,7 +308,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT PWLIBDIR PWINSTDIR INSTALLPREFIX LIBDIR CC CFLAGS ac_ct_CC CPP EGREP HAS_ALSA HAS_OSS HAS_V4L HAS_BSDVIDEOCAP HAS_AVC1394 HAS_DC1394 LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT PWLIBDIR PWINSTDIR INSTALLPREFIX LIBDIR CC CFLAGS ac_ct_CC CPP EGREP HAS_ALSA HAS_OSS HAS_V4L HAS_BSDVIDEOCAP HAS_AVC1394 HAS_DC1394 DC_CFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -4567,6 +4567,61 @@
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: checking if dc1394_dma_setup_capture has 12 parms" >&5
+echo $ECHO_N "checking if dc1394_dma_setup_capture has 12 parms... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+
+#include "libdc1394/dc1394_control.h"
+int main(int ac,char **av)
+{
+ raw1394handle_t handle;
+ nodeid_t node;
+ int channel;
+ int format;
+ int mode;
+ int speed;
+ int frame_rate;
+ int num_dma_buffers;
+ int do_extra_buffering;
+ int drop_frames;
+ const char *dma_device_file;
+ dc1394_cameracapture *camera;
+ dc1394_dma_setup_capture(handle, node, channel, format, mode, speed, frame_rate, num_dma_buffers,
+ do_extra_buffering, drop_frames, dma_device_file, camera);
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ NEW_DC_API=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+NEW_DC_API=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test "$NEW_DC_API" = "1" ; then
+ DC_CFLAGS=-DNEW_DC_API
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
@@ -4578,6 +4633,8 @@
ac_config_files="$ac_config_files Makefile"
+ ac_config_files="$ac_config_files vidinput_dc/Makefile"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5129,6 +5186,7 @@
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "vidinput_dc/Makefile" ) CONFIG_FILES="$CONFIG_FILES vidinput_dc/Makefile" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
@@ -5234,6 +5292,7 @@
s,@HAS_BSDVIDEOCAP@,$HAS_BSDVIDEOCAP,;t t
s,@HAS_AVC1394@,$HAS_AVC1394,;t t
s,@HAS_DC1394@,$HAS_DC1394,;t t
+s,@DC_CFLAGS@,$DC_CFLAGS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
--- openh323/pwlib/plugins/vidinput_dc/Makefile.in 1970-01-01 01:00:00.000000000 +0100
+++ openh323/pwlib/plugins/vidinput_dc/Makefile.in 2004-08-30 03:08:49.095486368 +0200
@@ -0,0 +1,12 @@
+ifndef PWLIBDIR
+PWLIBDIR = $(HOME)/pwlib
+endif
+
+PLUGIN_NAME = dc
+PLUGIN_FAMILY = device/videoinput
+PLUGIN_LIBS = -lraw1394 -ldv -ldc1394_control
+PLUGIN_SOURCES = video4dc1394.cxx
+
+CFLAGS = @DC_CFLAGS@
+
+include ../../make/plugins.mak
|