Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioClock.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.Audio {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class AudioClock : Gst.SystemClock {
13
14                 public AudioClock (IntPtr raw) : base(raw) {}
15
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);
18
19                 public AudioClock (string name, Gst.Audio.AudioClockGetTimeFunc func, IntPtr user_data, GLib.DestroyNotify destroy_notify) : base (IntPtr.Zero)
20                 {
21                         if (GetType () != typeof (AudioClock)) {
22                                 var vals = new List<GLib.Value> ();
23                                 var names = new List<string> ();
24                                 names.Add ("name");
25                                 vals.Add (new GLib.Value (name));
26                                 CreateNativeObject (names.ToArray (), vals.ToArray ());
27                                 return;
28                         }
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);
33                 }
34
35                 public Gst.Audio.AudioClockGetTimeFunc Func {
36                         get {
37                                 unsafe {
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));
41                                 }
42                         }
43                 }
44
45                 public IntPtr UserData {
46                         get {
47                                 unsafe {
48                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("user_data"));
49                                         return (*raw_ptr);
50                                 }
51                         }
52                 }
53
54
55                 // Internal representation of the wrapped structure ABI.
56                 static GLib.AbiStruct _class_abi = null;
57                 static public new GLib.AbiStruct class_abi {
58                         get {
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
64                                                         , null
65                                                         , null
66                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
67                                                         , 0
68                                                         ),
69                                         });
70
71                                 return _class_abi;
72                         }
73                 }
74
75
76                 // End of the ABI representation.
77
78                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
79                 static extern IntPtr gst_audio_clock_get_type();
80
81                 public static new GLib.GType GType { 
82                         get {
83                                 IntPtr raw_ret = gst_audio_clock_get_type();
84                                 GLib.GType ret = new GLib.GType(raw_ret);
85                                 return ret;
86                         }
87                 }
88
89                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90                 static extern ulong gst_audio_clock_adjust(IntPtr raw, ulong time);
91
92                 public ulong Adjust(ulong time) {
93                         ulong raw_ret = gst_audio_clock_adjust(Handle, time);
94                         ulong ret = raw_ret;
95                         return ret;
96                 }
97
98                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
99                 static extern ulong gst_audio_clock_get_time(IntPtr raw);
100
101                 public new ulong Time { 
102                         get {
103                                 ulong raw_ret = gst_audio_clock_get_time(Handle);
104                                 ulong ret = raw_ret;
105                                 return ret;
106                         }
107                 }
108
109                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
110                 static extern void gst_audio_clock_invalidate(IntPtr raw);
111
112                 public void Invalidate() {
113                         gst_audio_clock_invalidate(Handle);
114                 }
115
116                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
117                 static extern void gst_audio_clock_reset(IntPtr raw, ulong time);
118
119                 public void Reset(ulong time) {
120                         gst_audio_clock_reset(Handle, time);
121                 }
122
123
124                 static AudioClock ()
125                 {
126                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
127                 }
128
129                 // Internal representation of the wrapped structure ABI.
130                 static GLib.AbiStruct _abi_info = null;
131                 static public new GLib.AbiStruct abi_info {
132                         get {
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
138                                                         , null
139                                                         , "user_data"
140                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
141                                                         , 0
142                                                         ),
143                                                 new GLib.AbiField("user_data"
144                                                         , -1
145                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // user_data
146                                                         , "func"
147                                                         , "destroy_notify"
148                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
149                                                         , 0
150                                                         ),
151                                                 new GLib.AbiField("destroy_notify"
152                                                         , -1
153                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // destroy_notify
154                                                         , "user_data"
155                                                         , "last_time"
156                                                         , (long) Marshal.OffsetOf(typeof(GstAudioClock_destroy_notifyAlign), "destroy_notify")
157                                                         , 0
158                                                         ),
159                                                 new GLib.AbiField("last_time"
160                                                         , -1
161                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // last_time
162                                                         , "destroy_notify"
163                                                         , "time_offset"
164                                                         , (long) Marshal.OffsetOf(typeof(GstAudioClock_last_timeAlign), "last_time")
165                                                         , 0
166                                                         ),
167                                                 new GLib.AbiField("time_offset"
168                                                         , -1
169                                                         , (uint) Marshal.SizeOf(typeof(long)) // time_offset
170                                                         , "last_time"
171                                                         , "_gst_reserved"
172                                                         , (long) Marshal.OffsetOf(typeof(GstAudioClock_time_offsetAlign), "time_offset")
173                                                         , 0
174                                                         ),
175                                                 new GLib.AbiField("_gst_reserved"
176                                                         , -1
177                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
178                                                         , "time_offset"
179                                                         , null
180                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
181                                                         , 0
182                                                         ),
183                                         });
184
185                                 return _abi_info;
186                         }
187                 }
188
189                 [StructLayout(LayoutKind.Sequential)]
190                 public struct GstAudioClock_destroy_notifyAlign
191                 {
192                         sbyte f1;
193                         private GLib.DestroyNotify destroy_notify;
194                 }
195
196                 [StructLayout(LayoutKind.Sequential)]
197                 public struct GstAudioClock_last_timeAlign
198                 {
199                         sbyte f1;
200                         private ulong last_time;
201                 }
202
203                 [StructLayout(LayoutKind.Sequential)]
204                 public struct GstAudioClock_time_offsetAlign
205                 {
206                         sbyte f1;
207                         private long time_offset;
208                 }
209
210
211                 // End of the ABI representation.
212
213 #endregion
214         }
215 }