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 785215 - gstreamer-1.0 vapi lacks GST_DEBUG_BIN_TO_DOT_FILE
gstreamer-1.0 vapi lacks GST_DEBUG_BIN_TO_DOT_FILE
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
0.36.x
Other Mac OS
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-21 09:42 UTC by Marcin Lewandowski
Modified: 2017-11-20 20:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer-1.0: Use corresponding debug macros for Debug.bin_to_dot_file* (2.12 KB, patch)
2017-08-26 11:57 UTC, Rico Tzschichholz
reviewed Details | Review
gstreamer-1.0: Bind GST_DEBUG_BIN_TO_DOT_FILE/*_WITH_TS (2.07 KB, patch)
2017-11-20 11:30 UTC, Rico Tzschichholz
none Details | Review
gstreamer-1.0: Bind GST_DEBUG_BIN_TO_DOT_FILE/*_WITH_TS (2.07 KB, patch)
2017-11-20 14:11 UTC, Rico Tzschichholz
committed Details | Review

Description Marcin Lewandowski 2017-07-21 09:42:54 UTC
I am using vala 0.36.4, compiled from sources on ubuntu zesty.

gstreamer-1.0 does not export GST_DEBUG_BIN_TO_DOT_FILE and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS macros that are extremely useful for debugging. That also applies to associated enum such as https://github.com/GStreamer/gstreamer/blob/2bf0a98bcd4e8af126725e1bd66fe41a04d4c330/gst/gstdebugutils.h#L48
Comment 1 Rico Tzschichholz 2017-07-21 12:34:13 UTC
Are those not working or bound correctly?

Gst.Debug.bin_to_dot_data ()
Gst.Debug.bin_to_dot_file ()
Gst.Debug.bin_to_dot_file_with_ts ()
Comment 2 Rico Tzschichholz 2017-08-26 11:57:33 UTC
Created attachment 358468 [details] [review]
gstreamer-1.0: Use corresponding debug macros for Debug.bin_to_dot_file*

GST_DEBUG_BIN_TO_DOT_FILE and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS are
conditionally set depending on GST_DISABLE_GST_DEBUG.
Comment 3 Evan Nemerson 2017-08-26 14:51:01 UTC
Review of attachment 358468 [details] [review]:

That makes sense to me.  Most G-I based bindings can't take advantage of the conditional definitions, but since Vala can I think it makes sense to do so.

My only concern is that perhaps we should offer both versions instead of just directing the lowercase versions to the uppercase ones, since it could be useful for people who want to dump the graph when not in debug mode…
Comment 4 Rico Tzschichholz 2017-08-26 15:31:39 UTC
@evan: I see. Any idea what would be an appropriate to way to add those in parallel? (in a discoverable way)
Comment 5 Evan Nemerson 2017-08-26 16:03:15 UTC
Untested, but I think this should do the trick:


diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala
index 87467efad..f62d56025 100644
--- a/vapi/metadata/Gst-1.0-custom.vala
+++ b/vapi/metadata/Gst-1.0-custom.vala
@@ -1,4 +1,10 @@
 namespace Gst {
+       namespace Debug {
+               [CCode (cheader_filename = "gst/gst.h", cname = "GST_DEBUG_BIN_TO_DOT_FILE")]
+               public static void BIN_TO_DOT_FILE (Gst.Bin bin, Gst.DebugGraphDetails details, string file_name);
+               [CCode (cheader_filename = "gst/gst.h", cname = "GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS")]
+               public static void BIT_TO_DOT_FILE_WITH_TS (Gst.Bin bin, Gst.DebugGraphDetails details, string file_name);
+       }
        [Compact, CCode (copy_function = "gst_allocation_params_copy", free_function = "gst_allocation_params_free", type_id = "gst_allocation_params_get_type ()")]
        public class AllocationParams {
        }
Comment 6 Rico Tzschichholz 2017-11-20 11:30:26 UTC
Created attachment 364039 [details] [review]
gstreamer-1.0: Bind GST_DEBUG_BIN_TO_DOT_FILE/*_WITH_TS
Comment 7 Al Thomas 2017-11-20 12:48:35 UTC
Review of attachment 364039 [details] [review]:

Is there not a typo here? BIN_TO_DOT_FILE_WITH_TS is BIT_TO_DOT_FILE_WITH_TS.
Comment 8 Rico Tzschichholz 2017-11-20 14:11:51 UTC
Created attachment 364055 [details] [review]
gstreamer-1.0: Bind GST_DEBUG_BIN_TO_DOT_FILE/*_WITH_TS
Comment 9 Rico Tzschichholz 2017-11-20 20:04:30 UTC
Attachment 364055 [details] pushed as 78a9230 - gstreamer-1.0: Bind GST_DEBUG_BIN_TO_DOT_FILE/*_WITH_TS