[1/2] lavu/qsv: add log message for libmfx version

Message ID 1514453913-3829-1-git-send-email-zhong.li@intel.com
State Committed
Commit e23190269fb6e8217d080918893641ba3e0e3556
Headers show

Commit Message

Li, Zhong Dec. 28, 2017, 9:38 a.m.
It is benefit to diagnose issues related to different libmfx version.

Signed-off-by: Zhong Li <zhong.li@intel.com>
---
 libavutil/hwcontext_qsv.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Luca Barbato Dec. 28, 2017, 10:59 a.m. | #1
On 28/12/2017 10:38, Zhong Li wrote:
> It is benefit to diagnose issues related to different libmfx version.
> 
> Signed-off-by: Zhong Li <zhong.li@intel.com>
> ---
>   libavutil/hwcontext_qsv.c | 4 ++++
>   1 file changed, 4 insertions(+)

Both patches look fine to me. I'll push them tomorrow if nobody is 
against it.

lu
Maxym Dmytrychenko Dec. 28, 2017, 11:13 a.m. | #2
Just fine as well 

> 28 дек. 2017 г., в 11:59, Luca Barbato <lu_zero@gentoo.org> написал(а):
> 
>> On 28/12/2017 10:38, Zhong Li wrote:
>> It is benefit to diagnose issues related to different libmfx version.
>> Signed-off-by: Zhong Li <zhong.li@intel.com>
>> ---
>>  libavutil/hwcontext_qsv.c | 4 ++++
>>  1 file changed, 4 insertions(+)
> 
> Both patches look fine to me. I'll push them tomorrow if nobody is against it.
> 
> lu
> 
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel

Patch

diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 5018a05..9270b22 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -1036,6 +1036,10 @@  static int qsv_device_derive_from_child(AVHWDeviceContext *ctx,
         goto fail;
     }
 
+    av_log(ctx, AV_LOG_VERBOSE,
+           "Initialize MFX session: API version is %d.%d, implementation version is %d.%d\n",
+           MFX_VERSION_MAJOR, MFX_VERSION_MINOR, ver.Major, ver.Minor);
+
     MFXClose(hwctx->session);
 
     err = MFXInit(implementation, &ver, &hwctx->session);