[vlc-commits] videotoolbox: Do not set unsupported properties for iOS
Marvin Scholz
git at videolan.org
Fri Jan 24 15:35:22 CET 2020
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Jan 24 12:52:42 2020 +0100| [6e1c6c7ba4876683074f29029116b3a0dc61a93f] | committer: Marvin Scholz
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e1c6c7ba4876683074f29029116b3a0dc61a93f
---
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 28d97703a0..b14aa527d6 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,
More information about the vlc-commits
mailing list