From 4f0a2ce4edb03104c804a6db7e8d355862f82e47 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Thu, 7 Mar 2019 10:45:10 +0900 Subject: [PATCH] [Filter] Clear & explicit error for missing extensions. If an extension (e.g., nnstreamer-tensorflow) is missing, the error message must be explicit and visible even without GST_DEBUG envvars; most applications developers won't know it. However, we cannot alarm them at the stage of set-properties. Thus, delay alarming until it becomes "fatal". Fixes #1206 Helps https://github.com/nnsuite/nnstreamer-example/issues/21 Signed-off-by: MyungJoo Ham --- gst/nnstreamer/tensor_filter/tensor_filter.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/nnstreamer/tensor_filter/tensor_filter.c b/gst/nnstreamer/tensor_filter/tensor_filter.c index 1af11d9..991a709 100644 --- a/gst/nnstreamer/tensor_filter/tensor_filter.c +++ b/gst/nnstreamer/tensor_filter/tensor_filter.c @@ -832,6 +832,14 @@ unknown_format: GST_ELEMENT_ERROR (self, CORE, NOT_IMPLEMENTED, (NULL), ("unknown format")); return GST_FLOW_NOT_NEGOTIATED; unknown_framework: + /** + * This is fatal; if framework is not configured until this stage, + * it means that an extension is missing or not configured. + * We need readable messages for non-developers + */ + g_error + ("\nA nnstreamer extension is not installed or framework property of tensor_filter is incorrect: [%s] is not found.\n\n", + prop->fwname); GST_ELEMENT_ERROR (self, CORE, NOT_IMPLEMENTED, (NULL), ("framework not configured")); return GST_FLOW_ERROR; -- 2.7.4