]> git.sesse.net Git - vlc/commitdiff
* vout_ShowTextAbsolute now returns VLC_EGENERIC if the text render wasn't
authorAndre Pang <andrep@videolan.org>
Wed, 14 Apr 2004 06:09:56 +0000 (06:09 +0000)
committerAndre Pang <andrep@videolan.org>
Wed, 14 Apr 2004 06:09:56 +0000 (06:09 +0000)
  successful and VLC_SUCCESS on success, instead of returning void.

include/osd.h
src/video_output/video_text.c

index e9d2745269c55dedd68bb9435728af7aa09158d5..7fbf49ab81f9f9817931d438a12a267cf085d590 100644 (file)
@@ -2,7 +2,7 @@
  * osd.h : Constants for use with osd modules
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: osd.h,v 1.7 2004/02/15 18:22:26 sigmunau Exp $
+ * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -46,7 +46,7 @@ struct text_style_t
 static const text_style_t default_text_style = { 22, 0xffffff, VLC_FALSE, VLC_FALSE, VLC_FALSE };
 
 VLC_EXPORT( subpicture_t *, vout_ShowTextRelative, ( vout_thread_t *, char *, text_style_t *, int, int, int, mtime_t ) );
-VLC_EXPORT( void,  vout_ShowTextAbsolute, ( vout_thread_t *, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
+VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
 VLC_EXPORT( void,  __vout_OSDMessage, ( vlc_object_t *, char *, ... ) );
 /**
  * Same as __vlc_OSDMessage() but with automatic casting
index a4efdc201023a19e651f7ff14c269842b6d054b1..95443c6a39c7345258f2706587293dab6b0ea2e6 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: video_text.c,v 1.52 2004/02/17 03:12:00 hartman Exp $
+ * $Id$
  *
  * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -67,19 +67,21 @@ subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string,
  *               if this is 0 the string will be shown untill the next string
  *               is about to be shown
  */
-void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
-                              text_style_t *p_style, int i_flags,
-                              int i_hmargin, int i_vmargin, mtime_t i_start,
-                              mtime_t i_stop )
+int vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
+                           text_style_t *p_style, int i_flags,
+                           int i_hmargin, int i_vmargin, mtime_t i_start,
+                           mtime_t i_stop )
 {
     if ( p_vout->pf_add_string )
     {
-        p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, i_hmargin,
-                               i_vmargin, i_start, i_stop );
+        p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags,
+                               i_hmargin, i_vmargin, i_start, i_stop );
+        return VLC_SUCCESS;
     }
     else
     {
         msg_Warn( p_vout, "No text renderer found" );
+        return VLC_EGENERIC;
     }
 }