]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gstreamer: Fix Gst.Clock bindings
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sat, 27 Mar 2010 14:42:06 +0000 (15:42 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 8 Apr 2010 08:30:51 +0000 (10:30 +0200)
This fixes parameter/return ownership, hiding of private fields,
correct assigning of functions to classes, etc.

vapi/gstreamer-0.10.vapi
vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata

index 55c6a664d93782197a81bab41bbfdafe8d537f76..8ca3e382d0de34d8fd90ab3677c79a9457f97a23 100644 (file)
@@ -215,10 +215,9 @@ namespace Gst {
                public void unref ();
        }
        [CCode (cheader_filename = "gst/gst.h")]
-       public class Clock : Gst.Object {
-               public void* ABI;
+       public abstract class Clock : Gst.Object {
                public weak Gst.ClockID clockid;
-               public weak GLib.List entries;
+               public weak GLib.List<Gst.ClockEntry> entries;
                public weak GLib.Cond entries_changed;
                public Gst.ClockTime external_calibration;
                public bool filling;
@@ -230,23 +229,20 @@ namespace Gst {
                public Gst.ClockTime resolution;
                public weak GLib.Mutex slave_lock;
                public int time_index;
-               public Gst.ClockTime times;
-               public bool add_observation (Gst.ClockTime slave, Gst.ClockTime master, double r_squared);
+               [CCode (array_length = false)]
+               public weak Gst.ClockTime[] times;
+               public bool add_observation (Gst.ClockTime slave, Gst.ClockTime master, out double r_squared);
                public Gst.ClockTime adjust_unlocked (Gst.ClockTime @internal);
                [NoWrapper]
                public virtual Gst.ClockTime change_resolution (Gst.ClockTime old_resolution, Gst.ClockTime new_resolution);
-               public void get_calibration (Gst.ClockTime @internal, Gst.ClockTime external, Gst.ClockTime rate_num, Gst.ClockTime rate_denom);
+               public void get_calibration (out Gst.ClockTime @internal, out Gst.ClockTime external, out Gst.ClockTime rate_num, out Gst.ClockTime rate_denom);
                public virtual Gst.ClockTime get_internal_time ();
-               public unowned Gst.Clock get_master ();
+               public Gst.Clock? get_master ();
                public virtual Gst.ClockTime get_resolution ();
                public Gst.ClockTime get_time ();
-               [CCode (type = "GstClockID", has_construct_function = false)]
-               public Clock.periodic_id (Gst.Clock clock, Gst.ClockTime start_time, Gst.ClockTime interval);
                public void set_calibration (Gst.ClockTime @internal, Gst.ClockTime external, Gst.ClockTime rate_num, Gst.ClockTime rate_denom);
-               public bool set_master (Gst.Clock master);
+               public bool set_master (Gst.Clock? master);
                public Gst.ClockTime set_resolution (Gst.ClockTime resolution);
-               [CCode (type = "GstClockID", has_construct_function = false)]
-               public Clock.single_shot_id (Gst.Clock clock, Gst.ClockTime time);
                public Gst.ClockTime unadjust_unlocked (Gst.ClockTime external);
                [NoWrapper]
                public virtual void unschedule (Gst.ClockEntry entry);
@@ -255,7 +251,7 @@ namespace Gst {
                [NoWrapper]
                public virtual Gst.ClockReturn wait_async (Gst.ClockEntry entry);
                [NoWrapper]
-               public virtual Gst.ClockReturn wait_jitter (Gst.ClockEntry entry, Gst.ClockTimeDiff jitter);
+               public virtual Gst.ClockReturn wait_jitter (Gst.ClockEntry entry, out Gst.ClockTimeDiff jitter);
                [NoAccessorMethod]
                public bool stats { get; set; }
                [NoAccessorMethod]
@@ -277,11 +273,12 @@ namespace Gst {
                public Gst.ClockEntryType type;
                public void* user_data;
        }
-       [Compact]
        [CCode (ref_function = "gst_clock_id_ref", unref_function = "gst_clock_id_unref", cheader_filename = "gst/gst.h")]
        public class ClockID {
                public static int compare_func (void* id1, void* id2);
                public Gst.ClockTime get_time ();
+               public ClockID.periodic (Gst.Clock clock, Gst.ClockTime start_time, Gst.ClockTime interval);
+               public ClockID.single_shot (Gst.Clock clock, Gst.ClockTime time);
                public void unschedule ();
                public Gst.ClockReturn wait (Gst.ClockTimeDiff jitter);
                public Gst.ClockReturn wait_async (Gst.ClockCallback func);
index 796cd9fb5bbbd0be1981d1aa6b982a31de88330d..190571eef7c90bd76e0af0ce2bad15bb3e4711a1 100644 (file)
@@ -32,6 +32,11 @@ namespace Gst {
        public struct ClockTimeDiff : int64 {
        }
 
+       public class ClockID {
+               public ClockID.single_shot (Gst.Clock clock, Gst.ClockTime time);
+               public ClockID.periodic (Gst.Clock clock, Gst.ClockTime start_time, Gst.ClockTime interval);
+       }
+
        [CCode (ref_function = "gst_event_ref", unref_function = "gst_event_unref")]
        public class Event : MiniObject {
                public Event @ref ();
index 74a80359ebbfe07f04c8a0795af4fd5b1b8a7a61..be2777a35df326ec59f24586612933a15d464f30 100644 (file)
@@ -94,8 +94,20 @@ gst_child_proxy_set_valist hidden="1"
 gst_child_proxy_lookup hidden="1"
 GstClockTime hidden="1"
 GstClockTimeDiff hidden="1"
-GstControlSource.get_value hidden="1"
-GstControlSource.get_value_array hidden="1"
+GstClock abstract="1"
+GstClock.ABI hidden="1"
+GstClock.entries type_arguments="ClockEntry" 
+GstClock.times is_array="1"
+gst_clock_wait_jitter.jitter is_out="1"
+gst_clock_add_observation.r_squared is_out="1"
+gst_clock_get_master nullable="1" transfer_ownership="1"
+gst_clock_set_master.master nullable="1"
+gst_clock_get_calibration.internal is_out="1"
+gst_clock_get_calibration.external is_out="1"
+gst_clock_get_calibration.rate_num is_out="1"
+gst_clock_get_calibration.rate_denom is_out="1"
+gst_clock_new_single_shot_id hidden="1"
+gst_clock_new_periodic_id hidden="1"
 GstCoreError errordomain="1"
 GstDebugLevel to_string="gst_debug_level_get_name"
 gst_debug_level_get_name hidden="1"