libs: encoder: log out the name of the profile
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 6 Apr 2017 17:35:27 +0000 (19:35 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 13 Jun 2017 11:51:01 +0000 (13:51 +0200)
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
gst-libs/gst/vaapi/gstvaapiencoder_h265.c
gst-libs/gst/vaapi/gstvaapiencoder_jpeg.c
gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
gst-libs/gst/vaapi/gstvaapiencoder_vp8.c
gst-libs/gst/vaapi/gstvaapiencoder_vp9.c

index 969f2fd..b76ccb6 100644 (file)
@@ -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;
   }
 }
index b8cd97c..7bcb54f 100644 (file)
@@ -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;
   }
 }
index b335d97..73bee56 100644 (file)
@@ -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;
   }
 }
index ab07407..04fbd0d 100644 (file)
@@ -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;
   }
 }
index 9357527..a448df8 100644 (file)
@@ -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;
   }
 }
index 35b4f7e..80de4b0 100644 (file)
@@ -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;
   }
 }