[vlc-devel] [PATCH 08/12] bluray: Adding support for overlay.

Laurent Aimar fenrir at elivagar.org
Sun Jan 22 17:26:42 CET 2012


On Sun, Jan 22, 2012 at 05:06:57PM +0100, Hugo Beauzée-Luyssen wrote:
> > If you need to update it later, you have 2 choices:
> >  - you can send a new one to invalid the previous one (if you use ephemere
> >  subpictures)
> >  - you can use the subpicture_updater_t facility. In this case, you need to
> >  properly lock and refcount things as subpicture_updater_t functions will
> >  be called asynchronously from the vout thread.

> Attached are two patches that handle overlay updating using
> subpicture_updater_t, thus without using the subpicture_t directly
> once it has been sent to the vout.
> Thanks for the review!


> +struct subpicture_updater_sys_t
> +{
> +    demux_sys_t *p_demux_sys;
> +    int         i_plane;
> +};
 Becareful, the vout can outlive the demuxer and thus accessing p_demux_sys
from the updater callbacks may not always be valid.
 You could create a structure that holds what is needed for the subpictures
and for the demuxer and then use refcounting (vlc_gc_* could be used).

Regards

-- 
fenrir



More information about the vlc-devel mailing list