[vlc-commits] Move and split dummy encoder

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:36:43 2011 +0300| [5c385e6fcbc84b00a1b98d58acee4d968c878a73] | committer: Rémi Denis-Courmont

Move and split dummy encoder

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

 modules/LIST                                     |    1 +
 modules/codec/Modules.am                         |    2 ++
 modules/{misc/dummy/encoder.c => codec/edummy.c} |   18 +++++++++++++++---
 modules/misc/dummy/Modules.am                    |    1 -
 modules/misc/dummy/dummy.c                       |    4 ----
 modules/misc/dummy/dummy.h                       |    3 ---
 po/POTFILES.in                                   |    2 +-
 7 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/modules/LIST b/modules/LIST
index 96f56a1..ee959c0 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -112,6 +112,7 @@ $Id$
  * dvdnav: access module for DVDs with libdvdnav
  * dvdread: input module for accessing DVDs, uses libdvdread
  * dynamicoverlay: subpicture filter using shared memory that can be written to by external applications
+ * edummy: dummy encoder
  * egl: EGL video output
  * equalizer: a equalizer audio filter
  * erase: Logo erase video filter
diff --git a/modules/codec/Modules.am b/modules/codec/Modules.am
index 0409bb1..10ca915 100644
--- a/modules/codec/Modules.am
+++ b/modules/codec/Modules.am
@@ -39,6 +39,7 @@ SOURCES_t140 = t140.c
 SOURCES_crystalhd = crystalhd.c
 SOURCES_stl = stl.c
 SOURCES_ddummy = ddummy.c
+SOURCES_edummy = edummy.c
 
 libvlc_LTLIBRARIES += \
 	liba52_plugin.la \
@@ -51,6 +52,7 @@ libvlc_LTLIBRARIES += \
 	libddummy_plugin.la \
 	libdts_plugin.la \
 	libdvbsub_plugin.la \
+	libedummy_plugin.la \
 	liblpcm_plugin.la \
 	libmpeg_audio_plugin.la \
 	librawvideo_plugin.la \
diff --git a/modules/misc/dummy/encoder.c b/modules/codec/edummy.c
similarity index 87%
rename from modules/misc/dummy/encoder.c
rename to modules/codec/edummy.c
index ed8fee0..38c5b89 100644
--- a/modules/misc/dummy/encoder.c
+++ b/modules/codec/edummy.c
@@ -29,8 +29,20 @@
 #endif
 
 #include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_codec.h>
-#include "dummy.h"
+
+static int OpenEncoder( vlc_object_t * );
+static void CloseEncoder( vlc_object_t * );
+
+vlc_module_begin ()
+    set_shortname( N_("Dummy") )
+    set_description( N_("Dummy encoder") )
+    set_capability( "encoder", 0 )
+    set_callbacks( OpenEncoder, CloseEncoder )
+    add_shortcut( "dummy" )
+vlc_module_end ()
+
 
 /*****************************************************************************
  * Local prototypes
@@ -41,7 +53,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_buf );
 /*****************************************************************************
  * OpenDecoder: open the dummy encoder.
  *****************************************************************************/
-int OpenEncoder ( vlc_object_t *p_this )
+static int OpenEncoder( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
 
@@ -72,7 +84,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_buf )
 /*****************************************************************************
  * CloseDecoder: decoder destruction
  *****************************************************************************/
-void CloseEncoder ( vlc_object_t *p_this )
+static void CloseEncoder( vlc_object_t *p_this )
 {
     VLC_UNUSED(p_this);
 }
diff --git a/modules/misc/dummy/Modules.am b/modules/misc/dummy/Modules.am
index 582b703..5d34b81 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 \
-	encoder.c \
 	renderer.c \
 	$(NULL)
 
diff --git a/modules/misc/dummy/dummy.c b/modules/misc/dummy/dummy.c
index e175f77..d891687 100644
--- a/modules/misc/dummy/dummy.c
+++ b/modules/misc/dummy/dummy.c
@@ -59,10 +59,6 @@ vlc_module_begin ()
     add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false )
 #endif
     add_submodule ()
-        set_description( N_("Dummy encoder function") )
-        set_capability( "encoder", 0 )
-        set_callbacks( OpenEncoder, CloseEncoder )
-    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 71511d3..427b3a1 100644
--- a/modules/misc/dummy/dummy.h
+++ b/modules/misc/dummy/dummy.h
@@ -26,7 +26,4 @@
  *****************************************************************************/
 int  OpenIntf     ( vlc_object_t * );
 
-int  OpenEncoder  ( vlc_object_t * );
-void CloseEncoder ( vlc_object_t * );
-
 int  OpenRenderer ( vlc_object_t * );
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c514938..cdff9fc 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -352,6 +352,7 @@ modules/codec/dmo/dmo.c
 modules/codec/dmo/dmo.h
 modules/codec/dts.c
 modules/codec/dvbsub.c
+modules/codec/edummy.c
 modules/codec/faad.c
 modules/codec/flac.c
 modules/codec/fluidsynth.c
@@ -911,7 +912,6 @@ modules/misc/audioscrobbler.c
 modules/misc/dhparams.h
 modules/misc/dummy/dummy.c
 modules/misc/dummy/dummy.h
-modules/misc/dummy/encoder.c
 modules/misc/dummy/interface.c
 modules/misc/dummy/renderer.c
 modules/misc/gnutls.c



More information about the vlc-commits mailing list