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 783661 - gst-launch: dump pipeline diagram dot file on SIGHUP
gst-launch: dump pipeline diagram dot file on SIGHUP
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-11 15:23 UTC by minfrin
Modified: 2017-07-20 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Generate a gstreamer pipeline diagram on SIGHUP (2.40 KB, patch)
2017-06-11 15:24 UTC, minfrin
none Details | Review
Generate a gstreamer pipeline diagram on SIGHUP (with docs and man page) (4.12 KB, patch)
2017-06-13 23:03 UTC, minfrin
committed Details | Review
gst-launch: fix compiler warnings for SIGHUP handlers on windows (1.34 KB, patch)
2017-07-20 16:33 UTC, Tim-Philipp Müller
committed Details | Review

Description minfrin 2017-06-11 15:23:37 UTC
When gst-launch gets stuck refusing to enter a given state, access to the effective pipeline diagram is a useful debugging tool.
Comment 1 minfrin 2017-06-11 15:24:58 UTC
Created attachment 353568 [details] [review]
Generate a gstreamer pipeline diagram on SIGHUP

Add an implementation to do this.
Comment 2 Arun Raghavan 2017-06-13 11:08:45 UTC
Review of attachment 353568 [details] [review]:

Looks good. Would you like to add some documentation along with this to docs/gst/running.xml ?
Comment 3 minfrin 2017-06-13 11:10:17 UTC
I went hunting for the place to write these docs and struggled to find them - can you confirm where the man page is generated?
Comment 4 Arun Raghavan 2017-06-13 11:20:28 UTC
You'll find the documentation that goes into devhelp and the website in

  docs/gst/running.xml

And the man page is at:

  tools/gst-launch-1.0.1
Comment 5 minfrin 2017-06-13 23:03:56 UTC
Created attachment 353714 [details] [review]
Generate a gstreamer pipeline diagram on SIGHUP (with docs and man page)

Updated patch with docs as requested.
Comment 6 Tim-Philipp Müller 2017-07-13 13:04:07 UTC
Thanks!

Pushed this with minor modification to the print message, and added a message when not dumping the dot file, since it's a bit confusing otherwise.

commit cfe59c285c411a246c8bf8b64e95118fc97a77fe
Author: Graham Leggett <minfrin@sharp.fm>
Date:   Sun Jun 11 15:15:13 2017 +0000

    Generate a gstreamer pipeline diagram on SIGHUP.
    
    Useful for debugging a pipeline that refuses to enter a given state.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783661
Comment 7 Philippe Renon 2017-07-20 14:02:01 UTC
msys2 has build errors because of this change:

../../gstreamer/tools/gst-launch.c:499:1: error: 'hup_handler' defined but not used [-Werror=unused-function]
 hup_handler (gpointer user_data)
 ^~~~~~~~~~~
../../gstreamer/tools/gst-launch.c:471:14: error: 'signal_watch_hup_id' defined but not used [-Werror=unused-variable]
 static guint signal_watch_hup_id;
              ^~~~~~~~~~~~~~~~~~~

workaround : configure with --disable-fatal-warnings
Comment 8 Tim-Philipp Müller 2017-07-20 16:23:47 UTC
I'll have a look, thanks.
Comment 9 Tim-Philipp Müller 2017-07-20 16:33:33 UTC
Created attachment 356055 [details] [review]
gst-launch: fix compiler warnings for SIGHUP handlers on windows

Philippe, could you try this patch for me please?
Comment 10 Philippe Renon 2017-07-20 16:55:32 UTC
Builds fine with the patch applied.