[vlc-commits] osd: privatize osd_ShowText(Absolute|Relative)

Rémi Denis-Courmont git at videolan.org
Thu Jan 31 17:39:32 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 31 18:37:26 2013 +0200| [6af9706ba7a98108a59843eb3e7298daf8c62af4] | committer: Rémi Denis-Courmont

osd: privatize osd_ShowText(Absolute|Relative)

(Functions reordered to avoid forward declaration.)

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

 include/vlc_osd.h           |    2 --
 src/libvlccore.sym          |    2 --
 src/video_output/osd_text.c |   47 ++++++++++++++++++++++---------------------
 3 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/include/vlc_osd.h b/include/vlc_osd.h
index f55f893..533c026 100644
--- a/include/vlc_osd.h
+++ b/include/vlc_osd.h
@@ -433,8 +433,6 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, bool b_value )
  * object. The types are declared in the include file include/vlc_osd.h
  * @see vlc_osd.h
  */
-VLC_API int osd_ShowTextRelative( spu_t *, int, const char *, const text_style_t *, int, int, int, mtime_t );
-VLC_API int osd_ShowTextAbsolute( spu_t *, int, const char *, const text_style_t *, int, int, int, mtime_t, mtime_t );
 VLC_API void osd_Message( spu_t *, int, char *, ... ) VLC_FORMAT( 3, 4 );
 
 /** @} */
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index d9caefb..4e27c52 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -287,8 +287,6 @@ osd_MenuPrev
 osd_MenuShow
 osd_MenuUp
 osd_Message
-osd_ShowTextAbsolute
-osd_ShowTextRelative
 path_sanitize
 picture_BlendSubpicture
 picture_CopyPixels
diff --git a/src/video_output/osd_text.c b/src/video_output/osd_text.c
index 577fbcc..b3f4e86 100644
--- a/src/video_output/osd_text.c
+++ b/src/video_output/osd_text.c
@@ -31,29 +31,6 @@
 #include <vlc_osd.h>
 
 /**
- * \brief Show text on the video for some time
- * \param p_spu pointer to the subpicture queue the text is to be showed on
- * \param i_channel Subpicture channel
- * \param psz_string The text to be shown
- * \param p_style Pointer to a struct with text style info (it is duplicated)
- * \param i_flags flags for alignment and such
- * \param i_hmargin horizontal margin in pixels
- * \param i_vmargin vertical margin in pixels
- * \param i_duration Amount of time the text is to be shown.
- */
-int osd_ShowTextRelative( spu_t *p_spu, int i_channel,
-                           const char *psz_string, const text_style_t *p_style,
-                           int i_flags, int i_hmargin, int i_vmargin,
-                           mtime_t i_duration )
-{
-    mtime_t i_now = mdate();
-
-    return osd_ShowTextAbsolute( p_spu, i_channel, psz_string,
-                                  p_style, i_flags, i_hmargin, i_vmargin,
-                                  i_now, i_now + i_duration );
-}
-
-/**
  * \brief Show text on the video from a given start date to a given end date
  * \param p_spu pointer to the subpicture queue the text is to be showed on
  * \param i_channel Subpicture channel
@@ -67,6 +44,7 @@ int osd_ShowTextRelative( spu_t *p_spu, int i_channel,
  *               if this is 0 the string will be shown untill the next string
  *               is about to be shown
  */
+static
 int osd_ShowTextAbsolute( spu_t *p_spu_channel, int i_channel,
                            const char *psz_string, const text_style_t *p_style,
                            int i_flags, int i_hmargin, int i_vmargin,
@@ -111,6 +89,29 @@ int osd_ShowTextAbsolute( spu_t *p_spu_channel, int i_channel,
     return VLC_SUCCESS;
 }
 
+/**
+ * \brief Show text on the video for some time
+ * \param p_spu pointer to the subpicture queue the text is to be showed on
+ * \param i_channel Subpicture channel
+ * \param psz_string The text to be shown
+ * \param p_style Pointer to a struct with text style info (it is duplicated)
+ * \param i_flags flags for alignment and such
+ * \param i_hmargin horizontal margin in pixels
+ * \param i_vmargin vertical margin in pixels
+ * \param i_duration Amount of time the text is to be shown.
+ */
+static
+int osd_ShowTextRelative( spu_t *p_spu, int i_channel,
+                           const char *psz_string, const text_style_t *p_style,
+                           int i_flags, int i_hmargin, int i_vmargin,
+                           mtime_t i_duration )
+{
+    mtime_t i_now = mdate();
+
+    return osd_ShowTextAbsolute( p_spu, i_channel, psz_string,
+                                  p_style, i_flags, i_hmargin, i_vmargin,
+                                  i_now, i_now + i_duration );
+}
 
 /**
  * \brief Write an informative message at the default location,



More information about the vlc-commits mailing list