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 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
29 // http://openradar.appspot.com/8026390
30 #undef __GNUC_STDC_INLINE__
32 #define Picture QuickdrawPicture
36 #include <VideoDecodeAcceleration/VDADecoder.h>
39 * This structure is used to store a decoded frame information and data.
44 * The PTS of the frame.
47 * - decoding: Set/Unset by libavcodec.
52 * The CoreVideo buffer that contains the decoded data.
55 * - decoding: Set/Unset by libavcodec.
57 CVPixelBufferRef cv_buffer;
60 * A pointer to the next frame.
63 * - decoding: Set/Unset by libavcodec.
65 struct vda_frame *next_frame;
70 * This structure is used to provide the necessary configurations and data
71 * to the VDA FFmpeg HWAccel implementation.
73 * The application must make it available as AVCodecContext.hwaccel_context.
81 * - decoding: Set/Unset by libavcodec.
86 * VDA frames queue ordered by presentation timestamp.
89 * - decoding: Set/Unset by libavcodec.
94 * Mutex for locking queue operations.
97 * - decoding: Set/Unset by libavcodec.
105 * - decoding: Set/Unset by user.
113 * - decoding: Set/Unset by user.
121 * - decoding: Set/Unset by user.
126 * The pixel format for output image buffers.
129 * - decoding: Set/Unset by user.
131 OSType cv_pix_fmt_type;
134 * The current bitstream buffer.
137 * - decoding: Set/Unset by libavcodec.
142 * The current size of the bitstream.
145 * - decoding: Set/Unset by libavcodec.
150 * The reference size used for fast reallocation.
153 * - decoding: Set/Unset by libavcodec.
158 /** Creates the video decoder. */
159 int ff_vda_create_decoder(struct vda_context *vda_ctx,
163 /** Destroys the video decoder. */
164 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
166 /** Returns the top frame of the queue. */
167 vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
169 /** Releases the given frame. */
170 void ff_vda_release_vda_frame(vda_frame *frame);
172 #endif /* AVCODEC_VDA_H */