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"
49 * @defgroup lavc_codec_hwaccel_vda VDA
50 * @ingroup lavc_codec_hwaccel
57 * This structure is used to store decoded frame information and data.
59 * @deprecated Use synchronous decoding mode.
63 * The PTS of the frame.
66 * - decoding: Set/Unset by libavcodec.
71 * The CoreVideo buffer that contains the decoded data.
74 * - decoding: Set/Unset by libavcodec.
76 CVPixelBufferRef cv_buffer;
79 * A pointer to the next frame.
82 * - decoding: Set/Unset by libavcodec.
84 struct vda_frame *next_frame;
89 * This structure is used to provide the necessary configurations and data
90 * to the VDA FFmpeg HWAccel implementation.
92 * The application must make it available as AVCodecContext.hwaccel_context.
99 * - decoding: Set/Unset by libavcodec.
104 * The Core Video pixel buffer that contains the current image data.
107 * decoding: Set by libavcodec. Unset by user.
109 CVPixelBufferRef cv_buffer;
112 * Use the hardware decoder in synchronous mode.
115 * decoding: Set by user.
117 int use_sync_decoding;
121 * VDA frames queue ordered by presentation timestamp.
123 * @deprecated Use synchronous decoding mode.
126 * - decoding: Set/Unset by libavcodec.
131 * Mutex for locking queue operations.
133 * @deprecated Use synchronous decoding mode.
136 * - decoding: Set/Unset by libavcodec.
138 pthread_mutex_t queue_mutex;
145 * - decoding: Set/Unset by user.
153 * - decoding: Set/Unset by user.
161 * - decoding: Set/Unset by user.
166 * The pixel format for output image buffers.
169 * - decoding: Set/Unset by user.
171 OSType cv_pix_fmt_type;
174 * The current bitstream buffer.
177 * - decoding: Set/Unset by libavcodec.
179 uint8_t *priv_bitstream;
182 * The current size of the bitstream.
185 * - decoding: Set/Unset by libavcodec.
187 int priv_bitstream_size;
190 * The reference size used for fast reallocation.
193 * - decoding: Set/Unset by libavcodec.
195 int priv_allocated_size;
198 /** Create the video decoder. */
199 int ff_vda_create_decoder(struct vda_context *vda_ctx,
203 /** Destroy the video decoder. */
204 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
208 * Return the top frame of the queue.
210 * @deprecated Use synchronous decoding mode.
212 vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
215 * Release the given frame.
217 * @deprecated Use synchronous decoding mode.
219 void ff_vda_release_vda_frame(vda_frame *frame);
226 #endif /* AVCODEC_VDA_H */