4 * copyright (c) 2011 Sebastien Zwickert
6 * This file is part of FFmpeg.
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 * @ingroup lavc_codec_hwaccel_vda
29 * Public libavcodec VDA header.
34 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
35 // http://openradar.appspot.com/8026390
36 #undef __GNUC_STDC_INLINE__
38 #define Picture QuickdrawPicture
39 #include <VideoDecodeAcceleration/VDADecoder.h>
42 #include "libavcodec/version.h"
45 * @defgroup lavc_codec_hwaccel_vda VDA
46 * @ingroup lavc_codec_hwaccel
52 * This structure is used to provide the necessary configurations and data
53 * to the VDA FFmpeg HWAccel implementation.
55 * The application must make it available as AVCodecContext.hwaccel_context.
62 * - decoding: Set/Unset by libavcodec.
67 * The Core Video pixel buffer that contains the current image data.
70 * decoding: Set by libavcodec. Unset by user.
72 CVPixelBufferRef cv_buffer;
75 * Use the hardware decoder in synchronous mode.
78 * decoding: Set by user.
80 int use_sync_decoding;
86 * - decoding: Set/Unset by user.
94 * - decoding: Set/Unset by user.
102 * - decoding: Set/Unset by user.
107 * The pixel format for output image buffers.
110 * - decoding: Set/Unset by user.
112 OSType cv_pix_fmt_type;
115 * The current bitstream buffer.
118 * - decoding: Set/Unset by libavcodec.
120 uint8_t *priv_bitstream;
123 * The current size of the bitstream.
126 * - decoding: Set/Unset by libavcodec.
128 int priv_bitstream_size;
131 * The reference size used for fast reallocation.
134 * - decoding: Set/Unset by libavcodec.
136 int priv_allocated_size;
139 * Use av_buffer to manage buffer.
140 * When the flag is set, the CVPixelBuffers returned by the decoder will
141 * be released automatically, so you have to retain them if necessary.
142 * Not setting this flag may cause memory leak.
145 * decoding: Set by user.
150 /** Create the video decoder. */
151 int ff_vda_create_decoder(struct vda_context *vda_ctx,
155 /** Destroy the video decoder. */
156 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
162 #endif /* AVCODEC_VDA_H */