Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Clock.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst {
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 Clock : Gst.Object {
13
14                 protected Clock (IntPtr raw) : base(raw) {}
15
16                 protected Clock() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22                 static extern ulong gst_clock_get_timeout(IntPtr raw);
23
24                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25                 static extern void gst_clock_set_timeout(IntPtr raw, ulong timeout);
26
27                 [GLib.Property ("timeout")]
28                 public ulong Timeout {
29                         get  {
30                                 ulong raw_ret = gst_clock_get_timeout(Handle);
31                                 ulong ret = raw_ret;
32                                 return ret;
33                         }
34                         set  {
35                                 gst_clock_set_timeout(Handle, value);
36                         }
37                 }
38
39                 [GLib.Property ("window-size")]
40                 public int WindowSize {
41                         get {
42                                 GLib.Value val = GetProperty ("window-size");
43                                 int ret = (int) val;
44                                 val.Dispose ();
45                                 return ret;
46                         }
47                         set {
48                                 GLib.Value val = new GLib.Value(value);
49                                 SetProperty("window-size", val);
50                                 val.Dispose ();
51                         }
52                 }
53
54                 [GLib.Property ("window-threshold")]
55                 public int WindowThreshold {
56                         get {
57                                 GLib.Value val = GetProperty ("window-threshold");
58                                 int ret = (int) val;
59                                 val.Dispose ();
60                                 return ret;
61                         }
62                         set {
63                                 GLib.Value val = new GLib.Value(value);
64                                 SetProperty("window-threshold", val);
65                                 val.Dispose ();
66                         }
67                 }
68
69                 [GLib.Signal("synced")]
70                 public event Gst.SyncedHandler Synced {
71                         add {
72                                 this.AddSignalHandler ("synced", value, typeof (Gst.SyncedArgs));
73                         }
74                         remove {
75                                 this.RemoveSignalHandler ("synced", value);
76                         }
77                 }
78
79                 static SyncedNativeDelegate Synced_cb_delegate;
80                 static SyncedNativeDelegate SyncedVMCallback {
81                         get {
82                                 if (Synced_cb_delegate == null)
83                                         Synced_cb_delegate = new SyncedNativeDelegate (Synced_cb);
84                                 return Synced_cb_delegate;
85                         }
86                 }
87
88                 static void OverrideSynced (GLib.GType gtype)
89                 {
90                         OverrideSynced (gtype, SyncedVMCallback);
91                 }
92
93                 static void OverrideSynced (GLib.GType gtype, SyncedNativeDelegate callback)
94                 {
95                         OverrideVirtualMethod (gtype, "synced", callback);
96                 }
97                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
98                 delegate void SyncedNativeDelegate (IntPtr inst, bool synced);
99
100                 static void Synced_cb (IntPtr inst, bool synced)
101                 {
102                         try {
103                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
104                                 __obj.OnSynced (synced);
105                         } catch (Exception e) {
106                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
107                         }
108                 }
109
110                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideSynced")]
111                 protected virtual void OnSynced (bool synced)
112                 {
113                         InternalSynced (synced);
114                 }
115
116                 private void InternalSynced (bool synced)
117                 {
118                         GLib.Value ret = GLib.Value.Empty;
119                         GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
120                         GLib.Value[] vals = new GLib.Value [2];
121                         vals [0] = new GLib.Value (this);
122                         inst_and_params.Append (vals [0]);
123                         vals [1] = new GLib.Value (synced);
124                         inst_and_params.Append (vals [1]);
125                         g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
126                         foreach (GLib.Value v in vals)
127                                 v.Dispose ();
128                 }
129
130                 static ChangeResolutionNativeDelegate ChangeResolution_cb_delegate;
131                 static ChangeResolutionNativeDelegate ChangeResolutionVMCallback {
132                         get {
133                                 if (ChangeResolution_cb_delegate == null)
134                                         ChangeResolution_cb_delegate = new ChangeResolutionNativeDelegate (ChangeResolution_cb);
135                                 return ChangeResolution_cb_delegate;
136                         }
137                 }
138
139                 static void OverrideChangeResolution (GLib.GType gtype)
140                 {
141                         OverrideChangeResolution (gtype, ChangeResolutionVMCallback);
142                 }
143
144                 static void OverrideChangeResolution (GLib.GType gtype, ChangeResolutionNativeDelegate callback)
145                 {
146                         unsafe {
147                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution"));
148                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
149                         }
150                 }
151
152                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
153                 delegate ulong ChangeResolutionNativeDelegate (IntPtr inst, ulong old_resolution, ulong new_resolution);
154
155                 static ulong ChangeResolution_cb (IntPtr inst, ulong old_resolution, ulong new_resolution)
156                 {
157                         try {
158                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
159                                 ulong __result;
160                                 __result = __obj.OnChangeResolution (old_resolution, new_resolution);
161                                 return __result;
162                         } catch (Exception e) {
163                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
164                                 // NOTREACHED: above call does not return.
165                                 throw e;
166                         }
167                 }
168
169                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideChangeResolution")]
170                 protected virtual ulong OnChangeResolution (ulong old_resolution, ulong new_resolution)
171                 {
172                         return InternalChangeResolution (old_resolution, new_resolution);
173                 }
174
175                 private ulong InternalChangeResolution (ulong old_resolution, ulong new_resolution)
176                 {
177                         ChangeResolutionNativeDelegate unmanaged = null;
178                         unsafe {
179                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution"));
180                                 unmanaged = (ChangeResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangeResolutionNativeDelegate));
181                         }
182                         if (unmanaged == null) return 0;
183
184                         ulong __result = unmanaged (this.Handle, old_resolution, new_resolution);
185                         return __result;
186                 }
187
188                 static GetResolutionNativeDelegate GetResolution_cb_delegate;
189                 static GetResolutionNativeDelegate GetResolutionVMCallback {
190                         get {
191                                 if (GetResolution_cb_delegate == null)
192                                         GetResolution_cb_delegate = new GetResolutionNativeDelegate (GetResolution_cb);
193                                 return GetResolution_cb_delegate;
194                         }
195                 }
196
197                 static void OverrideGetResolution (GLib.GType gtype)
198                 {
199                         OverrideGetResolution (gtype, GetResolutionVMCallback);
200                 }
201
202                 static void OverrideGetResolution (GLib.GType gtype, GetResolutionNativeDelegate callback)
203                 {
204                         unsafe {
205                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution"));
206                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
207                         }
208                 }
209
210                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
211                 delegate ulong GetResolutionNativeDelegate (IntPtr inst);
212
213                 static ulong GetResolution_cb (IntPtr inst)
214                 {
215                         try {
216                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
217                                 ulong __result;
218                                 __result = __obj.OnGetResolution ();
219                                 return __result;
220                         } catch (Exception e) {
221                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
222                                 // NOTREACHED: above call does not return.
223                                 throw e;
224                         }
225                 }
226
227                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetResolution")]
228                 protected virtual ulong OnGetResolution ()
229                 {
230                         return InternalGetResolution ();
231                 }
232
233                 private ulong InternalGetResolution ()
234                 {
235                         GetResolutionNativeDelegate unmanaged = null;
236                         unsafe {
237                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution"));
238                                 unmanaged = (GetResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetResolutionNativeDelegate));
239                         }
240                         if (unmanaged == null) return 0;
241
242                         ulong __result = unmanaged (this.Handle);
243                         return __result;
244                 }
245
246                 static GetInternalTimeNativeDelegate GetInternalTime_cb_delegate;
247                 static GetInternalTimeNativeDelegate GetInternalTimeVMCallback {
248                         get {
249                                 if (GetInternalTime_cb_delegate == null)
250                                         GetInternalTime_cb_delegate = new GetInternalTimeNativeDelegate (GetInternalTime_cb);
251                                 return GetInternalTime_cb_delegate;
252                         }
253                 }
254
255                 static void OverrideGetInternalTime (GLib.GType gtype)
256                 {
257                         OverrideGetInternalTime (gtype, GetInternalTimeVMCallback);
258                 }
259
260                 static void OverrideGetInternalTime (GLib.GType gtype, GetInternalTimeNativeDelegate callback)
261                 {
262                         unsafe {
263                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time"));
264                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
265                         }
266                 }
267
268                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
269                 delegate ulong GetInternalTimeNativeDelegate (IntPtr inst);
270
271                 static ulong GetInternalTime_cb (IntPtr inst)
272                 {
273                         try {
274                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
275                                 ulong __result;
276                                 __result = __obj.OnGetInternalTime ();
277                                 return __result;
278                         } catch (Exception e) {
279                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
280                                 // NOTREACHED: above call does not return.
281                                 throw e;
282                         }
283                 }
284
285                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetInternalTime")]
286                 protected virtual ulong OnGetInternalTime ()
287                 {
288                         return InternalGetInternalTime ();
289                 }
290
291                 private ulong InternalGetInternalTime ()
292                 {
293                         GetInternalTimeNativeDelegate unmanaged = null;
294                         unsafe {
295                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time"));
296                                 unmanaged = (GetInternalTimeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetInternalTimeNativeDelegate));
297                         }
298                         if (unmanaged == null) return 0;
299
300                         ulong __result = unmanaged (this.Handle);
301                         return __result;
302                 }
303
304                 static WaitNativeDelegate Wait_cb_delegate;
305                 static WaitNativeDelegate WaitVMCallback {
306                         get {
307                                 if (Wait_cb_delegate == null)
308                                         Wait_cb_delegate = new WaitNativeDelegate (Wait_cb);
309                                 return Wait_cb_delegate;
310                         }
311                 }
312
313                 static void OverrideWait (GLib.GType gtype)
314                 {
315                         OverrideWait (gtype, WaitVMCallback);
316                 }
317
318                 static void OverrideWait (GLib.GType gtype, WaitNativeDelegate callback)
319                 {
320                         unsafe {
321                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait"));
322                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
323                         }
324                 }
325
326                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
327                 delegate int WaitNativeDelegate (IntPtr inst, IntPtr entry, long jitter);
328
329                 static int Wait_cb (IntPtr inst, IntPtr entry, long jitter)
330                 {
331                         try {
332                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
333                                 Gst.ClockReturn __result;
334                                 __result = __obj.OnWait (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false), jitter);
335                                 return (int) __result;
336                         } catch (Exception e) {
337                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
338                                 // NOTREACHED: above call does not return.
339                                 throw e;
340                         }
341                 }
342
343                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWait")]
344                 protected virtual Gst.ClockReturn OnWait (Gst.ClockEntry entry, long jitter)
345                 {
346                         return InternalWait (entry, jitter);
347                 }
348
349                 private Gst.ClockReturn InternalWait (Gst.ClockEntry entry, long jitter)
350                 {
351                         WaitNativeDelegate unmanaged = null;
352                         unsafe {
353                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait"));
354                                 unmanaged = (WaitNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitNativeDelegate));
355                         }
356                         if (unmanaged == null) return (Gst.ClockReturn) 0;
357
358                         int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle, jitter);
359                         return (Gst.ClockReturn) __result;
360                 }
361
362                 static WaitAsyncNativeDelegate WaitAsync_cb_delegate;
363                 static WaitAsyncNativeDelegate WaitAsyncVMCallback {
364                         get {
365                                 if (WaitAsync_cb_delegate == null)
366                                         WaitAsync_cb_delegate = new WaitAsyncNativeDelegate (WaitAsync_cb);
367                                 return WaitAsync_cb_delegate;
368                         }
369                 }
370
371                 static void OverrideWaitAsync (GLib.GType gtype)
372                 {
373                         OverrideWaitAsync (gtype, WaitAsyncVMCallback);
374                 }
375
376                 static void OverrideWaitAsync (GLib.GType gtype, WaitAsyncNativeDelegate callback)
377                 {
378                         unsafe {
379                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async"));
380                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
381                         }
382                 }
383
384                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
385                 delegate int WaitAsyncNativeDelegate (IntPtr inst, IntPtr entry);
386
387                 static int WaitAsync_cb (IntPtr inst, IntPtr entry)
388                 {
389                         try {
390                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
391                                 Gst.ClockReturn __result;
392                                 __result = __obj.OnWaitAsync (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false));
393                                 return (int) __result;
394                         } catch (Exception e) {
395                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
396                                 // NOTREACHED: above call does not return.
397                                 throw e;
398                         }
399                 }
400
401                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitAsync")]
402                 protected virtual Gst.ClockReturn OnWaitAsync (Gst.ClockEntry entry)
403                 {
404                         return InternalWaitAsync (entry);
405                 }
406
407                 private Gst.ClockReturn InternalWaitAsync (Gst.ClockEntry entry)
408                 {
409                         WaitAsyncNativeDelegate unmanaged = null;
410                         unsafe {
411                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async"));
412                                 unmanaged = (WaitAsyncNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitAsyncNativeDelegate));
413                         }
414                         if (unmanaged == null) return (Gst.ClockReturn) 0;
415
416                         int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle);
417                         return (Gst.ClockReturn) __result;
418                 }
419
420                 static UnscheduleNativeDelegate Unschedule_cb_delegate;
421                 static UnscheduleNativeDelegate UnscheduleVMCallback {
422                         get {
423                                 if (Unschedule_cb_delegate == null)
424                                         Unschedule_cb_delegate = new UnscheduleNativeDelegate (Unschedule_cb);
425                                 return Unschedule_cb_delegate;
426                         }
427                 }
428
429                 static void OverrideUnschedule (GLib.GType gtype)
430                 {
431                         OverrideUnschedule (gtype, UnscheduleVMCallback);
432                 }
433
434                 static void OverrideUnschedule (GLib.GType gtype, UnscheduleNativeDelegate callback)
435                 {
436                         unsafe {
437                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule"));
438                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
439                         }
440                 }
441
442                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
443                 delegate void UnscheduleNativeDelegate (IntPtr inst, IntPtr entry);
444
445                 static void Unschedule_cb (IntPtr inst, IntPtr entry)
446                 {
447                         try {
448                                 Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
449                                 __obj.OnUnschedule (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false));
450                         } catch (Exception e) {
451                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
452                         }
453                 }
454
455                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideUnschedule")]
456                 protected virtual void OnUnschedule (Gst.ClockEntry entry)
457                 {
458                         InternalUnschedule (entry);
459                 }
460
461                 private void InternalUnschedule (Gst.ClockEntry entry)
462                 {
463                         UnscheduleNativeDelegate unmanaged = null;
464                         unsafe {
465                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule"));
466                                 unmanaged = (UnscheduleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnscheduleNativeDelegate));
467                         }
468                         if (unmanaged == null) return;
469
470                         unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle);
471                 }
472
473
474                 // Internal representation of the wrapped structure ABI.
475                 static GLib.AbiStruct _class_abi = null;
476                 static public new GLib.AbiStruct class_abi {
477                         get {
478                                 if (_class_abi == null)
479                                         _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
480                                                 new GLib.AbiField("change_resolution"
481                                                         , Gst.Object.class_abi.Fields
482                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // change_resolution
483                                                         , null
484                                                         , "get_resolution"
485                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
486                                                         , 0
487                                                         ),
488                                                 new GLib.AbiField("get_resolution"
489                                                         , -1
490                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_resolution
491                                                         , "change_resolution"
492                                                         , "get_internal_time"
493                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
494                                                         , 0
495                                                         ),
496                                                 new GLib.AbiField("get_internal_time"
497                                                         , -1
498                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_internal_time
499                                                         , "get_resolution"
500                                                         , "wait"
501                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
502                                                         , 0
503                                                         ),
504                                                 new GLib.AbiField("wait"
505                                                         , -1
506                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // wait
507                                                         , "get_internal_time"
508                                                         , "wait_async"
509                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
510                                                         , 0
511                                                         ),
512                                                 new GLib.AbiField("wait_async"
513                                                         , -1
514                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // wait_async
515                                                         , "wait"
516                                                         , "unschedule"
517                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
518                                                         , 0
519                                                         ),
520                                                 new GLib.AbiField("unschedule"
521                                                         , -1
522                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // unschedule
523                                                         , "wait_async"
524                                                         , "_gst_reserved"
525                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
526                                                         , 0
527                                                         ),
528                                                 new GLib.AbiField("_gst_reserved"
529                                                         , -1
530                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
531                                                         , "unschedule"
532                                                         , null
533                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
534                                                         , 0
535                                                         ),
536                                         });
537
538                                 return _class_abi;
539                         }
540                 }
541
542
543                 // End of the ABI representation.
544
545                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
546                 static extern IntPtr gst_clock_get_type();
547
548                 public static new GLib.GType GType { 
549                         get {
550                                 IntPtr raw_ret = gst_clock_get_type();
551                                 GLib.GType ret = new GLib.GType(raw_ret);
552                                 return ret;
553                         }
554                 }
555
556                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
557                 static extern int gst_clock_id_compare_func(IntPtr id1, IntPtr id2);
558
559                 public static int IdCompareFunc(IntPtr id1, IntPtr id2) {
560                         int raw_ret = gst_clock_id_compare_func(id1, id2);
561                         int ret = raw_ret;
562                         return ret;
563                 }
564
565                 public static int IdCompareFunc() {
566                         return IdCompareFunc (IntPtr.Zero, IntPtr.Zero);
567                 }
568
569                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
570                 static extern IntPtr gst_clock_id_get_clock(IntPtr id);
571
572                 public static Gst.Clock IdGetClock(IntPtr id) {
573                         IntPtr raw_ret = gst_clock_id_get_clock(id);
574                         Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock;
575                         return ret;
576                 }
577
578                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
579                 static extern ulong gst_clock_id_get_time(IntPtr id);
580
581                 public static ulong IdGetTime(IntPtr id) {
582                         ulong raw_ret = gst_clock_id_get_time(id);
583                         ulong ret = raw_ret;
584                         return ret;
585                 }
586
587                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
588                 static extern IntPtr gst_clock_id_ref(IntPtr id);
589
590                 public static IntPtr IdRef(IntPtr id) {
591                         IntPtr raw_ret = gst_clock_id_ref(id);
592                         IntPtr ret = raw_ret;
593                         return ret;
594                 }
595
596                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
597                 static extern void gst_clock_id_unref(IntPtr id);
598
599                 public static void IdUnref(IntPtr id) {
600                         gst_clock_id_unref(id);
601                 }
602
603                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
604                 static extern void gst_clock_id_unschedule(IntPtr id);
605
606                 public static void IdUnschedule(IntPtr id) {
607                         gst_clock_id_unschedule(id);
608                 }
609
610                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
611                 static extern bool gst_clock_id_uses_clock(IntPtr id, IntPtr clock);
612
613                 public static bool IdUsesClock(IntPtr id, Gst.Clock clock) {
614                         bool raw_ret = gst_clock_id_uses_clock(id, clock == null ? IntPtr.Zero : clock.Handle);
615                         bool ret = raw_ret;
616                         return ret;
617                 }
618
619                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
620                 static extern int gst_clock_id_wait(IntPtr id, out long jitter);
621
622                 public static Gst.ClockReturn IdWait(IntPtr id, out long jitter) {
623                         int raw_ret = gst_clock_id_wait(id, out jitter);
624                         Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret;
625                         return ret;
626                 }
627
628                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
629                 static extern int gst_clock_id_wait_async(IntPtr id, GstSharp.ClockCallbackNative func, IntPtr user_data, GLib.DestroyNotify destroy_data);
630
631                 public static Gst.ClockReturn IdWaitAsync(IntPtr id, Gst.ClockCallback func) {
632                         GstSharp.ClockCallbackWrapper func_wrapper = new GstSharp.ClockCallbackWrapper (func);
633                         IntPtr user_data;
634                         GLib.DestroyNotify destroy_data;
635                         if (func == null) {
636                                 user_data = IntPtr.Zero;
637                                 destroy_data = null;
638                         } else {
639                                 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
640                                 destroy_data = GLib.DestroyHelper.NotifyHandler;
641                         }
642                         int raw_ret = gst_clock_id_wait_async(id, func_wrapper.NativeDelegate, user_data, destroy_data);
643                         Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret;
644                         return ret;
645                 }
646
647                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
648                 static extern bool gst_clock_add_observation(IntPtr raw, ulong slave, ulong master, out double r_squared);
649
650                 public bool AddObservation(ulong slave, ulong master, out double r_squared) {
651                         bool raw_ret = gst_clock_add_observation(Handle, slave, master, out r_squared);
652                         bool ret = raw_ret;
653                         return ret;
654                 }
655
656                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
657                 static extern bool gst_clock_add_observation_unapplied(IntPtr raw, ulong slave, ulong master, out double r_squared, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom);
658
659                 public bool AddObservationUnapplied(ulong slave, ulong master, out double r_squared, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom) {
660                         bool raw_ret = gst_clock_add_observation_unapplied(Handle, slave, master, out r_squared, out _internal, out external, out rate_num, out rate_denom);
661                         bool ret = raw_ret;
662                         return ret;
663                 }
664
665                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
666                 static extern ulong gst_clock_adjust_unlocked(IntPtr raw, ulong _internal);
667
668                 public ulong AdjustUnlocked(ulong _internal) {
669                         ulong raw_ret = gst_clock_adjust_unlocked(Handle, _internal);
670                         ulong ret = raw_ret;
671                         return ret;
672                 }
673
674                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
675                 static extern ulong gst_clock_adjust_with_calibration(IntPtr raw, ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom);
676
677                 public ulong AdjustWithCalibration(ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) {
678                         ulong raw_ret = gst_clock_adjust_with_calibration(Handle, internal_target, cinternal, cexternal, cnum, cdenom);
679                         ulong ret = raw_ret;
680                         return ret;
681                 }
682
683                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
684                 static extern void gst_clock_get_calibration(IntPtr raw, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom);
685
686                 public void GetCalibration(out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom) {
687                         gst_clock_get_calibration(Handle, out _internal, out external, out rate_num, out rate_denom);
688                 }
689
690                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
691                 static extern ulong gst_clock_get_internal_time(IntPtr raw);
692
693                 public ulong InternalTime { 
694                         get {
695                                 ulong raw_ret = gst_clock_get_internal_time(Handle);
696                                 ulong ret = raw_ret;
697                                 return ret;
698                         }
699                 }
700
701                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
702                 static extern IntPtr gst_clock_get_master(IntPtr raw);
703
704                 public Gst.Clock Master { 
705                         get {
706                                 IntPtr raw_ret = gst_clock_get_master(Handle);
707                                 Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock;
708                                 return ret;
709                         }
710                 }
711
712                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
713                 static extern ulong gst_clock_get_resolution(IntPtr raw);
714
715                 public ulong Resolution { 
716                         get {
717                                 ulong raw_ret = gst_clock_get_resolution(Handle);
718                                 ulong ret = raw_ret;
719                                 return ret;
720                         }
721                 }
722
723                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
724                 static extern ulong gst_clock_get_time(IntPtr raw);
725
726                 public ulong Time { 
727                         get {
728                                 ulong raw_ret = gst_clock_get_time(Handle);
729                                 ulong ret = raw_ret;
730                                 return ret;
731                         }
732                 }
733
734                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
735                 static extern bool gst_clock_is_synced(IntPtr raw);
736
737                 public bool IsSynced { 
738                         get {
739                                 bool raw_ret = gst_clock_is_synced(Handle);
740                                 bool ret = raw_ret;
741                                 return ret;
742                         }
743                 }
744
745                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
746                 static extern IntPtr gst_clock_new_periodic_id(IntPtr raw, ulong start_time, ulong interval);
747
748                 public IntPtr NewPeriodicId(ulong start_time, ulong interval) {
749                         IntPtr raw_ret = gst_clock_new_periodic_id(Handle, start_time, interval);
750                         IntPtr ret = raw_ret;
751                         return ret;
752                 }
753
754                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
755                 static extern IntPtr gst_clock_new_single_shot_id(IntPtr raw, ulong time);
756
757                 public IntPtr NewSingleShotId(ulong time) {
758                         IntPtr raw_ret = gst_clock_new_single_shot_id(Handle, time);
759                         IntPtr ret = raw_ret;
760                         return ret;
761                 }
762
763                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
764                 static extern bool gst_clock_periodic_id_reinit(IntPtr raw, IntPtr id, ulong start_time, ulong interval);
765
766                 public bool PeriodicIdReinit(IntPtr id, ulong start_time, ulong interval) {
767                         bool raw_ret = gst_clock_periodic_id_reinit(Handle, id, start_time, interval);
768                         bool ret = raw_ret;
769                         return ret;
770                 }
771
772                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
773                 static extern void gst_clock_set_calibration(IntPtr raw, ulong _internal, ulong external, ulong rate_num, ulong rate_denom);
774
775                 public void SetCalibration(ulong _internal, ulong external, ulong rate_num, ulong rate_denom) {
776                         gst_clock_set_calibration(Handle, _internal, external, rate_num, rate_denom);
777                 }
778
779                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
780                 static extern bool gst_clock_set_master(IntPtr raw, IntPtr master);
781
782                 public bool SetMaster(Gst.Clock master) {
783                         bool raw_ret = gst_clock_set_master(Handle, master == null ? IntPtr.Zero : master.Handle);
784                         bool ret = raw_ret;
785                         return ret;
786                 }
787
788                 public bool SetMaster() {
789                         return SetMaster (null);
790                 }
791
792                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
793                 static extern ulong gst_clock_set_resolution(IntPtr raw, ulong resolution);
794
795                 public ulong SetResolution(ulong resolution) {
796                         ulong raw_ret = gst_clock_set_resolution(Handle, resolution);
797                         ulong ret = raw_ret;
798                         return ret;
799                 }
800
801                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
802                 static extern void gst_clock_set_synced(IntPtr raw, bool synced);
803
804                 public void is_synced(bool synced) {
805                         gst_clock_set_synced(Handle, synced);
806                 }
807
808                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
809                 static extern bool gst_clock_single_shot_id_reinit(IntPtr raw, IntPtr id, ulong time);
810
811                 public bool SingleShotIdReinit(IntPtr id, ulong time) {
812                         bool raw_ret = gst_clock_single_shot_id_reinit(Handle, id, time);
813                         bool ret = raw_ret;
814                         return ret;
815                 }
816
817                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
818                 static extern ulong gst_clock_unadjust_unlocked(IntPtr raw, ulong external);
819
820                 public ulong UnadjustUnlocked(ulong external) {
821                         ulong raw_ret = gst_clock_unadjust_unlocked(Handle, external);
822                         ulong ret = raw_ret;
823                         return ret;
824                 }
825
826                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
827                 static extern ulong gst_clock_unadjust_with_calibration(IntPtr raw, ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom);
828
829                 public ulong UnadjustWithCalibration(ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) {
830                         ulong raw_ret = gst_clock_unadjust_with_calibration(Handle, external_target, cinternal, cexternal, cnum, cdenom);
831                         ulong ret = raw_ret;
832                         return ret;
833                 }
834
835                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
836                 static extern bool gst_clock_wait_for_sync(IntPtr raw, ulong timeout);
837
838                 public bool WaitForSync(ulong timeout) {
839                         bool raw_ret = gst_clock_wait_for_sync(Handle, timeout);
840                         bool ret = raw_ret;
841                         return ret;
842                 }
843
844
845                 // Internal representation of the wrapped structure ABI.
846                 static GLib.AbiStruct _abi_info = null;
847                 static public new GLib.AbiStruct abi_info {
848                         get {
849                                 if (_abi_info == null)
850                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
851                                                 new GLib.AbiField("priv"
852                                                         , Gst.Object.abi_info.Fields
853                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
854                                                         , null
855                                                         , "_gst_reserved"
856                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
857                                                         , 0
858                                                         ),
859                                                 new GLib.AbiField("_gst_reserved"
860                                                         , -1
861                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
862                                                         , "priv"
863                                                         , null
864                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
865                                                         , 0
866                                                         ),
867                                         });
868
869                                 return _abi_info;
870                         }
871                 }
872
873
874                 // End of the ABI representation.
875
876 #endregion
877         }
878 }