GNOME Bugzilla – Bug 528187
Get missing elements from gst_parse_launch()
Last modified: 2008-05-25 13:57:03 UTC
Tim says: On Tue, 2008-04-15 at 10:34 +0100, Ross Burton wrote: > I've been thinking a bit about this automagic plugin installation thing, > and surely I can just listen for missing-plugin on the encode pipeline? > I presume the message is sent on the bus, I pause the pipeline, try and > install the plugin, and then either stop on failure or start it again if > it installed okay? Right, that's not going to work (yet) in this case because gst_parse_launch() won't post missing-element messages on the bus. It could be fixed to do that, but then the messages would immediately be dropped because the pipeline is still in NULL state at that point (I think), so that needs working around somehow then. So, erm, do that please! :)
Created attachment 109850 [details] [review] Proposed new API: gst_parse_launch_full() et. al.
Created attachment 111352 [details] [review] Implement gst_parse_launch_full() et. al.
Committed: 2008-05-24 Tim-Philipp Müller <tim.muller at collabora co uk> * docs/gst/gstreamer-sections.txt: * gst/gst.c: (init_post): * gst/gst_private.h: (_GstParseContext): * gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new), (gst_parse_context_free), (gst_parse_context_get_missing_elements), (gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch), (gst_parse_launch_full): * gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS), (GstParseFlags), (GstParseContext): * gst/gstutils.c: (gst_parse_bin_from_description), (gst_parse_bin_from_description_full): * gst/gstutils.h: * gst/parse/grammar.y: * gst/parse/types.h: * win32/common/libgstreamer.def: Add new gst_parse_*_full API (#528178): API: gst_parse_launch_full() API: gst_parse_launchv_full() API: gst_parse_bin_from_description_full() API: gst_parse_context_new() API: gst_parse_context_free() API: gst_parse_context_get_missing_elements() Keeping bug open for unit test and extraction of all missing elements in a pipeline (rather than just the first).
2008-05-25 Tim-Philipp Müller <tim.muller at collabora co uk> * gst/parse/grammar.y: * tests/check/pipelines/parse-launch.c: Get all missing elements from a parse launch string if possible (ie. if the FATAL_ERRORS flag has been specified). Fixes #528178. 2008-05-24 Tim-Philipp Müller <tim.muller at collabora co uk> * tests/check/Makefile.am: * tests/check/pipelines/parse-launch.c: Add some unit tests for the new gst_parse_launch*_full() API. (Exposes a previously-existing memory leak in the error code path, so adding to VALGRIND_TO_FIX for now).