• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/vda.h

Go to the documentation of this file.
00001 /*
00002  * VDA HW acceleration
00003  *
00004  * copyright (c) 2011 Sebastien Zwickert
00005  *
00006  * This file is part of FFmpeg.
00007  *
00008  * FFmpeg is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * FFmpeg is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with FFmpeg; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00021  */
00022 
00023 #ifndef AVCODEC_VDA_H
00024 #define AVCODEC_VDA_H
00025 
00026 #include <pthread.h>
00027 #include <stdint.h>
00028 
00029 // emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
00030 // http://openradar.appspot.com/8026390
00031 #undef __GNUC_STDC_INLINE__
00032 
00033 #define Picture QuickdrawPicture
00034 #include <VideoDecodeAcceleration/VDADecoder.h>
00035 #undef Picture
00036 
00040 typedef struct {
00047     int64_t             pts;
00048 
00055     CVPixelBufferRef    cv_buffer;
00056 
00063     struct vda_frame    *next_frame;
00064 } vda_frame;
00065 
00072 struct vda_context {
00079     VDADecoder          decoder;
00080 
00087     vda_frame           *queue;
00088 
00095     pthread_mutex_t     queue_mutex;
00096 
00103     int                 width;
00104 
00111     int                 height;
00112 
00119     int                 format;
00120 
00127     OSType              cv_pix_fmt_type;
00128 
00135     uint8_t             *bitstream;
00136 
00143     int                 bitstream_size;
00144 
00151     int                 ref_size;
00152 };
00153 
00155 int ff_vda_create_decoder(struct vda_context *vda_ctx,
00156                           uint8_t *extradata,
00157                           int extradata_size);
00158 
00160 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
00161 
00163 vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
00164 
00166 void ff_vda_release_vda_frame(vda_frame *frame);
00167 
00168 #endif /* AVCODEC_VDA_H */
Generated on Fri Feb 1 2013 14:34:26 for FFmpeg by doxygen 1.7.1