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

Hugo Beauzée-Luyssen beauze.h at gmail.com
Sun Jan 22 17:06:57 CET 2012


On Sun, Jan 22, 2012 at 1:13 AM, Laurent Aimar <fenrir at elivagar.org> wrote:
> Hi,
>
> On Sun, Jan 22, 2012 at 12:31:03AM +0100, Hugo Beauzée-Luyssen wrote:
>> @@ -568,6 +723,20 @@ static int blurayDemuxMenu( demux_t *p_demux )
>>      }
>>      p_block->i_buffer = nread;
>>
>> +    if ( p_sys->current_overlay != -1 )
>> +    {
>> +        if ( p_sys->p_vout == NULL )
>> +            p_sys->p_vout = input_GetVout( p_sys->p_input );
>> +        if ( p_sys->p_vout != NULL )
>> +        {
>> +            p_sys->p_pic[p_sys->current_overlay]->i_start =
>> +                    p_sys->p_pic[p_sys->current_overlay]->i_stop = mdate();
>> +            p_sys->p_pic[p_sys->current_overlay]->i_channel =
>> +                    vout_RegisterSubpictureChannel( p_sys->p_vout );
>> +            vout_PutSubpicture( p_sys->p_vout, p_sys->p_pic[p_sys->current_overlay] );
>  Becareful, once you send a picture using vout_PutSubpicture() you must not
> dereference it nor release it anymore. The vout take ownership of the
> subpicture.
>
> 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.
>
>> +            p_sys->current_overlay = -1;
>> +        }
>> +    }
>>      stream_DemuxSend( p_sys->p_parser, p_block );
>>      return 1;
>>  }
>
> Regards,
>

Hi,

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!

Regards,

-- 
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-bluray-Support-overlay-updates.patch
Type: text/x-patch
Size: 14735 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120122/cfb98c4e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-bluray-Handle-overlay-clearing.patch
Type: text/x-patch
Size: 991 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120122/cfb98c4e/attachment-0001.bin>


More information about the vlc-devel mailing list