Commit aa756469 authored by Felix Paul Kühne's avatar Felix Paul Kühne

videotoolbox: fetch config early enough for late start, set OpenGL compat key

parent 17135fda
...@@ -261,6 +261,7 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) ...@@ -261,6 +261,7 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
CFDictionarySetValue(decoderConfiguration, CFDictionarySetValue(decoderConfiguration,
kCVImageBufferChromaLocationTopFieldKey, kCVImageBufferChromaLocationTopFieldKey,
kCVImageBufferChromaLocation_Left); kCVImageBufferChromaLocation_Left);
p_sys->b_zero_copy = var_InheritBool(p_dec, "videotoolbox-zero-copy");
/* fetch extradata */ /* fetch extradata */
CFMutableDictionaryRef extradata_info = NULL; CFMutableDictionaryRef extradata_info = NULL;
...@@ -476,19 +477,16 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block) ...@@ -476,19 +477,16 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_sys->b_zero_copy = var_InheritBool(p_dec, "videotoolbox-zero-copy");
/* destination pixel buffer attributes */ /* destination pixel buffer attributes */
CFMutableDictionaryRef dpba = CFDictionaryCreateMutable(kCFAllocatorDefault, CFMutableDictionaryRef dpba = CFDictionaryCreateMutable(kCFAllocatorDefault,
2, 2,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks); &kCFTypeDictionaryValueCallBacks);
/* we need to change the following keys for convienence
* conversations as soon as we have a 0-copy pipeline */
#if !TARGET_OS_IPHONE #if !TARGET_OS_IPHONE
CFDictionarySetValue(dpba, CFDictionarySetValue(dpba,
kCVPixelBufferOpenGLCompatibilityKey, kCVPixelBufferOpenGLCompatibilityKey,
kCFBooleanFalse); kCFBooleanTrue);
#else #else
CFDictionarySetValue(dpba, CFDictionarySetValue(dpba,
kCVPixelBufferOpenGLESCompatibilityKey, kCVPixelBufferOpenGLESCompatibilityKey,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment