[asterisk-commits] rizzo: branch rizzo/video_v2 r84108 - /team/rizzo/video_v2/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 28 10:48:40 CDT 2007


Author: rizzo
Date: Fri Sep 28 10:48:39 2007
New Revision: 84108

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84108
Log:
minor simplification on the conditional compilation variables


Modified:
    team/rizzo/video_v2/channels/console_video.c

Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=84108&r1=84107&r2=84108
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Fri Sep 28 10:48:39 2007
@@ -21,12 +21,22 @@
 #define HAVE_V4L	1
 #define HAVE_SDL	1
 #define HAVE_FFMPEG	1
-//#define OLD_FFMPEG	1	/* set for old ffmpeg with no swscale */
-
-#if !defined(HAVE_FFMPEG) || HAVE_FFMPEG == 0 || !defined(HAVE_SDL) || HAVE_SDL == 0
-/*
- * Neither SDL nor codec means we cannot do video, so we only give stubs to
+#define OLD_FFMPEG	1	/* set for old ffmpeg with no swscale */
+
+
+#if !defined(HAVE_FFMPEG)
+#define HAVE_FFMPEG	0
+#endif
+#if !defined(HAVE_SDL)
+#define HAVE_SDL	0
+#endif
+
+#if HAVE_FFMPEG == 0 || HAVE_SDL == 0
+/*
+ * Without codecs, we cannot do video so we only give stubs to
  * keep the compiler happy (basically, a placeholder for config file info).
+ * At the moment we also require SDL, though it is not strictly necessary
+ * (we could just drop incoming video but still source it).
  */
 struct video_desc {	/* empty */
 	int 	w;
@@ -52,7 +62,8 @@
 
 #else
 /*
- * The real thing, with support for SDL and codecs (and possibly V4l/X11)
+ * The real thing, with support for SDL and codecs, and possibly V4L/X11.
+ *
  * In order to decode video you need the following patch to the
  * main Makefile:
 
@@ -205,7 +216,7 @@
 };
 
 /* Video4Linux stuff is only used in video_open() */
-#if defined(HAVE_V4L) && HAVE_V4L > 0
+#if HAVE_V4L > 0
 #include <linux/videodev.h>
 #endif
 
@@ -247,7 +258,7 @@
 	v->pix_fmt = PIX_FMT_RGB565;
 	v->fd = -2;
     }
-#if defined(HAVE_V4L) && HAVE_V4L > 0
+#if HAVE_V4L > 0
     else {
 	/* V4L specific */
 	struct video_window vw = { 0 };	/* camera attributes */




More information about the asterisk-commits mailing list