[vlc-devel] [vlc-commits] videotoolbox: add an option to enable hwdec

Marvin Scholz epirat07 at gmail.com
Mon Apr 23 18:42:06 CEST 2018



On 23 Apr 2018, at 18:35, David Fuhrmann wrote:

>> Am 23.04.2018 um 17:31 schrieb Thomas Guillem <git at videolan.org>:
>>
>> vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri 
>> Apr 20 16:28:14 2018 +0200| 
>> [28af3c70540e77af52cb788a7322050c1650d367] | committer: Thomas 
>> Guillem
>>
>> videotoolbox: add an option to enable hwdec
>>
>> Use --no-videotoolbox to disable hardware-accelerated video decoding 
>> on
>> macOS/iOS.
>>
>> (cherry picked from commit edc7ccd9a70267830b257ebfcc6700dbdc095650)
>> (cherry picked from commit 5b3e1a9d099e52987716a4bfe2d910bc7784d718)
>>
>> Remove the translation for 3.0.
>
> Hello,
>
> If we want to add this option to simple prefs, and merge that as well 
> for 3.0, I am afraid that we should not do that without translation.

IMO this is no reason to not add it. Yes it needs translations but if we 
wait for all translations
for everything, things will take forever... Not having a translation for 
something is not ideal, but
not having it at all is worse, no?

>
> Each element in simple prefs should be translated. Also, we already 
> have at least one macOS UI string, and maybe more in qt intf, which 
> definitely needs translation on the 3.0 branch.
>
> BR. David
>
>>
>> Signed-off-by: Thomas Guillem <thomas at gllm.fr>
>>
>>> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=28af3c70540e77af52cb788a7322050c1650d367
>> ---
>>
>> modules/codec/videotoolbox.m | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/modules/codec/videotoolbox.m 
>> b/modules/codec/videotoolbox.m
>> index 2cd2bfd4b9..b041d23b18 100644
>> --- a/modules/codec/videotoolbox.m
>> +++ b/modules/codec/videotoolbox.m
>> @@ -78,6 +78,7 @@ const CFStringRef 
>> kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDe
>> static int OpenDecoder(vlc_object_t *);
>> static void CloseDecoder(vlc_object_t *);
>>
>> +#define VT_ENABLE_TEXT "Enable hardware acceleration"
>> #define VT_REQUIRE_HW_DEC N_("Use Hardware decoders only")
>> #define VT_FORCE_CVPX_CHROMA "Force the VT decoder CVPX chroma"
>> #define VT_FORCE_CVPX_CHROMA_LONG "Values can be 'BGRA', 'y420', 
>> '420f', '420v', '2vuy'. \
>> @@ -91,6 +92,7 @@ set_capability("video decoder",800)
>> set_callbacks(OpenDecoder, CloseDecoder)
>>
>> add_obsolete_bool("videotoolbox-temporal-deinterlacing")
>> +add_bool("videotoolbox", true, VT_ENABLE_TEXT, NULL, false)
>> add_bool("videotoolbox-hw-decoder-only", true, VT_REQUIRE_HW_DEC, 
>> VT_REQUIRE_HW_DEC, false)
>> add_string("videotoolbox-cvpx-chroma", "", VT_FORCE_CVPX_CHROMA, 
>> VT_FORCE_CVPX_CHROMA_LONG, true);
>> vlc_module_end()
>> @@ -1331,6 +1333,9 @@ static int OpenDecoder(vlc_object_t *p_this)
>> {
>>     decoder_t *p_dec = (decoder_t *)p_this;
>>
>> +    if (!var_InheritBool(p_dec, "videotoolbox"))
>> +        return VLC_EGENERIC;
>> +
>> #if TARGET_OS_IPHONE
>>     if (unlikely([[UIDevice currentDevice].systemVersion floatValue] 
>> < 8.0)) {
>>         msg_Warn(p_dec, "decoder skipped as OS is too old");
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>
> _______________________________________________
> 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