[vlc-commits] Move and split dummy text render

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:42:47 2011 +0300| [5c8fd676d3f2e55a12794b97b148983b2714d0dc] | committer: Rémi Denis-Courmont

Move and split dummy text render

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

 modules/LIST                                       |    1 +
 modules/misc/Modules.am                            |    3 +++
 modules/misc/dummy/Modules.am                      |    1 -
 modules/misc/dummy/dummy.c                         |    4 ----
 modules/misc/dummy/dummy.h                         |    2 --
 .../{dummy/renderer.c => text_renderer/tdummy.c}   |   15 +++++++++++----
 po/POTFILES.in                                     |    2 +-
 7 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/modules/LIST b/modules/LIST
index ee959c0..69932ac 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -327,6 +327,7 @@ $Id$
  * swscale: Video scaling filter
  * t140: T.140 text encoder
  * taglib: Taglib tags parser and writer
+ * tdummy: dummy text renderer
  * telepathy: Telepathy Presence information using MissionControl notification
  * telx: teletext subtitles decoder
  * theora: a theora video decoder/packetizer/encoder using the libtheora library
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index d69ee71..c852cc5 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -4,8 +4,11 @@ SUBDIRS = $(BASE_SUBDIRS)
 DIST_SUBDIRS = $(BASE_SUBDIRS)
 
 SOURCES_freetype = text_renderer/freetype.c
+SOURCES_tdummy = text_renderer/tdummy.c
 SOURCES_win32text = text_renderer/win32text.c
 SOURCES_quartztext = text_renderer/quartztext.c
+libvlc_LTLIBRARIES += libtdummy_plugin.la
+
 SOURCES_svg = text_renderer/svg.c
 SOURCES_logger = logger.c
 SOURCES_vod_rtsp = rtsp.c
diff --git a/modules/misc/dummy/Modules.am b/modules/misc/dummy/Modules.am
index 5d34b81..961ecb1 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 \
-	renderer.c \
 	$(NULL)
 
 libvlc_LTLIBRARIES += libdummy_plugin.la
diff --git a/modules/misc/dummy/dummy.c b/modules/misc/dummy/dummy.c
index d891687..8e081f1 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 font renderer function") )
-        set_capability( "text renderer", 1 )
-        set_callbacks( OpenRenderer, NULL )
-    add_submodule ()
         set_description( N_("libc memcpy") )
         set_capability( "memcpy", 50 )
         set_callbacks( OpenDummy, NULL )
diff --git a/modules/misc/dummy/dummy.h b/modules/misc/dummy/dummy.h
index 427b3a1..ba058af 100644
--- a/modules/misc/dummy/dummy.h
+++ b/modules/misc/dummy/dummy.h
@@ -25,5 +25,3 @@
  * External prototypes
  *****************************************************************************/
 int  OpenIntf     ( vlc_object_t * );
-
-int  OpenRenderer ( vlc_object_t * );
diff --git a/modules/misc/dummy/renderer.c b/modules/misc/text_renderer/tdummy.c
similarity index 84%
rename from modules/misc/dummy/renderer.c
rename to modules/misc/text_renderer/tdummy.c
index 219cef7..38343e8 100644
--- a/modules/misc/dummy/renderer.c
+++ b/modules/misc/text_renderer/tdummy.c
@@ -26,10 +26,18 @@
 #endif
 
 #include <vlc_common.h>
-#include <vlc_block.h>
+#include <vlc_plugin.h>
 #include <vlc_filter.h>
 
-#include "dummy.h"
+static int OpenRenderer( vlc_object_t * );
+
+vlc_module_begin ()
+    set_shortname( N_("Dummy") )
+    set_description( N_("Dummy font renderer") )
+    set_capability( "text renderer", 1 )
+    set_callbacks( OpenRenderer, NULL )
+vlc_module_end ()
+
 
 static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
                        subpicture_region_t *p_region_in,
@@ -40,11 +48,10 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
     return VLC_EGENERIC;
 }
 
-int OpenRenderer( vlc_object_t *p_this )
+static int OpenRenderer( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
     p_filter->pf_render_text = RenderText;
     p_filter->pf_render_html = NULL;
     return VLC_SUCCESS;
 }
-
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cdff9fc..2c21346 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -913,7 +913,6 @@ modules/misc/dhparams.h
 modules/misc/dummy/dummy.c
 modules/misc/dummy/dummy.h
 modules/misc/dummy/interface.c
-modules/misc/dummy/renderer.c
 modules/misc/gnutls.c
 modules/misc/inhibit.c
 modules/misc/inhibit/osso.c
@@ -945,6 +944,7 @@ modules/misc/stats/stats.h
 modules/misc/text_renderer/freetype.c
 modules/misc/text_renderer/quartztext.c
 modules/misc/text_renderer/svg.c
+modules/misc/text_renderer/tdummy.c
 modules/misc/text_renderer/win32text.c
 modules/misc/xml/libxml.c
 modules/mmx/memcpy.c



More information about the vlc-commits mailing list