[vlc-commits] Move and split dummy decoder

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug  4 14:30:42 2011 +0300| [329be4512526ae52c04a444158aaf1c6334f895c] | committer: Rémi Denis-Courmont

Move and split dummy decoder

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

 modules/LIST                                     |    1 +
 modules/codec/Modules.am                         |    2 +
 modules/{misc/dummy/decoder.c => codec/ddummy.c} |   37 ++++++++++++++++++---
 modules/misc/dummy/Modules.am                    |    1 -
 modules/misc/dummy/dummy.c                       |   19 -----------
 modules/misc/dummy/dummy.h                       |    4 --
 po/POTFILES.in                                   |    2 +-
 7 files changed, 35 insertions(+), 31 deletions(-)

diff --git a/modules/LIST b/modules/LIST
index 8c1e71d..96f56a1 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -86,6 +86,7 @@ $Id$
  * cvdsub: CVD subtitles decoder
  * dbus: D-Bus control interface
  * dc1394: firewire input module
+ * ddummy: dummy decoder
  * decklink: input module to read from a Blackmagic SDI card
  * decomp: Decompression module
  * deinterlace: naive deinterlacing filter
diff --git a/modules/codec/Modules.am b/modules/codec/Modules.am
index 5e35eda..0409bb1 100644
--- a/modules/codec/Modules.am
+++ b/modules/codec/Modules.am
@@ -38,6 +38,7 @@ SOURCES_subsusf = subsusf.c
 SOURCES_t140 = t140.c
 SOURCES_crystalhd = crystalhd.c
 SOURCES_stl = stl.c
+SOURCES_ddummy = ddummy.c
 
 libvlc_LTLIBRARIES += \
 	liba52_plugin.la \
@@ -47,6 +48,7 @@ libvlc_LTLIBRARIES += \
 	libcc_plugin.la \
         libcdg_plugin.la \
 	libcvdsub_plugin.la \
+	libddummy_plugin.la \
 	libdts_plugin.la \
 	libdvbsub_plugin.la \
 	liblpcm_plugin.la \
diff --git a/modules/misc/dummy/decoder.c b/modules/codec/ddummy.c
similarity index 78%
rename from modules/misc/dummy/decoder.c
rename to modules/codec/ddummy.c
index a1b5dc0..42dc533 100644
--- a/modules/misc/dummy/decoder.c
+++ b/modules/codec/ddummy.c
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * decoder.c: dummy decoder plugin for vlc.
+ * dddumy.c: dummy decoder plugin for vlc.
  *****************************************************************************
  * Copyright (C) 2002 the VideoLAN team
  * $Id$
@@ -29,11 +29,37 @@
 #endif
 
 #include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_codec.h>
 #include <vlc_fs.h>
 
+#define SAVE_TEXT N_("Save raw codec data")
+#define SAVE_LONGTEXT N_( \
+    "Save the raw codec data if you have selected/forced the dummy " \
+    "decoder in the main options." )
+
+static int OpenDecoder( vlc_object_t * );
+static int OpenDecoderDump( vlc_object_t * );
+static void CloseDecoder( vlc_object_t * );
+
+vlc_module_begin ()
+    set_shortname( N_("Dummy") )
+    set_description( N_("Dummy decoder") )
+    set_capability( "decoder", 0 )
+    set_callbacks( OpenDecoder, CloseDecoder )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_SCODEC )
+    add_bool( "dummy-save-es", false, SAVE_TEXT, SAVE_LONGTEXT, true )
+    add_shortcut( "dummy" )
+
+    add_submodule ()
+    set_section( N_( "Dump decoder" ), NULL )
+    set_description( N_("Dump decoder") )
+    set_capability( "decoder", -1 )
+    set_callbacks( OpenDecoderDump, CloseDecoder )
+    add_shortcut( "dump" )
+vlc_module_end ()
 
-#include "dummy.h"
 
 /*****************************************************************************
  * Local prototypes
@@ -79,12 +105,12 @@ static int OpenDecoderCommon( vlc_object_t *p_this, bool b_force_dump )
     return VLC_SUCCESS;
 }
 
-int OpenDecoder( vlc_object_t *p_this )
+static int OpenDecoder( vlc_object_t *p_this )
 {
     return OpenDecoderCommon( p_this, false );
 }
 
-int  OpenDecoderDump( vlc_object_t *p_this )
+static int  OpenDecoderDump( vlc_object_t *p_this )
 {
     return OpenDecoderCommon( p_this, true );
 }
@@ -117,7 +143,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 /*****************************************************************************
  * CloseDecoder: decoder destruction
  *****************************************************************************/
-void CloseDecoder ( vlc_object_t *p_this )
+static void CloseDecoder( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t *)p_this;
     FILE *stream = (void *)p_dec->p_sys;
@@ -125,4 +151,3 @@ void CloseDecoder ( vlc_object_t *p_this )
     if( stream != NULL )
         fclose( stream );
 }
-
diff --git a/modules/misc/dummy/Modules.am b/modules/misc/dummy/Modules.am
index 92a197d..582b703 100644
--- a/modules/misc/dummy/Modules.am
+++ b/modules/misc/dummy/Modules.am
@@ -2,7 +2,6 @@ SOURCES_dummy = \
 	dummy.c \
 	dummy.h \
 	interface.c \
-	decoder.c \
 	encoder.c \
 	renderer.c \
 	$(NULL)
diff --git a/modules/misc/dummy/dummy.c b/modules/misc/dummy/dummy.c
index e68ecfb..e175f77 100644
--- a/modules/misc/dummy/dummy.c
+++ b/modules/misc/dummy/dummy.c
@@ -39,11 +39,6 @@ static int OpenDummy(vlc_object_t *);
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-#define SAVE_TEXT N_("Save raw codec data")
-#define SAVE_LONGTEXT N_( \
-    "Save the raw codec data if you have selected/forced the dummy " \
-    "decoder in the main options." )
-
 #ifdef WIN32
 #define QUIET_TEXT N_("Do not open a DOS command box interface")
 #define QUIET_LONGTEXT N_( \
@@ -64,20 +59,6 @@ vlc_module_begin ()
     add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false )
 #endif
     add_submodule ()
-        set_section( N_( "Dummy decoder" ), NULL )
-        set_description( N_("Dummy decoder function") )
-        set_capability( "decoder", 0 )
-        set_callbacks( OpenDecoder, CloseDecoder )
-        set_category( CAT_INPUT )
-        set_subcategory( SUBCAT_INPUT_SCODEC )
-        add_bool( "dummy-save-es", false, SAVE_TEXT, SAVE_LONGTEXT, true )
-    add_submodule ()
-        set_section( N_( "Dump decoder" ), NULL )
-        set_description( N_("Dump decoder function") )
-        set_capability( "decoder", -1 )
-        set_callbacks( OpenDecoderDump, CloseDecoder )
-        add_shortcut( "dump" )
-    add_submodule ()
         set_description( N_("Dummy encoder function") )
         set_capability( "encoder", 0 )
         set_callbacks( OpenEncoder, CloseEncoder )
diff --git a/modules/misc/dummy/dummy.h b/modules/misc/dummy/dummy.h
index a5a284b..71511d3 100644
--- a/modules/misc/dummy/dummy.h
+++ b/modules/misc/dummy/dummy.h
@@ -26,10 +26,6 @@
  *****************************************************************************/
 int  OpenIntf     ( vlc_object_t * );
 
-int  OpenDecoder    ( vlc_object_t * );
-int  OpenDecoderDump( vlc_object_t * );
-void CloseDecoder   ( vlc_object_t * );
-
 int  OpenEncoder  ( vlc_object_t * );
 void CloseEncoder ( vlc_object_t * );
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 587a45e..c514938 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -345,6 +345,7 @@ modules/codec/cc.c
 modules/codec/cc.h
 modules/codec/cdg.c
 modules/codec/cvdsub.c
+modules/codec/ddummy.c
 modules/codec/dirac.c
 modules/codec/dmo/buffer.c
 modules/codec/dmo/dmo.c
@@ -908,7 +909,6 @@ modules/meta_engine/folder.c
 modules/meta_engine/taglib.cpp
 modules/misc/audioscrobbler.c
 modules/misc/dhparams.h
-modules/misc/dummy/decoder.c
 modules/misc/dummy/dummy.c
 modules/misc/dummy/dummy.h
 modules/misc/dummy/encoder.c



More information about the vlc-commits mailing list