Skip to content

Commit

Permalink
pipeline: clarify that applications should handle bus messages
Browse files Browse the repository at this point in the history
The pipeline posts messages on the bus even if an application does not
handle the messages. This is expected behavior but may leak messages if
the messages are not handled.

Clarify the documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/680>
  • Loading branch information
tretter authored and GStreamer Merge Bot committed Dec 22, 2020
1 parent cd978ff commit 77e6c98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gst/gstpipeline.c
Expand Up @@ -40,8 +40,12 @@
* methods like gst_bin_add() and gst_bin_remove() (see #GstBin).
*
* Before changing the state of the #GstPipeline (see #GstElement) a #GstBus
* can be retrieved with gst_pipeline_get_bus(). This bus can then be
* used to receive #GstMessage from the elements in the pipeline.
* should be retrieved with gst_pipeline_get_bus(). This #GstBus should then
* be used to receive #GstMessage from the elements in the pipeline. Listening
* to the #GstBus is necessary for retrieving error messages from the
* #GstPipeline and otherwise the #GstPipeline might stop without any
* indication, why. Furthermore, the #GstPipeline posts messages even if
* nobody listens on the #GstBus, which will pile up and use up memory.
*
* By default, a #GstPipeline will automatically flush the pending #GstBus
* messages when going to the NULL state to ensure that no circular
Expand Down

0 comments on commit 77e6c98

Please sign in to comment.