From eee8a781735bfa1a69f35631bf907aaa7b5deec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 6 Apr 2017 19:35:27 +0200 Subject: [PATCH] libs: encoder: log out the name of the profile Instead of printing a number, it is more readable to log out, in case of error, the name of the failing profile. --- gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 3 ++- gst-libs/gst/vaapi/gstvaapiencoder_h265.c | 3 ++- gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c | 3 ++- gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c | 3 ++- gst-libs/gst/vaapi/gstvaapiencoder_vp8.c | 3 ++- gst-libs/gst/vaapi/gstvaapiencoder_vp9.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index 969f2fdd01..b76ccb63c1 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -1030,7 +1030,8 @@ ensure_hw_profile (GstVaapiEncoderH264 * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } } diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c index b8cd97cbfa..7bcb54f3f6 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ -907,7 +907,8 @@ ensure_hw_profile (GstVaapiEncoderH265 * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } } diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c index b335d9782e..73bee563ee 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c @@ -168,7 +168,8 @@ ensure_hw_profile (GstVaapiEncoderJpeg * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } } diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c index ab074071d2..04fbd0dccb 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c @@ -103,7 +103,8 @@ ensure_hw_profile (GstVaapiEncoderMpeg2 * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } } diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_vp8.c b/gst-libs/gst/vaapi/gstvaapiencoder_vp8.c index 9357527766..a448df8e3f 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_vp8.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_vp8.c @@ -113,7 +113,8 @@ ensure_hw_profile (GstVaapiEncoderVP8 * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } } diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c index 35b4f7e6cf..80de4b039d 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_vp9.c @@ -187,7 +187,8 @@ ensure_hw_profile (GstVaapiEncoderVP9 * encoder) /* ERRORS */ error_unsupported_profile: { - GST_ERROR ("unsupported HW profile (0x%08x)", encoder->profile); + GST_ERROR ("unsupported HW profile %s", + gst_vaapi_profile_get_name (encoder->profile)); return FALSE; } }