]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Amend AVCodecContext with hwaccel_context (HW accelerator context).
authorgb <gb@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 17 Mar 2009 12:43:09 +0000 (12:43 +0000)
committergb <gb@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 17 Mar 2009 12:43:09 +0000 (12:43 +0000)
This is needed for some HW accelerators that require a context that
FFmpeg can't instantiate itself. e.g. display-dependent data from
VA API and VDPAU.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18025 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/avcodec.h

index 10424384eae0590d3d49969d1292eaecb27db020..3adc941ca83c8ead1691ace1a4a110f3bba1db08 100644 (file)
@@ -2340,6 +2340,18 @@ typedef struct AVCodecContext {
      * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
      */
     int ticks_per_frame;
+
+    /**
+     * Hardware accelerator context.
+     * For some hardware accelerators, a global context needs to be
+     * provided by the user. In that case, this holds display-dependent
+     * data FFmpeg cannot instantiate itself. Please refer to the
+     * FFmpeg HW accelerator documentation to know how to fill this
+     * is. e.g. for VA API, this is a struct vaapi_context.
+     * - encoding: unused
+     * - decoding: Set by user
+     */
+    void *hwaccel_context;
 } AVCodecContext;
 
 /**