[vlc-commits] Move and split dummy video output

Rémi Denis-Courmont git at videolan.org
Thu Aug 4 17:16:37 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug  4 13:40:59 2011 +0300| [fcc6a70fb791aeaeeb07be818978d510f0ef2be2] | committer: Rémi Denis-Courmont

Move and split dummy video output

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

 modules/LIST                                       |    1 +
 modules/misc/dummy/Modules.am                      |    1 -
 modules/misc/dummy/dummy.c                         |   21 ---------
 modules/misc/dummy/dummy.h                         |    4 --
 modules/video_output/Modules.am                    |    6 +++
 .../{misc/dummy/vout.c => video_output/vdummy.c}   |   48 ++++++++++++++++---
 po/POTFILES.in                                     |    2 +-
 7 files changed, 48 insertions(+), 35 deletions(-)

diff --git a/modules/LIST b/modules/LIST
index 11eb8c2..e857fa4 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -342,6 +342,7 @@ $Id$
  * vc1: VC-1 Video demuxer
  * vcd: input module for accessing Video CDs
  * vcdx: input module for accessing Video CDs with navigation & stills
+ * vdummy: dummy video display
  * visual: visualisation system
  * vmem: memory video driver
  * vobsub: VobSUB subtitles demuxer
diff --git a/modules/misc/dummy/Modules.am b/modules/misc/dummy/Modules.am
index e0fb8fb..ae454e4 100644
--- a/modules/misc/dummy/Modules.am
+++ b/modules/misc/dummy/Modules.am
@@ -1,7 +1,6 @@
 SOURCES_dummy = \
 	dummy.c \
 	dummy.h \
-	vout.c \
 	interface.c \
 	input.c \
 	decoder.c \
diff --git a/modules/misc/dummy/dummy.c b/modules/misc/dummy/dummy.c
index a386605..fd9f726 100644
--- a/modules/misc/dummy/dummy.c
+++ b/modules/misc/dummy/dummy.c
@@ -39,12 +39,6 @@ static int OpenDummy(vlc_object_t *);
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-#define CHROMA_TEXT N_("Dummy image chroma format")
-#define CHROMA_LONGTEXT N_( \
-    "Force the dummy video output to create images using a specific chroma " \
-    "format instead of trying to improve performances by using the most " \
-    "efficient one.")
-
 #define SAVE_TEXT N_("Save raw codec data")
 #define SAVE_LONGTEXT N_( \
     "Save the raw codec data if you have selected/forced the dummy " \
@@ -93,21 +87,6 @@ vlc_module_begin ()
         set_capability( "encoder", 0 )
         set_callbacks( OpenEncoder, CloseEncoder )
     add_submodule ()
-        set_description( N_("Dummy video output function") )
-        set_section( N_( "Dummy Video output" ), NULL )
-        set_capability( "vout display", 1 )
-        set_callbacks( OpenVideo, CloseVideo )
-        set_category( CAT_VIDEO )
-        set_subcategory( SUBCAT_VIDEO_VOUT )
-        add_category_hint( N_("Video"), NULL, false )
-        add_string( "dummy-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
-    add_submodule ()
-        set_section( N_( "Stats video output" ), NULL )
-        set_description( N_("Stats video output function") )
-        set_capability( "vout display", 0 )
-        add_shortcut( "stats" )
-        set_callbacks( OpenVideoStat, CloseVideo )
-    add_submodule ()
         set_description( N_("Dummy font renderer function") )
         set_capability( "text renderer", 1 )
         set_callbacks( OpenRenderer, NULL )
diff --git a/modules/misc/dummy/dummy.h b/modules/misc/dummy/dummy.h
index e4b00eb..297f679 100644
--- a/modules/misc/dummy/dummy.h
+++ b/modules/misc/dummy/dummy.h
@@ -36,8 +36,4 @@ void CloseDecoder   ( vlc_object_t * );
 int  OpenEncoder  ( vlc_object_t * );
 void CloseEncoder ( vlc_object_t * );
 
-int  OpenVideo    ( vlc_object_t * );
-int  OpenVideoStat( vlc_object_t * );
-void CloseVideo   ( vlc_object_t * );
-
 int  OpenRenderer ( vlc_object_t * );
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index c3f884a..10a079c 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -119,6 +119,12 @@ EXTRA_LTLIBRARIES += libegl_plugin.la
 libvlc_LTLIBRARIES += $(LTLIBegl)
 
 ### Common ###
+libvdummy_plugin_la_SOURCES = vdummy.c
+libvdummy_plugin_la_CFLAGS = $(AM_CFLAGS)
+libvdummy_plugin_la_LIBADD = $(AM_LIBADD)
+libvdummy_plugin_la_DEPENDENCIES =
+
 libvlc_LTLIBRARIES += \
+	libvdummy_plugin.la \
 	libvmem_plugin.la \
 	libyuv_plugin.la
diff --git a/modules/misc/dummy/vout.c b/modules/video_output/vdummy.c
similarity index 75%
rename from modules/misc/dummy/vout.c
rename to modules/video_output/vdummy.c
index 045bab6..ead9c20 100644
--- a/modules/misc/dummy/vout.c
+++ b/modules/video_output/vdummy.c
@@ -30,8 +30,37 @@
 #endif
 
 #include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout_display.h>
-#include "dummy.h"
+
+#define CHROMA_TEXT N_("Dummy image chroma format")
+#define CHROMA_LONGTEXT N_( \
+    "Force the dummy video output to create images using a specific chroma " \
+    "format instead of trying to improve performances by using the most " \
+    "efficient one.")
+
+static int OpenDummy( vlc_object_t * );
+static int OpenStats( vlc_object_t * );
+static void Close( vlc_object_t * );
+
+vlc_module_begin ()
+    set_shortname( N_("Dummy") )
+    set_description( N_("Dummy video output") )
+    set_capability( "vout display", 1 )
+    set_callbacks( OpenDummy, Close )
+    add_shortcut( "dummy" )
+
+    set_category( CAT_VIDEO )
+    set_subcategory( SUBCAT_VIDEO_VOUT )
+    add_string( "dummy-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
+
+    add_submodule ()
+    set_description( N_("Statistics video output") )
+    set_capability( "vout display", 0 )
+    add_shortcut( "stats" )
+    set_callbacks( OpenStats, Close )
+vlc_module_end ()
+
 
 /*****************************************************************************
  * Local prototypes
@@ -48,7 +77,8 @@ static void            Manage (vout_display_t *);
 /*****************************************************************************
  * OpenVideo: activates dummy vout display method
  *****************************************************************************/
-static int OpenVideoCommon(vlc_object_t *object, bool display_stat)
+static int Open(vlc_object_t *object,
+                void (*display)(vout_display_t *, picture_t *, subpicture_t *))
 {
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
@@ -71,22 +101,24 @@ static int OpenVideoCommon(vlc_object_t *object, bool display_stat)
     }
     vd->pool    = Pool;
     vd->prepare = NULL;
-    vd->display = display_stat ? DisplayStat : Display;
+    vd->display = display;
     vd->control = Control;
     vd->manage  = Manage;
 
     return VLC_SUCCESS;
 }
-int OpenVideo(vlc_object_t *object)
+
+static int OpenDummy(vlc_object_t *object)
 {
-    return OpenVideoCommon(object, false);
+    return Open(object, Display);
 }
-int OpenVideoStat(vlc_object_t *object)
+
+static int OpenStats(vlc_object_t *object)
 {
-    return OpenVideoCommon(object, true);
+    return Open(object, DisplayStat);
 }
 
-void CloseVideo(vlc_object_t *object)
+static void Close(vlc_object_t *object)
 {
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys = vd->sys;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 07c60e7..4d77eca 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -914,7 +914,6 @@ modules/misc/dummy/encoder.c
 modules/misc/dummy/input.c
 modules/misc/dummy/interface.c
 modules/misc/dummy/renderer.c
-modules/misc/dummy/vout.c
 modules/misc/gnutls.c
 modules/misc/inhibit.c
 modules/misc/inhibit/osso.c
@@ -1121,6 +1120,7 @@ modules/video_output/msw/events.c
 modules/video_output/msw/glwin32.c
 modules/video_output/msw/wingdi.c
 modules/video_output/sdl.c
+modules/video_output/vdummy.c
 modules/video_output/vmem.c
 modules/video_output/xcb/glx.c
 modules/video_output/xcb/window.c



More information about the vlc-commits mailing list