[vlc-devel] Re: [PATCH] vout_ShowTextAbsolute returns subpicture_t *

Sigmund Augdal sigmunau at stud.ntnu.no
Tue Mar 30 09:06:26 CEST 2004


I think you should return VLC_SUCCESS on success and VLC_E<something> on
failure.

Sigmund


On Tue, Mar 30, 2004 at 10:18:20AM +1000, ozone at algorithm.com.au wrote:
> On 29/03/2004, at 9:24 PM, Sigmund Augdal wrote:
> 
> >Patch does look clear, but I wonder why you want it. Note that the
> >subpicture as added by these functions by be deleted by the vout 
> >thread at
> >any moment. It should not be stored anywhere except
> >p_vout->p_last_osd_message which is updated by the deletion function. 
> >Even
> >this solution isn't very good.
> 
> Ah, I didn't realise that the subpicture is ephemeral and could be 
> deleted at any time.
> 
> The reason for the patch is that I wanted to know whether 
> vout_ShowTextAbsolute succeeded or not: it won't succeed unless there 
> currently is a vout process and there is also a text renderer loaded 
> and ready.  In order to display some subtitles which start at 0 seconds 
> into the media playback, I call vout_ShowTextAbsolute once every 100ms 
> or so, but obviously I want to stop calling it if the subpicture 
> rendering is successful.
> 
> Perhaps instead of returning a subpicture_t *, vout_ShowTextAbsolute 
> can return a bool (VLC_TRUE if displayed successfully; VLC_FALSE if 
> not), or an int (0 == success, not 0 == failure; the usual C 
> convention).
> 
> If there's a better way of doing this such as receiving a notification 
> when the text renderer is loaded and ready, that'd be better, but I 
> couldn't find a way of doing so.
> 
> 
> -- 
> % Andre Pang : trust.in.love.to.save
> 
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
> If you are in trouble, please contact <postmaster at videolan.org>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list