lavfi/qsvvpp: track the runtime version in vpp context

We may check whether a feature is supported via the runtime version in
future.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
pull/389/head
Haihao Xiang 2 years ago
parent da4b2549c6
commit 07139b6deb
  1. 6
      libavfilter/qsvvpp.c
  2. 2
      libavfilter/qsvvpp.h

@ -655,6 +655,12 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
if (ret) if (ret)
return ret; return ret;
ret = MFXQueryVersion(s->session, &s->ver);
if (ret != MFX_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Error querying the runtime version\n");
return AVERROR_UNKNOWN;
}
if (handle) { if (handle) {
ret = MFXVideoCORE_SetHandle(s->session, handle_type, handle); ret = MFXVideoCORE_SetHandle(s->session, handle_type, handle);
if (ret != MFX_ERR_NONE) if (ret != MFX_ERR_NONE)

@ -83,6 +83,8 @@ typedef struct QSVVPPContext {
int eof; int eof;
/** order with frame_out, sync */ /** order with frame_out, sync */
AVFifo *async_fifo; AVFifo *async_fifo;
mfxVersion ver;
} QSVVPPContext; } QSVVPPContext;
typedef struct QSVVPPCrop { typedef struct QSVVPPCrop {

Loading…
Cancel
Save