After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 528187 - Get missing elements from gst_parse_launch()
Get missing elements from gst_parse_launch()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.x
Other Linux
: Normal enhancement
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-15 10:38 UTC by Ross Burton
Modified: 2008-05-25 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed new API: gst_parse_launch_full() et. al. (3.73 KB, patch)
2008-04-24 19:29 UTC, Tim-Philipp Müller
none Details | Review
Implement gst_parse_launch_full() et. al. (18.05 KB, patch)
2008-05-22 16:02 UTC, Tim-Philipp Müller
committed Details | Review

Description Ross Burton 2008-04-15 10:38:42 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! :)
Comment 1 Tim-Philipp Müller 2008-04-24 19:29:08 UTC
Created attachment 109850 [details] [review]
Proposed new API: gst_parse_launch_full() et. al.
Comment 2 Tim-Philipp Müller 2008-05-22 16:02:52 UTC
Created attachment 111352 [details] [review]
Implement gst_parse_launch_full() et. al.
Comment 3 Tim-Philipp Müller 2008-05-24 16:32:34 UTC
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).


Comment 4 Tim-Philipp Müller 2008-05-25 13:57:03 UTC
 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).