Commit 3bc52380 authored by Andre Pang's avatar Andre Pang

* vout_ShowTextAbsolute now returns VLC_EGENERIC if the text render wasn't

  successful and VLC_SUCCESS on success, instead of returning void.
parent ae0569f5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* osd.h : Constants for use with osd modules * osd.h : Constants for use with osd modules
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * 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> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -46,7 +46,7 @@ struct text_style_t ...@@ -46,7 +46,7 @@ struct text_style_t
static const text_style_t default_text_style = { 22, 0xffffff, VLC_FALSE, VLC_FALSE, VLC_FALSE }; 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( 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 *, ... ) ); VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, char *, ... ) );
/** /**
* Same as __vlc_OSDMessage() but with automatic casting * Same as __vlc_OSDMessage() but with automatic casting
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions * video_text.c : text manipulation functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2004 VideoLAN * 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> * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -67,19 +67,21 @@ subpicture_t *vout_ShowTextRelative( vout_thread_t *p_vout, char *psz_string, ...@@ -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 * if this is 0 the string will be shown untill the next string
* is about to be shown * is about to be shown
*/ */
void vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string, int vout_ShowTextAbsolute( vout_thread_t *p_vout, char *psz_string,
text_style_t *p_style, int i_flags, text_style_t *p_style, int i_flags,
int i_hmargin, int i_vmargin, mtime_t i_start, int i_hmargin, int i_vmargin, mtime_t i_start,
mtime_t i_stop ) mtime_t i_stop )
{ {
if ( p_vout->pf_add_string ) if ( p_vout->pf_add_string )
{ {
p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags, i_hmargin, p_vout->pf_add_string( p_vout, psz_string, p_style, i_flags,
i_vmargin, i_start, i_stop ); i_hmargin, i_vmargin, i_start, i_stop );
return VLC_SUCCESS;
} }
else else
{ {
msg_Warn( p_vout, "No text renderer found" ); msg_Warn( p_vout, "No text renderer found" );
return VLC_EGENERIC;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment