28 #include <CoreFoundation/CoreFoundation.h>
34 #ifndef kCFCoreFoundationVersionNumber10_7
35 #define kCFCoreFoundationVersionNumber10_7 635.00
70 pic->
data[0] = (
void *)1;
79 CVPixelBufferUnlockBaseAddress(cv_buffer, 0);
80 CVPixelBufferRelease(cv_buffer);
82 for (i = 0; i < 4; i++)
93 ret = ff_h264_decoder.
decode(avctx, data, got_frame, avpkt);
96 CVPixelBufferLockBaseAddress(cv_buffer, 0);
98 if (CVPixelBufferIsPlanar(cv_buffer)) {
99 int i, count = CVPixelBufferGetPlaneCount(cv_buffer);
101 for (i = 0; i < count; i++) {
102 pic->
data[i] = CVPixelBufferGetBaseAddressOfPlane(cv_buffer, i);
103 pic->
linesize[i] = CVPixelBufferGetBytesPerRowOfPlane(cv_buffer, i);
106 pic->
data[0] = CVPixelBufferGetBaseAddress(cv_buffer);
107 pic->
linesize[0] = CVPixelBufferGetBytesPerRow(cv_buffer);
122 ff_h264_decoder.
close(avctx);
178 if (!ff_h264_vda_decoder.
pix_fmts) {
215 if (status != kVDADecoderNoErr) {
217 "Failed to init VDA decoder: %d.\n", status);
228 ret = ff_h264_decoder.
init(avctx);
244 return ff_h264_decoder.
flush(avctx);