On Tue, 5 Sep 2017 23:59:31 +0100 Mark Thompson <s...@jkqxz.net> wrote:
> --- > doc/APIchanges | 3 +++ > libavcodec/avcodec.h | 23 +++++++++++++++++++++++ > 2 files changed, 26 insertions(+) > > diff --git a/doc/APIchanges b/doc/APIchanges > index 6f70f3c96..f21dc4db0 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,9 @@ libavutil: 2017-03-23 > API changes, most recent first: > > 2017-xx-xx - xxxxxxx - lavc 58.x+1.0 - avcodec.h > + Add AVCodecHWConfig and AVCodec.hw_configs. > + > +2017-xx-xx - xxxxxxx - lavc 58.x+1.0 - avcodec.h > Add AV_HWACCEL_FLAG_REUSE_CONTEXT. > > 2017-xx-xx - xxxxxxx - lavfi 7.x+1.0 - avfilter.h > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 89e432d16..4f6b76203 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -35,6 +35,7 @@ > #include "libavutil/cpu.h" > #include "libavutil/dict.h" > #include "libavutil/frame.h" > +#include "libavutil/hwcontext.h" > #include "libavutil/log.h" > #include "libavutil/pixfmt.h" > #include "libavutil/rational.h" > @@ -2773,6 +2774,19 @@ typedef struct AVProfile { > const char *name; ///< short name for the profile > } AVProfile; > > +typedef struct AVCodecHWConfig { > + /** > + * A device type which can be supplied to the codec. > + */ > + enum AVHWDeviceType device_type; > + /** > + * The matching hardware pixel format which the codec can produce. > + * > + * Set to AV_PIX_FMT_NONE if no hardware pixel format is available. > + */ > + enum AVPixelFormat pix_fmt; > +} AVCodecHWConfig; > + > typedef struct AVCodecDefault AVCodecDefault; > > struct AVSubtitle; > @@ -2808,6 +2822,15 @@ typedef struct AVCodec { > const AVClass *priv_class; ///< AVClass for the private > context > const AVProfile *profiles; ///< array of recognized > profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} > > + /** > + * Array of hardware configurations supported by the codec, or NULL > + * if no hardware supported. > + * > + * The array is terminated by a configuration with a device_type of > + * AV_HW_DEVICE_TYPE_NONE. > + */ > + const AVCodecHWConfig *hw_configs; > + > /***************************************************************** > * No fields below this line are part of the public API. They > * may not be used outside of libavcodec and can be changed and What if a decoder provides hardware decoding, but has no associated AVHWDeviceType? (Such as mmal.) _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel