1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class AudioClock : Gst.SystemClock {
14 public AudioClock (IntPtr raw) : base(raw) {}
16 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
17 static extern IntPtr gst_audio_clock_new(IntPtr name, Gst.AudioSharp.AudioClockGetTimeFuncNative func, IntPtr user_data, GLib.DestroyNotify destroy_notify);
19 public AudioClock (string name, Gst.Audio.AudioClockGetTimeFunc func, IntPtr user_data, GLib.DestroyNotify destroy_notify) : base (IntPtr.Zero)
21 if (GetType () != typeof (AudioClock)) {
22 var vals = new List<GLib.Value> ();
23 var names = new List<string> ();
25 vals.Add (new GLib.Value (name));
26 CreateNativeObject (names.ToArray (), vals.ToArray ());
29 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
30 Gst.AudioSharp.AudioClockGetTimeFuncWrapper func_wrapper = new Gst.AudioSharp.AudioClockGetTimeFuncWrapper (func);
31 Raw = gst_audio_clock_new(native_name, func_wrapper.NativeDelegate, user_data, destroy_notify);
32 GLib.Marshaller.Free (native_name);
35 public Gst.Audio.AudioClockGetTimeFunc Func {
38 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("func"));
39 Gst.AudioSharp.AudioClockGetTimeFuncNative del = (Gst.AudioSharp.AudioClockGetTimeFuncNative)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(Gst.AudioSharp.AudioClockGetTimeFuncNative));
40 return Gst.AudioSharp.AudioClockGetTimeFuncWrapper.GetManagedDelegate ((del));
45 public IntPtr UserData {
48 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data"));
55 // Internal representation of the wrapped structure ABI.
56 static GLib.AbiStruct _class_abi = null;
57 static public new GLib.AbiStruct class_abi {
59 if (_class_abi == null)
60 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
61 new GLib.AbiField("_gst_reserved"
62 , Gst.SystemClock.class_abi.Fields
63 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
66 , (uint) Marshal.SizeOf(typeof(IntPtr))
76 // End of the ABI representation.
78 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
79 static extern IntPtr gst_audio_clock_get_type();
81 public static new GLib.GType GType {
83 IntPtr raw_ret = gst_audio_clock_get_type();
84 GLib.GType ret = new GLib.GType(raw_ret);
89 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90 static extern ulong gst_audio_clock_adjust(IntPtr raw, ulong time);
92 public ulong Adjust(ulong time) {
93 ulong raw_ret = gst_audio_clock_adjust(Handle, time);
98 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
99 static extern ulong gst_audio_clock_get_time(IntPtr raw);
101 public new ulong Time {
103 ulong raw_ret = gst_audio_clock_get_time(Handle);
109 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
110 static extern void gst_audio_clock_invalidate(IntPtr raw);
112 public void Invalidate() {
113 gst_audio_clock_invalidate(Handle);
116 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
117 static extern void gst_audio_clock_reset(IntPtr raw, ulong time);
119 public void Reset(ulong time) {
120 gst_audio_clock_reset(Handle, time);
126 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
129 // Internal representation of the wrapped structure ABI.
130 static GLib.AbiStruct _abi_info = null;
131 static public new GLib.AbiStruct abi_info {
133 if (_abi_info == null)
134 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
135 new GLib.AbiField("func"
136 , Gst.SystemClock.abi_info.Fields
137 , (uint) Marshal.SizeOf(typeof(IntPtr)) // func
140 , (uint) Marshal.SizeOf(typeof(IntPtr))
143 new GLib.AbiField("user_data"
145 , (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data
148 , (uint) Marshal.SizeOf(typeof(IntPtr))
151 new GLib.AbiField("destroy_notify"
153 , (uint) Marshal.SizeOf(typeof(IntPtr)) // destroy_notify
156 , (long) Marshal.OffsetOf(typeof(GstAudioClock_destroy_notifyAlign), "destroy_notify")
159 new GLib.AbiField("last_time"
161 , (uint) Marshal.SizeOf(typeof(ulong)) // last_time
164 , (long) Marshal.OffsetOf(typeof(GstAudioClock_last_timeAlign), "last_time")
167 new GLib.AbiField("time_offset"
169 , (uint) Marshal.SizeOf(typeof(long)) // time_offset
172 , (long) Marshal.OffsetOf(typeof(GstAudioClock_time_offsetAlign), "time_offset")
175 new GLib.AbiField("_gst_reserved"
177 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
180 , (uint) Marshal.SizeOf(typeof(IntPtr))
189 [StructLayout(LayoutKind.Sequential)]
190 public struct GstAudioClock_destroy_notifyAlign
193 private GLib.DestroyNotify destroy_notify;
196 [StructLayout(LayoutKind.Sequential)]
197 public struct GstAudioClock_last_timeAlign
200 private ulong last_time;
203 [StructLayout(LayoutKind.Sequential)]
204 public struct GstAudioClock_time_offsetAlign
207 private long time_offset;
211 // End of the ABI representation.