• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • 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 Libav.
00007  *
00008  * Libav 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  * Libav 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 Libav; 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 vda_frame {
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 };
00129 
00131 int ff_vda_create_decoder(struct vda_context *vda_ctx,
00132                           uint8_t *extradata,
00133                           int extradata_size);
00134 
00136 int ff_vda_destroy_decoder(struct vda_context *vda_ctx);
00137 
00139 vda_frame *ff_vda_queue_pop(struct vda_context *vda_ctx);
00140 
00142 void ff_vda_release_vda_frame(vda_frame *frame);
00143 
00144 #endif /* AVCODEC_VDA_H */
Generated on Sat Mar 17 2012 12:57:51 for Libav by doxygen 1.7.1