]> git.sesse.net Git - vlc/commitdiff
Move and split dummy decoder
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 4 Aug 2011 11:30:42 +0000 (14:30 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 4 Aug 2011 15:16:08 +0000 (18:16 +0300)
modules/LIST
modules/codec/Modules.am
modules/codec/ddummy.c [moved from modules/misc/dummy/decoder.c with 78% similarity]
modules/misc/dummy/Modules.am
modules/misc/dummy/dummy.c
modules/misc/dummy/dummy.h
po/POTFILES.in

index 8c1e71d3c240aee15e9cd040beef66ac006af9c4..96f56a1a27f2b674feba52848b9abbb4902a48a4 100644 (file)
@@ -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
index 5e35edab5efe291884ac5245cb09af19baed88cb..0409bb1671f9796bcb2081d0f52cd6dd54043901 100644 (file)
@@ -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 \
similarity index 78%
rename from modules/misc/dummy/decoder.c
rename to modules/codec/ddummy.c
index a1b5dc0abdf2bf05e896eff03a9144eff620a92c..42dc533f9a7f4cab485f8b27c418905917e55d36 100644 (file)
@@ -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$
 #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 );
 }
-
index 92a197d7cc277ed410d7a86f81ad3156b130a294..582b703897ec708869a561cd39a29d2457a4ded4 100644 (file)
@@ -2,7 +2,6 @@ SOURCES_dummy = \
        dummy.c \
        dummy.h \
        interface.c \
-       decoder.c \
        encoder.c \
        renderer.c \
        $(NULL)
index e68ecfbb88a8282ee5c9dc5df41dee25f74b61aa..e175f7771d7b3d9bf7c311460663bbbf5a7dfdb0 100644 (file)
@@ -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_( \
@@ -63,20 +58,6 @@ vlc_module_begin ()
     add_category_hint( N_("Interface"), NULL, false )
     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 )
index a5a284b338d72216272e79c86c5dc4adcca05723..71511d37bc00462da7121ccea41aef4cca20ea85 100644 (file)
  *****************************************************************************/
 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 * );
 
index 587a45ebc5e89f2534dac7cdb2a0622ddbe589a8..c51493868714bdfa607eb87ca9ca1529b82e60c7 100644 (file)
@@ -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