On Fri, Nov 03, 2017 at 11:35:33AM -0700, Michele Lim wrote:
> Having clear indication of when a hardware accelerator is in
> operation prevents false assumptions, for e.g., in situations when
> the command line argument inadvertently omits options for enabling
> it, resulting to the framework silently switching to the SW path.
> 
> Signed-off-by: Michele Lim <michele....@intel.com>
> ---
>  fftools/ffmpeg_hw.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c
> index a4d1cad..f071746 100644
> --- a/fftools/ffmpeg_hw.c
> +++ b/fftools/ffmpeg_hw.c
> @@ -306,6 +306,8 @@ int hw_device_setup_for_decode(InputStream *ist)
>      if (!ist->dec_ctx->hw_device_ctx)
>          return AVERROR(ENOMEM);
>  
> +    /* Indicate HW accelerator has been prepared for decode */
> +    av_log(ist->dec_ctx, AV_LOG_INFO, "HW accelerator prepared for decode: 
> %s\n", av_hwdevice_get_type_name(type));
>      return 0;
>  }
>  

> @@ -331,6 +333,9 @@ int hw_device_setup_for_encode(OutputStream *ost)
>          // No device required.
>          return 0;
>      }
> +
> +    /* Indicate HW accelerator has been prepared for encode */
> +    av_log(ost->enc_ctx, AV_LOG_INFO, "HW accelerator prepared for encode: 
> %s\n", av_hwdevice_get_type_name(type));
>  }

i dont know if this extra info is desireable or not but
this code is unreachable

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to