[vlc-devel] [PATCH] libvlc: inherit avcodec-hw so it can be forced in libvlc_new()

Steve Lhomme robux4 at videolabs.io
Mon Aug 3 12:19:23 CEST 2015


On Mon, Aug 3, 2015 at 11:49 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2015-08-03 12:31, Steve Lhomme a écrit :
>>
>> ---
>>  lib/media_player.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/media_player.c b/lib/media_player.c
>> index ba7158e..5c6a8c9 100644
>> --- a/lib/media_player.c
>> +++ b/lib/media_player.c
>> @@ -578,7 +578,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
>>      var_Create (mp, "vmem-width", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
>>      var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
>>      var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
>> -    var_Create (mp, "avcodec-hw", VLC_VAR_STRING);
>> +    var_Create (mp, "avcodec-hw", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
>>      var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
>>  #if defined (_WIN32) || defined (__OS2__)
>>      var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);
>
>
> We only inherit values when the empty/zero value is not compatible with the
> expected default behaviour.
>
> This patch wouldn't work anyway. LibVLC will promptly clobber the value.

Do you have a solution to the original problem that (also) work ?

If I pass "--avcodec-hw=d3d11va" it isn't applied, because the value
used comes from the media player object (created as "" without the
inherit), not its parent where we set the value.

> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list