[vala] gstreamer: Fix Gst.Clock bindings
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gstreamer: Fix Gst.Clock bindings
- Date: Thu, 8 Apr 2010 08:32:16 +0000 (UTC)
commit 76cfa49e9a683549b7f1b501b915c11c70534b7e
Author: Sebastian Dröge <sebastian droege collabora co uk>
Date: Sat Mar 27 15:42:06 2010 +0100
gstreamer: Fix Gst.Clock bindings
This fixes parameter/return ownership, hiding of private fields,
correct assigning of functions to classes, etc.
vapi/gstreamer-0.10.vapi | 25 ++++++++-----------
.../gstreamer-0.10/gstreamer-0.10-custom.vala | 5 ++++
.../gstreamer-0.10/gstreamer-0.10.metadata | 16 +++++++++++-
3 files changed, 30 insertions(+), 16 deletions(-)
---
diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi
index 55c6a66..8ca3e38 100644
--- a/vapi/gstreamer-0.10.vapi
+++ b/vapi/gstreamer-0.10.vapi
@@ -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);
diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
index 796cd9f..190571e 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
@@ -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 ();
diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
index 74a8035..be2777a 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
@@ -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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]