From 57f73f6018f47d2c83bda38f78d1804e5043430d Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Mon, 20 Nov 2017 14:03:55 +0100 Subject: [PATCH] gstreamer-1.0: Bind GST_TIME_ARGS, GST_STIME_ARGS formatting macros Gst.ClockTime ts = 0ULL; print ("%" + Gst.TIME_FORMAT + "\n", Gst.TIME_ARGS (ts)); https://bugzilla.gnome.org/show_bug.cgi?id=750840 --- vapi/gstreamer-1.0.vapi | 4 ++++ vapi/metadata/Gst-1.0-custom.vala | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index ef1932df3..95cae476e 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -3969,6 +3969,10 @@ namespace Gst { public const int VERSION_MINOR; [CCode (cheader_filename = "gst/gst.h", cname = "GST_VERSION_NANO")] public const int VERSION_NANO; + [CCode (cheader_filename = "gst/gst.h", cname = "GST_STIME_ARGS", use_inplace = true)] + public static uint STIME_ARGS (Gst.ClockTimeDiff t); + [CCode (cheader_filename = "gst/gst.h", cname = "GST_TIME_ARGS", use_inplace = true)] + public static uint TIME_ARGS (Gst.ClockTime t); [CCode (cheader_filename = "gst/gst.h")] public static void deinit (); [CCode (cheader_filename = "gst/gst.h")] diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala index f467c7d4b..f5518ac95 100644 --- a/vapi/metadata/Gst-1.0-custom.vala +++ b/vapi/metadata/Gst-1.0-custom.vala @@ -126,4 +126,9 @@ namespace Gst { public T pop (); public void push (owned T data); } + + [CCode (cheader_filename = "gst/gst.h", cname = "GST_TIME_ARGS", use_inplace = true)] + public static uint TIME_ARGS (Gst.ClockTime t); + [CCode (cheader_filename = "gst/gst.h", cname = "GST_STIME_ARGS", use_inplace = true)] + public static uint STIME_ARGS (Gst.ClockTimeDiff t); } -- 2.47.2