error detecting of video not being built

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Another issue: when I build pjproject on my laptop, I get an error of
missing symbols related to video. I have not enabled video support[1]
but still some v4l and some sdl code tried to get built.

My fix (below) is probably non optimal. Where is there a guarantee that
those two will not be used if video support is disabled?

--- a/pjmedia/src/pjmedia-videodev/sdl_dev.c
+++ b/pjmedia/src/pjmedia-videodev/sdl_dev.c
@@ -21,6 +21,9 @@
 #include <pj/log.h>
 #include <pj/os.h>
 
+#if (! defined(PJMEDIA_HAS_VIDEO)) || (PJMEDIA_HAS_VIDEO == 0)
+#   undef PJMEDIA_VIDEO_DEV_HAS_SDL
+#endif
 #if defined(PJMEDIA_VIDEO_DEV_HAS_SDL) && PJMEDIA_VIDEO_DEV_HAS_SDL != 0
 #include <SDL.h>
 #include <SDL_syswm.h>
--- a/pjmedia/src/pjmedia-videodev/v4l2_dev.c
+++ b/pjmedia/src/pjmedia-videodev/v4l2_dev.c
@@ -25,6 +25,10 @@
 #include <pj/os.h>
 #include <pj/rand.h>
 
+#if (! defined(PJMEDIA_HAS_VIDEO)) || (PJMEDIA_HAS_VIDEO == 0)
+#   undef PJMEDIA_VIDEO_DEV_HAS_V4L2
+#endif
+#
 #if PJMEDIA_VIDEO_DEV_HAS_V4L2
 
 #include <linux/videodev2.h>


[1] Huh? I looked for hours in the build system for where the video
support is enabled, and finaly read the documentation that said it
should come from a site config. Would a patch that takes this from
autoconf be welcomed?

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux