[vlc-commits] Add option to enable OSD menu

Rémi Denis-Courmont git at videolan.org
Sat Nov 10 18:01:14 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 10 17:14:14 2012 +0200| [4b453a7a9e44fa43497a59d9c6d2228959fa05da] | committer: Rémi Denis-Courmont

Add option to enable OSD menu

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b453a7a9e44fa43497a59d9c6d2228959fa05da
---

 configure.ac            |   16 ++++++++----
 modules/misc/Modules.am |    5 ++--
 src/Makefile.am         |    5 +++-
 src/missing.c           |   64 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 876ab1b..aabbe79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2653,18 +2653,17 @@ dnl  PNG decoder module
 dnl
 AC_ARG_ENABLE(png,
   [  --enable-png            PNG support (default enabled)])
-if test "${enable_png}" != "no"; then
+AS_IF([test "${enable_png}" != "no"], [
 AC_CHECK_HEADERS(png.h, [
   VLC_SAVE_FLAGS
   LDFLAGS="${LDFLAGS} -lz $LIBM"
   AC_CHECK_LIB(png, png_set_rows, [
     VLC_ADD_LIBS([png],[-lpng -lz $LIBM])
-    VLC_ADD_PLUGIN([png osdmenu osd_parser])],
-    [],[-lz $LIBM] )
+    VLC_ADD_PLUGIN([png])
+  ], [], [-lz $LIBM])
   VLC_RESTORE_FLAGS
   ])
-fi
-AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
+])
 
 dnl
 dnl H264 encoder plugin (10-bit lib264)
@@ -3757,6 +3756,13 @@ AS_IF([test "${enable_atmo}" != no], [
   ])
 ])
 
+AC_ARG_ENABLE(osdmenu,
+  AS_HELP_STRING([--enable-osdmenu],[OSD menu (default disabled)]),, [
+  enable_osdmenu="no"
+])
+AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_osdmenu}" != "no"])
+
+
 EXTEND_HELP_STRING([Service Discovery plugins:])
 dnl
 dnl  Bonjour services discovery
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index 4512e1d..11f9e82 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -32,8 +32,9 @@ libosd_parser_plugin_la_SOURCES = \
 	osd/parser.c osd/osd_menu.c osd/osd_menu.h osd/simple.c osd/xml.c
 libosd_parser_plugin_la_CFLAGS = $(AM_CFLAGS)
 libosd_parser_plugin_la_LIBADD = $(AM_LIBADD)
-EXTRA_LTLIBRARIES += libosd_parser_plugin.la
-libvlc_LTLIBRARIES += $(LTLIBosd_parser)
+if BUILD_OSDMENU
+libvlc_LTLIBRARIES += libosd_parser_plugin.la
+endif
 
 libxdg_screensaver_plugin_la_SOURCES = inhibit/xdg.c
 libxdg_screensaver_plugin_la_CFLAGS = $(AM_CFLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index 23c9a0a..d6fde32 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -245,6 +245,10 @@ if ENABLE_VLM
 libvlccore_la_SOURCES += $(SOURCES_libvlc_vlm)
 endif
 endif
+if BUILD_OSDMENU
+libvlccore_la_SOURCES += osd/osd.c
+AM_CPPFLAGS += -DOSDMENU
+endif
 
 SOURCES_libvlc_darwin = \
 	posix/darwin_dirs.c \
@@ -412,7 +416,6 @@ SOURCES_libvlc_common = \
 	audio_output/input.c \
 	audio_output/output.c \
 	audio_output/volume.c \
-	osd/osd.c \
 	network/getaddrinfo.c \
 	network/io.c \
 	network/tcp.c \
diff --git a/src/missing.c b/src/missing.c
index 2bd3dd1..4dccd82 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -439,3 +439,67 @@ ml_person_t*  ml_GetPersonsFromMedia( media_library_t* p_ml,
     return NULL;
 }
 #endif /* !MEDIA_LIBRARY */
+
+#ifndef OSDMENU
+# include <vlc_osd.h>
+
+osd_menu_t *(osd_MenuCreate) (vlc_object_t *obj, const char *file)
+{
+    msg_Err (obj, "OSD menu not supported: %s", file);
+    return NULL;
+}
+
+void (osd_MenuDelete) (vlc_object_t *obj, osd_menu_t *osd)
+{
+    (void) obj; (void) osd;
+    assert (0);
+}
+
+void (osd_MenuShow) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuHide) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuActivate) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuNext) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuPrev) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuUp) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+void (osd_MenuDown) (vlc_object_t *obj)
+{
+    msg_Err (obj, "OSD menu not supported");
+}
+
+osd_button_t *(osd_ButtonFind) (vlc_object_t *obj, int x, int y,
+                                int wh, int ww, int sw, int sh)
+{
+    (void) obj; (void) x; (void) y; (void) wh; (void) ww; (void) sw; (void) sh;
+    return NULL;
+}
+
+void (osd_ButtonSelect) (vlc_object_t *obj, osd_button_t *btn)
+{
+    (void) obj; (void) btn;
+    assert (0);
+}
+#endif



More information about the vlc-commits mailing list