[FFmpeg-devel] [PATCH] hwaccel: add VideoToolbox support.
Sebastien Zwickert
dilaroga at gmail.com
Thu Sep 13 16:07:25 CEST 2012
On Sep 13, 2012, at 3:42 PM, Sebastien Zwickert <dilaroga at gmail.com> wrote:
> +/*
> +CFDictionaryRef ff_vt_decoder_config_create(CMVideoCodecType codec_type,
> + uint8_t *extradata, int size)
> +{
> + CFMutableDictionaryRef config_info = NULL;
> + if (size) {
> + CFMutableDictionaryRef avc_info;
> + CFDataRef data;
> +
> + config_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
> + 1,
> + &kCFTypeDictionaryKeyCallBacks,
> + &kCFTypeDictionaryValueCallBacks);
> + avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
> + 1,
> + &kCFTypeDictionaryKeyCallBacks,
> + &kCFTypeDictionaryValueCallBacks);
> +
> + switch (codec_type) {
> + case kCMVideoCodecType_MPEG4Video :
> + data = vt_esds_extradata_create(extradata, size);
> + if (data)
> + CFDictionarySetValue(avc_info, CFSTR("esds"), data);
> + break;
> + case kCMVideoCodecType_H264 :
> + data = vt_avcc_extradata_create(extradata, size);
> + if (data)
> + CFDictionarySetValue(avc_info, CFSTR("avcC"), data);
> + break;
> + default:
> + break;
> + }
> +
> + CFDictionarySetValue(config_info,
> + kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms,
> + avc_info);
> +
> + if (data)
> + CFRelease(data);
> + CFRelease(avc_info);
> + }
> + return config_info;
> +}
> +*/
Arf! Dead code removed locally... I'll wait for review and comments about this patch to send an updated one.
Sorry.
Best regards,
--
Sebastien Zwickert
More information about the ffmpeg-devel
mailing list