[Bug 781958] New: harness: Abort when failed to construct the specified pipeline
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Apr 30 03:41:05 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=781958
Bug ID: 781958
Summary: harness: Abort when failed to construct the specified
pipeline
Classification: Platform
Product: GStreamer
Version: unspecified
OS: All
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: yashi at atmark-techno.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
I found this while creating a new plugin. It was entirely my mistake
not to initialize my plugin properly but the error message was a bit
cryptic IMHO.
So I asked in #gstreamer and __tim gave me some advice:
22:17 < yashi> but gst_harness_add_parse() doesn't have a way to propage
error
gst_parse_launch_full() find
22:19 < __tim> I think you should just abort
22:20 < __tim> and let the caller do checks
22:20 < __tim> you could add a new function that doesn't abort if you think
that's useful
22:20 < __tim> but realistically, then the unit test will do fail_unless
(harness != NULL);
22:20 < __tim> so it just moves things elsewhere
So here I am crafted a few lines of change to gst_harness_add_parse().
The following is the commit message in the patch.
--- >8 --- >8 ---
Even though gst_harness_new_parse() doesn't find the specified
element, it returns without any error. Then a succeeding call to
gst_harness_set_sink_caps_str() causes an error like this:
Unexpected critical/warning: gst_pad_push_event: assertion 'GST_IS_PAD
(pad)' failed
This is a bit cryptic and doesn't give users any clue what was going
on.
gst_harness_new_parse() calls gst_harness_add_parse() with a newly
created empty harness and a pipeline description string, but
gst_harness_add_parse() does not have a way to propagate the error
back to the caller. Since the function, gst_harness_add_parse(), is a
public API, it's not a good idea to change its signature. This patch,
instead, makes the function to g_error() when it finds any error.
With this change the same error prints:
** (myelement-test:25345): ERROR **: Unable to create pipeline 'bin.(
myelement )': no element "myelement"
The current implementation of gst_parse_launch_full() doesn't return
partially constructed pipeline when GST_PARSE_FLAG_FATAL_ERRORS is
specified, however, this patch also adds a check for it.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list