Message ID | 20230612081448.936570-1-haihao.xiang@intel.com |
---|---|
State | Accepted |
Commit | 07139b6deb83a760ef7ddec45797f32478118687 |
Headers | show |
Series | [FFmpeg-devel,1/6] lavfi/qsvvpp: track the runtime version in vpp context | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Ma, 2023-06-12 at 16:14 +0800, Xiang, Haihao wrote: > From: Haihao Xiang <haihao.xiang@intel.com> > > We may check whether a feature is supported via the runtime version in > future. > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > libavfilter/qsvvpp.c | 6 ++++++ > libavfilter/qsvvpp.h | 2 ++ > 2 files changed, 8 insertions(+) > > diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c > index b233b81243..779afce66d 100644 > --- a/libavfilter/qsvvpp.c > +++ b/libavfilter/qsvvpp.c > @@ -655,6 +655,12 @@ static int init_vpp_session(AVFilterContext *avctx, > QSVVPPContext *s) > if (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) { > ret = MFXVideoCORE_SetHandle(s->session, handle_type, handle); > if (ret != MFX_ERR_NONE) > diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h > index 3b32193744..8851185ff3 100644 > --- a/libavfilter/qsvvpp.h > +++ b/libavfilter/qsvvpp.h > @@ -83,6 +83,8 @@ typedef struct QSVVPPContext { > int eof; > /** order with frame_out, sync */ > AVFifo *async_fifo; > + > + mfxVersion ver; > } QSVVPPContext; > > typedef struct QSVVPPCrop { Will apply -Haihao
On Ma, 2023-06-19 at 04:46 +0000, Xiang, Haihao wrote: > On Ma, 2023-06-12 at 16:14 +0800, Xiang, Haihao wrote: > > From: Haihao Xiang <haihao.xiang@intel.com> > > > > We may check whether a feature is supported via the runtime version in > > future. > > > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > > --- > > libavfilter/qsvvpp.c | 6 ++++++ > > libavfilter/qsvvpp.h | 2 ++ > > 2 files changed, 8 insertions(+) > > > > diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c > > index b233b81243..779afce66d 100644 > > --- a/libavfilter/qsvvpp.c > > +++ b/libavfilter/qsvvpp.c > > @@ -655,6 +655,12 @@ static int init_vpp_session(AVFilterContext *avctx, > > QSVVPPContext *s) > > if (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) { > > ret = MFXVideoCORE_SetHandle(s->session, handle_type, handle); > > if (ret != MFX_ERR_NONE) > > diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h > > index 3b32193744..8851185ff3 100644 > > --- a/libavfilter/qsvvpp.h > > +++ b/libavfilter/qsvvpp.h > > @@ -83,6 +83,8 @@ typedef struct QSVVPPContext { > > int eof; > > /** order with frame_out, sync */ > > AVFifo *async_fifo; > > + > > + mfxVersion ver; > > } QSVVPPContext; > > > > typedef struct QSVVPPCrop { > > Will apply Pushed, -Haihao
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index b233b81243..779afce66d 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -655,6 +655,12 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s) if (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) { ret = MFXVideoCORE_SetHandle(s->session, handle_type, handle); if (ret != MFX_ERR_NONE) diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h index 3b32193744..8851185ff3 100644 --- a/libavfilter/qsvvpp.h +++ b/libavfilter/qsvvpp.h @@ -83,6 +83,8 @@ typedef struct QSVVPPContext { int eof; /** order with frame_out, sync */ AVFifo *async_fifo; + + mfxVersion ver; } QSVVPPContext; typedef struct QSVVPPCrop {