# HG changeset patch # User gb # Date 1237293789 0 # Node ID 12f23f37664bcd7cfe86ff5012286b3e3ddb5a32 # Parent 323e4f591d7a209611136c99d994614bc722b4b9 Amend AVCodecContext with hwaccel_context (HW accelerator context). 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. diff -r 323e4f591d7a -r 12f23f37664b avcodec.h --- a/avcodec.h Tue Mar 17 01:43:01 2009 +0000 +++ b/avcodec.h Tue Mar 17 12:43:09 2009 +0000 @@ -2340,6 +2340,18 @@ * 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; /**