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

Hugo Beauzée-Luyssen beauze.h at gmail.com
Sun Jan 22 20:32:49 CET 2012


On Sun, Jan 22, 2012 at 5:26 PM, Laurent Aimar <fenrir at elivagar.org> wrote:
> 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
>

These patches should solve it.

Regards,

-- 
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-bluray-Store-subpicture-regions-in-an-external-struc.patch
Type: text/x-patch
Size: 14862 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120122/7aa302c0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-bluray-Use-refcounting-to-avoid-accessing-invalid-fi.patch
Type: text/x-patch
Size: 14208 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120122/7aa302c0/attachment-0001.bin>


More information about the vlc-devel mailing list