vaapivideobufferpool: turn errors into warnings
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 29 Jan 2020 10:52:38 +0000 (11:52 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sun, 2 Feb 2020 16:22:43 +0000 (17:22 +0100)
set_config() vmethod should fail gracefully, thus upstream could
negotiate another pool if possible.

Instead of sending error messages to the bus, let demote the level
to warning.

gst/vaapi/gstvaapivideobufferpool.c

index 432de68..09744f9 100644 (file)
@@ -286,32 +286,32 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
   /* ERRORS */
 error_invalid_config:
   {
-    GST_ERROR_OBJECT (base_pool, "invalid config");
+    GST_WARNING_OBJECT (base_pool, "invalid config");
     return FALSE;
   }
 error_no_caps:
   {
-    GST_ERROR_OBJECT (base_pool, "no caps in config");
+    GST_WARNING_OBJECT (base_pool, "no caps in config");
     return FALSE;
   }
 error_invalid_caps:
   {
-    GST_ERROR_OBJECT (base_pool, "invalid caps %" GST_PTR_FORMAT, caps);
+    GST_WARNING_OBJECT (base_pool, "invalid caps %" GST_PTR_FORMAT, caps);
     return FALSE;
   }
 error_invalid_allocator:
   {
-    GST_ERROR_OBJECT (base_pool, "no allocator in config");
+    GST_INFO_OBJECT (base_pool, "no allocator in config");
     return FALSE;
   }
 error_no_vaapi_video_meta_option:
   {
-    GST_ERROR_OBJECT (base_pool, "no GstVaapiVideoMeta option in config");
+    GST_WARNING_OBJECT (base_pool, "no GstVaapiVideoMeta option in config");
     return FALSE;
   }
 error_no_allocator:
   {
-    GST_ERROR_OBJECT (base_pool, "no allocator defined");
+    GST_WARNING_OBJECT (base_pool, "no allocator defined");
     return FALSE;
   }
 }