From 6e1c6c7ba4876683074f29029116b3a0dc61a93f Mon Sep 17 00:00:00 2001 From: Marvin Scholz <epirat07@gmail.com> Date: Fri, 24 Jan 2020 12:52:42 +0100 Subject: [PATCH] videotoolbox: Do not set unsupported properties for iOS Instead of defining these constants when not building for macOS and setting them anyway on iOS even though those are not supported there, just set them on macOS and never do this for iOS. --- modules/codec/videotoolbox.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c index 28d97703a0aa..b14aa527d6e0 100644 --- a/modules/codec/videotoolbox.c +++ b/modules/codec/videotoolbox.c @@ -51,11 +51,6 @@ #define ALIGN_16( x ) ( ( ( x ) + 15 ) / 16 * 16 ) #define VT_RESTART_MAX 1 -#if (!TARGET_OS_OSX) -const CFStringRef kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder = CFSTR("EnableHardwareAcceleratedVideoDecoder"); -const CFStringRef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder = CFSTR("RequireHardwareAcceleratedVideoDecoder"); -#endif - #pragma mark - module descriptor static int OpenDecoder(vlc_object_t *); @@ -1136,6 +1131,7 @@ static CFMutableDictionaryRef CreateSessionDescriptionFormat(decoder_t *p_dec, CFDictionarySetValue(decoderConfiguration, kCVImageBufferYCbCrMatrixKey, yuvmatrix); +#if TARGET_OS_OSX /* enable HW accelerated playback, since this is optional on OS X * note that the backend may still fallback on software mode if no * suitable hardware is available */ @@ -1149,6 +1145,7 @@ static CFMutableDictionaryRef CreateSessionDescriptionFormat(decoder_t *p_dec, CFDictionarySetValue(decoderConfiguration, kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, kCFBooleanTrue); +#endif CFDictionarySetValue(decoderConfiguration, kVTDecompressionPropertyKey_FieldMode, -- GitLab