Miam-Player  0.8.0
A nice music player
vda.h
Go to the documentation of this file.
1 /*
2  * VDA HW acceleration
3  *
4  * copyright (c) 2011 Sebastien Zwickert
5  *
6  * This file is part of FFmpeg.
7  *
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.
12  *
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.
17  *
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
21  */
22 
23 #ifndef AVCODEC_VDA_H
24 #define AVCODEC_VDA_H
25 
32 #include "libavcodec/avcodec.h"
33 
34 #include <stdint.h>
35 
36 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
37 // http://openradar.appspot.com/8026390
38 #undef __GNUC_STDC_INLINE__
39 
40 #define Picture QuickdrawPicture
41 #include <VideoDecodeAcceleration/VDADecoder.h>
42 #undef Picture
43 
44 #include "libavcodec/version.h"
45 
46 // extra flags not defined in VDADecoder.h
47 enum {
50 };
51 
65 struct vda_context {
72  VDADecoder decoder;
73 
80  CVPixelBufferRef cv_buffer;
81 
89 
96  int width;
97 
104  int height;
105 
112  int format;
113 
121 
125  uint8_t *priv_bitstream;
126 
131 
136 
147 };
148 
150 int ff_vda_create_decoder(struct vda_context *vda_ctx,
151  uint8_t *extradata,
152  int extradata_size);
153 
155 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
156 
163 typedef struct AVVDAContext {
167  VDADecoder decoder;
168 
173  VDADecoderOutputCallback output_callback;
174 
180 } AVVDAContext;
181 
196 
206 
217 
225 
230 #endif /* AVCODEC_VDA_H */
Definition: vda.h:48
int av_vda_default_init2(AVCodecContext *avctx, AVVDAContext *vdactx)
void av_vda_default_free(AVCodecContext *avctx)
int format
Definition: vda.h:112
VDADecoder decoder
Definition: vda.h:167
OSType cv_pix_fmt_type
Definition: vda.h:120
int use_ref_buffer
Definition: vda.h:146
int width
Definition: vda.h:96
int av_vda_default_init(AVCodecContext *avctx)
struct AVVDAContext AVVDAContext
CVPixelBufferRef cv_buffer
Definition: vda.h:80
Definition: vda.h:49
VDADecoder decoder
Definition: vda.h:72
Definition: vda.h:163
Definition: vda.h:65
OSType cv_pix_fmt_type
Definition: vda.h:179
Definition: avcodec.h:1676
int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
int use_sync_decoding
Definition: vda.h:88
uint8_t * priv_bitstream
Definition: vda.h:125
VDADecoderOutputCallback output_callback
Definition: vda.h:173
int ff_vda_create_decoder(struct vda_context *vda_ctx, uint8_t *extradata, int extradata_size)
int priv_allocated_size
Definition: vda.h:135
AVVDAContext * av_vda_alloc_context(void)
int height
Definition: vda.h:104
int priv_bitstream_size
Definition: vda.h:130