summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Mueller <lutz@users.sourceforge.net>2001-11-22 12:27:19 +0000
committerLutz Mueller <lutz@users.sourceforge.net>2001-11-22 12:27:19 +0000
commite8b3eafb9addbc16a7e7ad68c7454de887e2371d (patch)
treec69e15f5cc07cdb7665954019e47fb7162d76c5b
parentc6890a145608159c396ca6d5163465546c9e5982 (diff)
downloadlibgphoto2-e8b3eafb9addbc16a7e7ad68c7454de887e2371d.tar.gz
2001-11-22 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* configure.in: * acconfig.h: No need for --with-multi any more * libgphoto2/gphoto2-camera.c: Add some comments about the problems with HAVE_MULTI. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3158 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--ChangeLog7
-rw-r--r--acconfig.h3
-rw-r--r--configure.in30
-rw-r--r--libgphoto2/gphoto2-camera.c18
4 files changed, 25 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 72cb6f1f0..469578278 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2001-11-22 Lutz Müller <urc8@rz.uni-karlsruhe.de>
+ * configure.in:
+ * acconfig.h: No need for --with-multi any more
+ * libgphoto2/gphoto2-camera.c: Add some comments about the
+ problems with HAVE_MULTI.
+
+2001-11-22 Lutz Müller <urc8@rz.uni-karlsruhe.de>
+
* libgphoto2/gphoto2-camera.[c,h]: Expose gp_camera_exit to the world.
2001-11-22 Lutz Müller <urc8@rz.uni-karlsruhe.de>
diff --git a/acconfig.h b/acconfig.h
index e7181a7fd..5b0d0012e 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -22,6 +22,3 @@
#undef HAVE_CDK
#undef HAVE_AA
#undef HAVE_JPEG
-
-#undef HAVE_MULTI
-
diff --git a/configure.in b/configure.in
index 4913d4db0..508a6af3f 100644
--- a/configure.in
+++ b/configure.in
@@ -223,34 +223,6 @@ AM_CONDITIONAL(HAVE_AA, $have_aa)
AC_SUBST(AA_LIBS)
AC_SUBST(AA_CFLAGS)
-dnl ****************************************
-dnl Support for multiple frontends (at once)
-dnl ****************************************
-multi_msg=no
-try_multi=false
-have_multi=false
-AC_ARG_WITH(multi, [ --with-multi Don't compile with support for]
- [ multiple progams (needed by GNOME]
- [ and KDE)],
- if test x$withval = xyes; then
- try_multi=true
- fi
-)
-if $try_multi; then
- multi_msg=yes
- have_multi=true;
- AC_DEFINE(HAVE_MULTI)
-else
- AC_WARN([
-*** You are compiling gphoto2 without support for multiple frontends. This
-*** will lead to problems with frontends like Konqueror or Nautilus, even
-*** with gtkam and gimp. However, some camera drivers don't support
-*** multiple frontends as of now (digita, dc240). If you don't have one of
-*** the cameras supported by those drivers, it is STRONGLY RECOMMENDED to
-*** compile gphoto2 with support for multiple frontends (--with-multi).
-])
-fi
-
AC_OUTPUT([
Makefile
camlibs/Makefile
@@ -307,6 +279,4 @@ Configuration (libgphoto2):
Config. support (gphoto2): $cdk_msg
Preview support (gphoto2): $aa_msg
JPEG support: $jpeg_msg
-
- Support for GNOME and KDE: $multi_msg
"
diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c
index 942368dbe..5e1f8a8c2 100644
--- a/libgphoto2/gphoto2-camera.c
+++ b/libgphoto2/gphoto2-camera.c
@@ -55,6 +55,24 @@
#define CHECK_NULL(r) {if (!(r)) return (GP_ERROR_BAD_PARAMETERS);}
#define CHECK_RESULT(result) {int r = (result); if (r < 0) return (r);}
+/*
+ * HAVE_MULTI
+ * ----------
+ *
+ * The problem: Several different programs (gtkam, gphoto2, gimp) accessing
+ * one camera.
+ * The solutions:
+ * (1) gp_port_open before each operation, gp_port_close after. This has
+ * shown to not work with some drivers (digita/dc240) for serial ports,
+ * because the camera will notice that (how? Please tell us!),
+ * reset itself and will therefore need to be reinitialized. If you want
+ * this behaviour, #define HAVE_MULTI.
+ * (2) Leave it up to the frontend to release the camera by calling
+ * gp_camera_exit after camera operations. This is what is implemented
+ * right now. The drawback is that re-initialization takes more time than
+ * just reopening the port. However, it works for all camera drivers.
+ */
+
#ifdef HAVE_MULTI
#define CHECK_OPEN(c) \
{ \