]> git.sesse.net Git - vlc/commitdiff
Move and split dummy video output
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 4 Aug 2011 10:40:59 +0000 (13:40 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 4 Aug 2011 15:16:08 +0000 (18:16 +0300)
modules/LIST
modules/misc/dummy/Modules.am
modules/misc/dummy/dummy.c
modules/misc/dummy/dummy.h
modules/video_output/Modules.am
modules/video_output/vdummy.c [moved from modules/misc/dummy/vout.c with 75% similarity]
po/POTFILES.in

index 11eb8c23eb1d96744ad22f9b8073c671423b0aea..e857fa40362409e3a77eebbe9f42c00e9aaf8eb7 100644 (file)
@@ -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
index e0fb8fb452a309bfea5768014af18c6bd1227e4b..ae454e4ce310ae813b271f457840bae7c953615c 100644 (file)
@@ -1,7 +1,6 @@
 SOURCES_dummy = \
        dummy.c \
        dummy.h \
-       vout.c \
        interface.c \
        input.c \
        decoder.c \
index a38660513f8ce409be458eda059fa118f566dfcc..fd9f726cd1369709cf2d1867fc169c8a4966ab88 100644 (file)
@@ -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 " \
@@ -92,21 +86,6 @@ vlc_module_begin ()
         set_description( N_("Dummy encoder function") )
         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 )
index e4b00ebce125456a347ee38bf6ea993fc168fa28..297f6799a3c47b9bee7802efdebbeead70a1ffbf 100644 (file)
@@ -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 * );
index c3f884a70a7c5ab8519805f3db64ae7efd0181f7..10a079c768a3eb77ca88e641d966f2d448615153 100644 (file)
@@ -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
similarity index 75%
rename from modules/misc/dummy/vout.c
rename to modules/video_output/vdummy.c
index 045bab655b93d8bf96873fc82e74949471bd8ed7..ead9c20ca02c4accfb831f70fd628304376871f2 100644 (file)
 #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;
index 07c60e71e27e7ac3cc49bd47022bc502c2c94a62..4d77eca16297330abb7a98c2d9a9d05d0d7334da 100644 (file)
@@ -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