summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Clock.cs
blob: 8fbfab9a9073abe50f06d41e97e4e05b66d72099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class Clock : Gst.Object {

		protected Clock (IntPtr raw) : base(raw) {}

		protected Clock() : base(IntPtr.Zero)
		{
			CreateNativeObject (new string [0], new GLib.Value [0]);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_get_timeout(IntPtr raw);

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_set_timeout(IntPtr raw, ulong timeout);

		[GLib.Property ("timeout")]
		public ulong Timeout {
			get  {
				ulong raw_ret = gst_clock_get_timeout(Handle);
				ulong ret = raw_ret;
				return ret;
			}
			set  {
				gst_clock_set_timeout(Handle, value);
			}
		}

		[GLib.Property ("window-size")]
		public int WindowSize {
			get {
				GLib.Value val = GetProperty ("window-size");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("window-size", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("window-threshold")]
		public int WindowThreshold {
			get {
				GLib.Value val = GetProperty ("window-threshold");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("window-threshold", val);
				val.Dispose ();
			}
		}

		[GLib.Signal("synced")]
		public event Gst.SyncedHandler Synced {
			add {
				this.AddSignalHandler ("synced", value, typeof (Gst.SyncedArgs));
			}
			remove {
				this.RemoveSignalHandler ("synced", value);
			}
		}

		static SyncedNativeDelegate Synced_cb_delegate;
		static SyncedNativeDelegate SyncedVMCallback {
			get {
				if (Synced_cb_delegate == null)
					Synced_cb_delegate = new SyncedNativeDelegate (Synced_cb);
				return Synced_cb_delegate;
			}
		}

		static void OverrideSynced (GLib.GType gtype)
		{
			OverrideSynced (gtype, SyncedVMCallback);
		}

		static void OverrideSynced (GLib.GType gtype, SyncedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "synced", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SyncedNativeDelegate (IntPtr inst, bool synced);

		static void Synced_cb (IntPtr inst, bool synced)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				__obj.OnSynced (synced);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideSynced")]
		protected virtual void OnSynced (bool synced)
		{
			InternalSynced (synced);
		}

		private void InternalSynced (bool synced)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (synced);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ChangeResolutionNativeDelegate ChangeResolution_cb_delegate;
		static ChangeResolutionNativeDelegate ChangeResolutionVMCallback {
			get {
				if (ChangeResolution_cb_delegate == null)
					ChangeResolution_cb_delegate = new ChangeResolutionNativeDelegate (ChangeResolution_cb);
				return ChangeResolution_cb_delegate;
			}
		}

		static void OverrideChangeResolution (GLib.GType gtype)
		{
			OverrideChangeResolution (gtype, ChangeResolutionVMCallback);
		}

		static void OverrideChangeResolution (GLib.GType gtype, ChangeResolutionNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate ulong ChangeResolutionNativeDelegate (IntPtr inst, ulong old_resolution, ulong new_resolution);

		static ulong ChangeResolution_cb (IntPtr inst, ulong old_resolution, ulong new_resolution)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				ulong __result;
				__result = __obj.OnChangeResolution (old_resolution, new_resolution);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideChangeResolution")]
		protected virtual ulong OnChangeResolution (ulong old_resolution, ulong new_resolution)
		{
			return InternalChangeResolution (old_resolution, new_resolution);
		}

		private ulong InternalChangeResolution (ulong old_resolution, ulong new_resolution)
		{
			ChangeResolutionNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("change_resolution"));
				unmanaged = (ChangeResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ChangeResolutionNativeDelegate));
			}
			if (unmanaged == null) return 0;

			ulong __result = unmanaged (this.Handle, old_resolution, new_resolution);
			return __result;
		}

		static GetResolutionNativeDelegate GetResolution_cb_delegate;
		static GetResolutionNativeDelegate GetResolutionVMCallback {
			get {
				if (GetResolution_cb_delegate == null)
					GetResolution_cb_delegate = new GetResolutionNativeDelegate (GetResolution_cb);
				return GetResolution_cb_delegate;
			}
		}

		static void OverrideGetResolution (GLib.GType gtype)
		{
			OverrideGetResolution (gtype, GetResolutionVMCallback);
		}

		static void OverrideGetResolution (GLib.GType gtype, GetResolutionNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate ulong GetResolutionNativeDelegate (IntPtr inst);

		static ulong GetResolution_cb (IntPtr inst)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				ulong __result;
				__result = __obj.OnGetResolution ();
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetResolution")]
		protected virtual ulong OnGetResolution ()
		{
			return InternalGetResolution ();
		}

		private ulong InternalGetResolution ()
		{
			GetResolutionNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_resolution"));
				unmanaged = (GetResolutionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetResolutionNativeDelegate));
			}
			if (unmanaged == null) return 0;

			ulong __result = unmanaged (this.Handle);
			return __result;
		}

		static GetInternalTimeNativeDelegate GetInternalTime_cb_delegate;
		static GetInternalTimeNativeDelegate GetInternalTimeVMCallback {
			get {
				if (GetInternalTime_cb_delegate == null)
					GetInternalTime_cb_delegate = new GetInternalTimeNativeDelegate (GetInternalTime_cb);
				return GetInternalTime_cb_delegate;
			}
		}

		static void OverrideGetInternalTime (GLib.GType gtype)
		{
			OverrideGetInternalTime (gtype, GetInternalTimeVMCallback);
		}

		static void OverrideGetInternalTime (GLib.GType gtype, GetInternalTimeNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate ulong GetInternalTimeNativeDelegate (IntPtr inst);

		static ulong GetInternalTime_cb (IntPtr inst)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				ulong __result;
				__result = __obj.OnGetInternalTime ();
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideGetInternalTime")]
		protected virtual ulong OnGetInternalTime ()
		{
			return InternalGetInternalTime ();
		}

		private ulong InternalGetInternalTime ()
		{
			GetInternalTimeNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_internal_time"));
				unmanaged = (GetInternalTimeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetInternalTimeNativeDelegate));
			}
			if (unmanaged == null) return 0;

			ulong __result = unmanaged (this.Handle);
			return __result;
		}

		static WaitNativeDelegate Wait_cb_delegate;
		static WaitNativeDelegate WaitVMCallback {
			get {
				if (Wait_cb_delegate == null)
					Wait_cb_delegate = new WaitNativeDelegate (Wait_cb);
				return Wait_cb_delegate;
			}
		}

		static void OverrideWait (GLib.GType gtype)
		{
			OverrideWait (gtype, WaitVMCallback);
		}

		static void OverrideWait (GLib.GType gtype, WaitNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int WaitNativeDelegate (IntPtr inst, IntPtr entry, long jitter);

		static int Wait_cb (IntPtr inst, IntPtr entry, long jitter)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				Gst.ClockReturn __result;
				__result = __obj.OnWait (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false), jitter);
				return (int) __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWait")]
		protected virtual Gst.ClockReturn OnWait (Gst.ClockEntry entry, long jitter)
		{
			return InternalWait (entry, jitter);
		}

		private Gst.ClockReturn InternalWait (Gst.ClockEntry entry, long jitter)
		{
			WaitNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait"));
				unmanaged = (WaitNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitNativeDelegate));
			}
			if (unmanaged == null) return (Gst.ClockReturn) 0;

			int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle, jitter);
			return (Gst.ClockReturn) __result;
		}

		static WaitAsyncNativeDelegate WaitAsync_cb_delegate;
		static WaitAsyncNativeDelegate WaitAsyncVMCallback {
			get {
				if (WaitAsync_cb_delegate == null)
					WaitAsync_cb_delegate = new WaitAsyncNativeDelegate (WaitAsync_cb);
				return WaitAsync_cb_delegate;
			}
		}

		static void OverrideWaitAsync (GLib.GType gtype)
		{
			OverrideWaitAsync (gtype, WaitAsyncVMCallback);
		}

		static void OverrideWaitAsync (GLib.GType gtype, WaitAsyncNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int WaitAsyncNativeDelegate (IntPtr inst, IntPtr entry);

		static int WaitAsync_cb (IntPtr inst, IntPtr entry)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				Gst.ClockReturn __result;
				__result = __obj.OnWaitAsync (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false));
				return (int) __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw e;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideWaitAsync")]
		protected virtual Gst.ClockReturn OnWaitAsync (Gst.ClockEntry entry)
		{
			return InternalWaitAsync (entry);
		}

		private Gst.ClockReturn InternalWaitAsync (Gst.ClockEntry entry)
		{
			WaitAsyncNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("wait_async"));
				unmanaged = (WaitAsyncNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WaitAsyncNativeDelegate));
			}
			if (unmanaged == null) return (Gst.ClockReturn) 0;

			int __result = unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle);
			return (Gst.ClockReturn) __result;
		}

		static UnscheduleNativeDelegate Unschedule_cb_delegate;
		static UnscheduleNativeDelegate UnscheduleVMCallback {
			get {
				if (Unschedule_cb_delegate == null)
					Unschedule_cb_delegate = new UnscheduleNativeDelegate (Unschedule_cb);
				return Unschedule_cb_delegate;
			}
		}

		static void OverrideUnschedule (GLib.GType gtype)
		{
			OverrideUnschedule (gtype, UnscheduleVMCallback);
		}

		static void OverrideUnschedule (GLib.GType gtype, UnscheduleNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void UnscheduleNativeDelegate (IntPtr inst, IntPtr entry);

		static void Unschedule_cb (IntPtr inst, IntPtr entry)
		{
			try {
				Clock __obj = GLib.Object.GetObject (inst, false) as Clock;
				__obj.OnUnschedule (entry == IntPtr.Zero ? null : (Gst.ClockEntry) GLib.Opaque.GetOpaque (entry, typeof (Gst.ClockEntry), false));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gst.Clock), ConnectionMethod="OverrideUnschedule")]
		protected virtual void OnUnschedule (Gst.ClockEntry entry)
		{
			InternalUnschedule (entry);
		}

		private void InternalUnschedule (Gst.ClockEntry entry)
		{
			UnscheduleNativeDelegate unmanaged = null;
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unschedule"));
				unmanaged = (UnscheduleNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnscheduleNativeDelegate));
			}
			if (unmanaged == null) return;

			unmanaged (this.Handle, entry == null ? IntPtr.Zero : entry.Handle);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("change_resolution"
							, Gst.Object.class_abi.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // change_resolution
							, null
							, "get_resolution"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_resolution"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_resolution
							, "change_resolution"
							, "get_internal_time"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("get_internal_time"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_internal_time
							, "get_resolution"
							, "wait"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("wait"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // wait
							, "get_internal_time"
							, "wait_async"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("wait_async"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // wait_async
							, "wait"
							, "unschedule"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("unschedule"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // unschedule
							, "wait_async"
							, "_gst_reserved"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gst_reserved"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
							, "unschedule"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_clock_get_type();

		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gst_clock_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_clock_id_compare_func(IntPtr id1, IntPtr id2);

		public static int IdCompareFunc(IntPtr id1, IntPtr id2) {
			int raw_ret = gst_clock_id_compare_func(id1, id2);
			int ret = raw_ret;
			return ret;
		}

		public static int IdCompareFunc() {
			return IdCompareFunc (IntPtr.Zero, IntPtr.Zero);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_id_get_time(IntPtr id);

		public static ulong IdGetTime(IntPtr id) {
			ulong raw_ret = gst_clock_id_get_time(id);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_clock_id_ref(IntPtr id);

		public static IntPtr IdRef(IntPtr id) {
			IntPtr raw_ret = gst_clock_id_ref(id);
			IntPtr ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_id_unref(IntPtr id);

		public static void IdUnref(IntPtr id) {
			gst_clock_id_unref(id);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_id_unschedule(IntPtr id);

		public static void IdUnschedule(IntPtr id) {
			gst_clock_id_unschedule(id);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_clock_id_wait(IntPtr id, out long jitter);

		public static Gst.ClockReturn IdWait(IntPtr id, out long jitter) {
			int raw_ret = gst_clock_id_wait(id, out jitter);
			Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_clock_id_wait_async(IntPtr id, GstSharp.ClockCallbackNative func, IntPtr user_data, GLib.DestroyNotify destroy_data);

		public static Gst.ClockReturn IdWaitAsync(IntPtr id, Gst.ClockCallback func) {
			GstSharp.ClockCallbackWrapper func_wrapper = new GstSharp.ClockCallbackWrapper (func);
			IntPtr user_data;
			GLib.DestroyNotify destroy_data;
			if (func == null) {
				user_data = IntPtr.Zero;
				destroy_data = null;
			} else {
				user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
				destroy_data = GLib.DestroyHelper.NotifyHandler;
			}
			int raw_ret = gst_clock_id_wait_async(id, func_wrapper.NativeDelegate, user_data, destroy_data);
			Gst.ClockReturn ret = (Gst.ClockReturn) raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_add_observation(IntPtr raw, ulong slave, ulong master, out double r_squared);

		public bool AddObservation(ulong slave, ulong master, out double r_squared) {
			bool raw_ret = gst_clock_add_observation(Handle, slave, master, out r_squared);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		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);

		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) {
			bool raw_ret = gst_clock_add_observation_unapplied(Handle, slave, master, out r_squared, out _internal, out external, out rate_num, out rate_denom);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_adjust_unlocked(IntPtr raw, ulong _internal);

		public ulong AdjustUnlocked(ulong _internal) {
			ulong raw_ret = gst_clock_adjust_unlocked(Handle, _internal);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_adjust_with_calibration(IntPtr raw, ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom);

		public ulong AdjustWithCalibration(ulong internal_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) {
			ulong raw_ret = gst_clock_adjust_with_calibration(Handle, internal_target, cinternal, cexternal, cnum, cdenom);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_get_calibration(IntPtr raw, out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom);

		public void GetCalibration(out ulong _internal, out ulong external, out ulong rate_num, out ulong rate_denom) {
			gst_clock_get_calibration(Handle, out _internal, out external, out rate_num, out rate_denom);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_get_internal_time(IntPtr raw);

		public ulong InternalTime { 
			get {
				ulong raw_ret = gst_clock_get_internal_time(Handle);
				ulong ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_clock_get_master(IntPtr raw);

		public Gst.Clock Master { 
			get {
				IntPtr raw_ret = gst_clock_get_master(Handle);
				Gst.Clock ret = GLib.Object.GetObject(raw_ret, true) as Gst.Clock;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_get_resolution(IntPtr raw);

		public ulong Resolution { 
			get {
				ulong raw_ret = gst_clock_get_resolution(Handle);
				ulong ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_get_time(IntPtr raw);

		public ulong Time { 
			get {
				ulong raw_ret = gst_clock_get_time(Handle);
				ulong ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_is_synced(IntPtr raw);

		public bool IsSynced { 
			get {
				bool raw_ret = gst_clock_is_synced(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_clock_new_periodic_id(IntPtr raw, ulong start_time, ulong interval);

		public IntPtr NewPeriodicId(ulong start_time, ulong interval) {
			IntPtr raw_ret = gst_clock_new_periodic_id(Handle, start_time, interval);
			IntPtr ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_clock_new_single_shot_id(IntPtr raw, ulong time);

		public IntPtr NewSingleShotId(ulong time) {
			IntPtr raw_ret = gst_clock_new_single_shot_id(Handle, time);
			IntPtr ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_periodic_id_reinit(IntPtr raw, IntPtr id, ulong start_time, ulong interval);

		public bool PeriodicIdReinit(IntPtr id, ulong start_time, ulong interval) {
			bool raw_ret = gst_clock_periodic_id_reinit(Handle, id, start_time, interval);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_set_calibration(IntPtr raw, ulong _internal, ulong external, ulong rate_num, ulong rate_denom);

		public void SetCalibration(ulong _internal, ulong external, ulong rate_num, ulong rate_denom) {
			gst_clock_set_calibration(Handle, _internal, external, rate_num, rate_denom);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_set_master(IntPtr raw, IntPtr master);

		public bool SetMaster(Gst.Clock master) {
			bool raw_ret = gst_clock_set_master(Handle, master == null ? IntPtr.Zero : master.Handle);
			bool ret = raw_ret;
			return ret;
		}

		public bool SetMaster() {
			return SetMaster (null);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_set_resolution(IntPtr raw, ulong resolution);

		public ulong SetResolution(ulong resolution) {
			ulong raw_ret = gst_clock_set_resolution(Handle, resolution);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_clock_set_synced(IntPtr raw, bool synced);

		public void is_synced(bool synced) {
			gst_clock_set_synced(Handle, synced);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_single_shot_id_reinit(IntPtr raw, IntPtr id, ulong time);

		public bool SingleShotIdReinit(IntPtr id, ulong time) {
			bool raw_ret = gst_clock_single_shot_id_reinit(Handle, id, time);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_unadjust_unlocked(IntPtr raw, ulong external);

		public ulong UnadjustUnlocked(ulong external) {
			ulong raw_ret = gst_clock_unadjust_unlocked(Handle, external);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_clock_unadjust_with_calibration(IntPtr raw, ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom);

		public ulong UnadjustWithCalibration(ulong external_target, ulong cinternal, ulong cexternal, ulong cnum, ulong cdenom) {
			ulong raw_ret = gst_clock_unadjust_with_calibration(Handle, external_target, cinternal, cexternal, cnum, cdenom);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_clock_wait_for_sync(IntPtr raw, ulong timeout);

		public bool WaitForSync(ulong timeout) {
			bool raw_ret = gst_clock_wait_for_sync(Handle, timeout);
			bool ret = raw_ret;
			return ret;
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("priv"
							, Gst.Object.abi_info.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
							, null
							, "_gst_reserved"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("_gst_reserved"
							, -1
							, (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
							, "priv"
							, null
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}