4
* copyright (c) 2011 Sebastien Zwickert
6
* This file is part of Libav.
8
* Libav 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
* Libav 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 Libav; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29
// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
30
// http://openradar.appspot.com/8026390
31
#undef __GNUC_STDC_INLINE__
33
#define Picture QuickdrawPicture
34
#include <VideoDecodeAcceleration/VDADecoder.h>
38
* This structure is used to store a decoded frame information and data.
40
typedef struct vda_frame {
42
* The PTS of the frame.
45
* - decoding: Set/Unset by libavcodec.
50
* The CoreVideo buffer that contains the decoded data.
53
* - decoding: Set/Unset by libavcodec.
55
CVPixelBufferRef cv_buffer;
58
* A pointer to the next frame.
61
* - decoding: Set/Unset by libavcodec.
63
struct vda_frame *next_frame;
67
* This structure is used to provide the necessary configurations and data
68
* to the VDA Libav HWAccel implementation.
70
* The application must make it available as AVCodecContext.hwaccel_context.
77
* - decoding: Set/Unset by libavcodec.
82
* VDA frames queue ordered by presentation timestamp.
85
* - decoding: Set/Unset by libavcodec.
90
* Mutex for locking queue operations.
93
* - decoding: Set/Unset by libavcodec.
95
pthread_mutex_t queue_mutex;
101
* - decoding: Set/Unset by user.
109
* - decoding: Set/Unset by user.
117
* - decoding: Set/Unset by user.
122
* The pixel format for output image buffers.
125
* - decoding: Set/Unset by user.
127
OSType cv_pix_fmt_type;
130
/** Create the video decoder. */
131
int ff_vda_create_decoder(struct vda_context *vda_ctx,
135
/** Destroy the video decoder. */
136
int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
138
/** Return the top frame of the queue. */
139
vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
141
/** Release the given frame. */
142
void ff_vda_release_vda_frame(vda_frame *frame);
144
#endif /* AVCODEC_VDA_H */