[FFmpeg-devel] [PATCH v2 2/4] hwcontext_opencl: dump the device name when can't match device type.

Mark Thompson sw at jkqxz.net
Thu Jun 28 18:41:03 EEST 2018


On 21/06/18 12:45, Jun Zhao wrote:
> afther the change, we can get more detail debug message like:
> "Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz" does not match device type "gpu".
> 
> Signed-off-by: Jun Zhao <mypopydev at gmail.com>
> ---
>  libavutil/hwcontext_opencl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
> index f6cceef..9e96e96 100644
> --- a/libavutil/hwcontext_opencl.c
> +++ b/libavutil/hwcontext_opencl.c
> @@ -430,7 +430,8 @@ static int opencl_filter_device(AVHWDeviceContext *hwdev,
>          }
>  
>          if (!(device_type & match_type)) {
> -            av_log(hwdev, AV_LOG_DEBUG, "device_type does not match.\n");
> +            av_log(hwdev, AV_LOG_DEBUG, "\"%s\" does not match device type \"%s\".\n",
> +                   device_name, param->value);
>              return 1;
>          }
>      }
> 

Unless you want to change the other messages, this should probably match them (so it shows what type the device is and what type you're matching to - the name isn't really what you want there).

- Mark


More information about the ffmpeg-devel mailing list