summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Event.cs
blob: dad280d4b2c756733404307ff2a6c66ffd793f43 (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
// 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 Event : Gst.MiniObject {

		public Gst.EventType Type {
			get {
				unsafe {
					int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
					return (Gst.EventType) (*raw_ptr);
				}
			}
			set {
				unsafe {
					int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
					*raw_ptr = (int) value;
				}
			}
		}

		public ulong Timestamp {
			get {
				unsafe {
					ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp"));
					return (*raw_ptr);
				}
			}
			set {
				unsafe {
					ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("timestamp"));
					*raw_ptr = value;
				}
			}
		}

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

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_seqnum(IntPtr raw, uint seqnum);

		public uint Seqnum {
			get  {
				uint raw_ret = gst_event_get_seqnum(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gst_event_set_seqnum(Handle, value);
			}
		}

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

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

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_copy_segment(IntPtr raw, IntPtr segment);

		public void CopySegment(Gst.Segment segment) {
			IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment);
			gst_event_copy_segment(Handle, native_segment);
			Marshal.FreeHGlobal (native_segment);
		}

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

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_running_time_offset(IntPtr raw, long offset);

		public long RunningTimeOffset { 
			get {
				long raw_ret = gst_event_get_running_time_offset(Handle);
				long ret = raw_ret;
				return ret;
			}
			set {
				gst_event_set_running_time_offset(Handle, value);
			}
		}

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

		public Gst.Structure Structure { 
			get {
				IntPtr raw_ret = gst_event_get_structure(Handle);
				Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
				return ret;
			}
		}

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

		public bool HasName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			bool raw_ret = gst_event_has_name(Handle, native_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_event_has_name_id(IntPtr raw, uint name);

		public bool HasNameId(uint name) {
			bool raw_ret = gst_event_has_name_id(Handle, name);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_buffer_size(IntPtr raw, out int format, out long minsize, out long maxsize, out bool async);

		public void ParseBufferSize(out Gst.Format format, out long minsize, out long maxsize, out bool async) {
			int native_format;
			gst_event_parse_buffer_size(Handle, out native_format, out minsize, out maxsize, out async);
			format = (Gst.Format) native_format;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_caps(IntPtr raw, out IntPtr caps);

		public Gst.Caps ParseCaps() {
			Gst.Caps caps;
			IntPtr native_caps;
			gst_event_parse_caps(Handle, out native_caps);
			caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false);
			return caps;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_flush_stop(IntPtr raw, out bool reset_time);

		public bool ParseFlushStop() {
			bool reset_time;
			gst_event_parse_flush_stop(Handle, out reset_time);
			return reset_time;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_gap(IntPtr raw, out ulong timestamp, out ulong duration);

		public void ParseGap(out ulong timestamp, out ulong duration) {
			gst_event_parse_gap(Handle, out timestamp, out duration);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_event_parse_group_id(IntPtr raw, out uint group_id);

		public bool ParseGroupId(out uint group_id) {
			bool raw_ret = gst_event_parse_group_id(Handle, out group_id);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_instant_rate_change(IntPtr raw, out double rate_multiplier, out int new_flags);

		public void ParseInstantRateChange(out double rate_multiplier, out Gst.SegmentFlags new_flags) {
			int native_new_flags;
			gst_event_parse_instant_rate_change(Handle, out rate_multiplier, out native_new_flags);
			new_flags = (Gst.SegmentFlags) native_new_flags;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_instant_rate_sync_time(IntPtr raw, out double rate_multiplier, out ulong running_time, out ulong upstream_running_time);

		public void ParseInstantRateSyncTime(out double rate_multiplier, out ulong running_time, out ulong upstream_running_time) {
			gst_event_parse_instant_rate_sync_time(Handle, out rate_multiplier, out running_time, out upstream_running_time);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_latency(IntPtr raw, out ulong latency);

		public ulong ParseLatency() {
			ulong latency;
			gst_event_parse_latency(Handle, out latency);
			return latency;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_protection(IntPtr raw, out IntPtr system_id, out IntPtr data, out IntPtr origin);

		public void ParseProtection(out string system_id, out Gst.Buffer data, out string origin) {
			IntPtr native_system_id;
			IntPtr native_data;
			IntPtr native_origin;
			gst_event_parse_protection(Handle, out native_system_id, out native_data, out native_origin);
			system_id = GLib.Marshaller.Utf8PtrToString (native_system_id);
			data = native_data == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_data, typeof (Gst.Buffer), false);
			origin = GLib.Marshaller.Utf8PtrToString (native_origin);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_qos(IntPtr raw, out int type, out double proportion, out long diff, out ulong timestamp);

		public void ParseQos(out Gst.QOSType type, out double proportion, out long diff, out ulong timestamp) {
			int native_type;
			gst_event_parse_qos(Handle, out native_type, out proportion, out diff, out timestamp);
			type = (Gst.QOSType) native_type;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_seek(IntPtr raw, out double rate, out int format, out int flags, out int start_type, out long start, out int stop_type, out long stop);

		public void ParseSeek(out double rate, out Gst.Format format, out Gst.SeekFlags flags, out Gst.SeekType start_type, out long start, out Gst.SeekType stop_type, out long stop) {
			int native_format;
			int native_flags;
			int native_start_type;
			int native_stop_type;
			gst_event_parse_seek(Handle, out rate, out native_format, out native_flags, out native_start_type, out start, out native_stop_type, out stop);
			format = (Gst.Format) native_format;
			flags = (Gst.SeekFlags) native_flags;
			start_type = (Gst.SeekType) native_start_type;
			stop_type = (Gst.SeekType) native_stop_type;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_seek_trickmode_interval(IntPtr raw, out ulong interval);

		public ulong ParseSeekTrickmodeInterval() {
			ulong interval;
			gst_event_parse_seek_trickmode_interval(Handle, out interval);
			return interval;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_segment(IntPtr raw, IntPtr segment);

		public Gst.Segment ParseSegment() {
			Gst.Segment segment;
			IntPtr native_segment = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Segment)));
			gst_event_parse_segment(Handle, native_segment);
			segment = Gst.Segment.New (native_segment);
			Marshal.FreeHGlobal (native_segment);
			return segment;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_segment_done(IntPtr raw, out int format, out long position);

		public void ParseSegmentDone(out Gst.Format format, out long position) {
			int native_format;
			gst_event_parse_segment_done(Handle, out native_format, out position);
			format = (Gst.Format) native_format;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_select_streams(IntPtr raw, out IntPtr streams);

		public GLib.List ParseSelectStreams() {
			GLib.List streams;
			IntPtr native_streams;
			gst_event_parse_select_streams(Handle, out native_streams);
			streams = new GLib.List(native_streams);
			return streams;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_sink_message(IntPtr raw, out IntPtr msg);

		public Gst.Message ParseSinkMessage() {
			Gst.Message msg;
			IntPtr native_msg;
			gst_event_parse_sink_message(Handle, out native_msg);
			msg = native_msg == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Message), true);
			return msg;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_step(IntPtr raw, out int format, out ulong amount, out double rate, out bool flush, out bool intermediate);

		public void ParseStep(out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) {
			int native_format;
			gst_event_parse_step(Handle, out native_format, out amount, out rate, out flush, out intermediate);
			format = (Gst.Format) native_format;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_stream(IntPtr raw, out IntPtr stream);

		public Gst.Stream ParseStream() {
			Gst.Stream stream;
			IntPtr native_stream;
			gst_event_parse_stream(Handle, out native_stream);
			stream = GLib.Object.GetObject(native_stream, true) as Gst.Stream;
			return stream;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_stream_collection(IntPtr raw, out IntPtr collection);

		public Gst.StreamCollection ParseStreamCollection() {
			Gst.StreamCollection collection;
			IntPtr native_collection;
			gst_event_parse_stream_collection(Handle, out native_collection);
			collection = GLib.Object.GetObject(native_collection, true) as Gst.StreamCollection;
			return collection;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_stream_flags(IntPtr raw, out int flags);

		public Gst.StreamFlags ParseStreamFlags() {
			Gst.StreamFlags flags;
			int native_flags;
			gst_event_parse_stream_flags(Handle, out native_flags);
			flags = (Gst.StreamFlags) native_flags;
			return flags;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_stream_group_done(IntPtr raw, out uint group_id);

		public uint ParseStreamGroupDone() {
			uint group_id;
			gst_event_parse_stream_group_done(Handle, out group_id);
			return group_id;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_stream_start(IntPtr raw, out IntPtr stream_id);

		public string ParseStreamStart() {
			string stream_id;
			IntPtr native_stream_id;
			gst_event_parse_stream_start(Handle, out native_stream_id);
			stream_id = GLib.Marshaller.Utf8PtrToString (native_stream_id);
			return stream_id;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_tag(IntPtr raw, out IntPtr taglist);

		public Gst.TagList ParseTag() {
			Gst.TagList taglist;
			IntPtr native_taglist;
			gst_event_parse_tag(Handle, out native_taglist);
			taglist = native_taglist == IntPtr.Zero ? null : (Gst.TagList) GLib.Opaque.GetOpaque (native_taglist, typeof (Gst.TagList), false);
			return taglist;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_toc(IntPtr raw, IntPtr toc, out bool updated);

		public void ParseToc(out Gst.Toc toc, out bool updated) {
			IntPtr native_toc = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Toc)));
			gst_event_parse_toc(Handle, native_toc, out updated);
			toc = Gst.Toc.New (native_toc);
			Marshal.FreeHGlobal (native_toc);
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_parse_toc_select(IntPtr raw, out IntPtr uid);

		public string ParseTocSelect() {
			string uid;
			IntPtr native_uid;
			gst_event_parse_toc_select(Handle, out native_uid);
			uid = GLib.Marshaller.PtrToStringGFree(native_uid);
			return uid;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_group_id(IntPtr raw, uint group_id);

		public uint GroupId { 
			set {
				gst_event_set_group_id(Handle, value);
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_seek_trickmode_interval(IntPtr raw, ulong interval);

		public ulong SeekTrickmodeInterval { 
			set {
				gst_event_set_seek_trickmode_interval(Handle, value);
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_stream(IntPtr raw, IntPtr stream);

		public Gst.Stream Stream { 
			set {
				gst_event_set_stream(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_event_set_stream_flags(IntPtr raw, int flags);

		public Gst.StreamFlags StreamFlags { 
			set {
				gst_event_set_stream_flags(Handle, (int) value);
			}
		}

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

		public Gst.Structure WritableStructure() {
			IntPtr raw_ret = gst_event_writable_structure(Handle);
			Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
			return ret;
		}

		public Event(IntPtr raw) : base(raw) {}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_buffer_size(int format, long minsize, long maxsize, bool async);

		public static Event NewBufferSize(Gst.Format format, long minsize, long maxsize, bool async)
		{
			Event result = new Event (gst_event_new_buffer_size((int) format, minsize, maxsize, async));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_caps(IntPtr caps);

		public static Event NewCaps(Gst.Caps caps)
		{
			Event result = new Event (gst_event_new_caps(caps == null ? IntPtr.Zero : caps.Handle));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_custom(int type, IntPtr structure);

		public static Event NewCustom(Gst.EventType type, Gst.Structure structure)
		{
			structure.Owned = false;
			Event result = new Event (gst_event_new_custom((int) type, structure == null ? IntPtr.Zero : structure.Handle));
			return result;
		}

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

		public static Event NewEos()
		{
			Event result = new Event (gst_event_new_eos());
			return result;
		}

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

		public static Event NewFlushStart()
		{
			Event result = new Event (gst_event_new_flush_start());
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_flush_stop(bool reset_time);

		public static Event NewFlushStop(bool reset_time)
		{
			Event result = new Event (gst_event_new_flush_stop(reset_time));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_gap(ulong timestamp, ulong duration);

		public static Event NewGap(ulong timestamp, ulong duration)
		{
			Event result = new Event (gst_event_new_gap(timestamp, duration));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_instant_rate_change(double rate_multiplier, int new_flags);

		public static Event NewInstantRateChange(double rate_multiplier, Gst.SegmentFlags new_flags)
		{
			Event result = new Event (gst_event_new_instant_rate_change(rate_multiplier, (int) new_flags));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_instant_rate_sync_time(double rate_multiplier, ulong running_time, ulong upstream_running_time);

		public static Event NewInstantRateSyncTime(double rate_multiplier, ulong running_time, ulong upstream_running_time)
		{
			Event result = new Event (gst_event_new_instant_rate_sync_time(rate_multiplier, running_time, upstream_running_time));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_latency(ulong latency);

		public static Event NewLatency(ulong latency)
		{
			Event result = new Event (gst_event_new_latency(latency));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_navigation(IntPtr structure);

		public static Event NewNavigation(Gst.Structure structure)
		{
			structure.Owned = false;
			Event result = new Event (gst_event_new_navigation(structure == null ? IntPtr.Zero : structure.Handle));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_protection(IntPtr system_id, IntPtr data, IntPtr origin);

		public static Event NewProtection(string system_id, Gst.Buffer data, string origin)
		{
			IntPtr native_system_id = GLib.Marshaller.StringToPtrGStrdup (system_id);
			IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin);
			Event result = new Event (gst_event_new_protection(native_system_id, data == null ? IntPtr.Zero : data.Handle, native_origin));
			GLib.Marshaller.Free (native_system_id);
			GLib.Marshaller.Free (native_origin);
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_qos(int type, double proportion, long diff, ulong timestamp);

		public static Event NewQos(Gst.QOSType type, double proportion, long diff, ulong timestamp)
		{
			Event result = new Event (gst_event_new_qos((int) type, proportion, diff, timestamp));
			return result;
		}

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

		public static Event NewReconfigure()
		{
			Event result = new Event (gst_event_new_reconfigure());
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_seek(double rate, int format, int flags, int start_type, long start, int stop_type, long stop);

		public static Event NewSeek(double rate, Gst.Format format, Gst.SeekFlags flags, Gst.SeekType start_type, long start, Gst.SeekType stop_type, long stop)
		{
			Event result = new Event (gst_event_new_seek(rate, (int) format, (int) flags, (int) start_type, start, (int) stop_type, stop));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_segment(IntPtr segment);

		public static Event NewSegment(Gst.Segment segment)
		{
			IntPtr native_segment = GLib.Marshaller.StructureToPtrAlloc (segment);
			Event result = new Event (gst_event_new_segment(native_segment));
			Marshal.FreeHGlobal (native_segment);
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_segment_done(int format, long position);

		public static Event NewSegmentDone(Gst.Format format, long position)
		{
			Event result = new Event (gst_event_new_segment_done((int) format, position));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_select_streams(IntPtr streams);

		public static Event NewSelectStreams(GLib.List streams)
		{
			Event result = new Event (gst_event_new_select_streams(streams == null ? IntPtr.Zero : streams.Handle));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_sink_message(IntPtr name, IntPtr msg);

		public static Event NewSinkMessage(string name, Gst.Message msg)
		{
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			Event result = new Event (gst_event_new_sink_message(native_name, msg == null ? IntPtr.Zero : msg.Handle));
			GLib.Marshaller.Free (native_name);
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_step(int format, ulong amount, double rate, bool flush, bool intermediate);

		public static Event NewStep(Gst.Format format, ulong amount, double rate, bool flush, bool intermediate)
		{
			Event result = new Event (gst_event_new_step((int) format, amount, rate, flush, intermediate));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_stream_collection(IntPtr collection);

		public static Event NewStreamCollection(Gst.StreamCollection collection)
		{
			Event result = new Event (gst_event_new_stream_collection(collection == null ? IntPtr.Zero : collection.Handle));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_stream_group_done(uint group_id);

		public static Event NewStreamGroupDone(uint group_id)
		{
			Event result = new Event (gst_event_new_stream_group_done(group_id));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_stream_start(IntPtr stream_id);

		public static Event NewStreamStart(string stream_id)
		{
			IntPtr native_stream_id = GLib.Marshaller.StringToPtrGStrdup (stream_id);
			Event result = new Event (gst_event_new_stream_start(native_stream_id));
			GLib.Marshaller.Free (native_stream_id);
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_tag(IntPtr taglist);

		public static Event NewTag(Gst.TagList taglist)
		{
			taglist.Owned = false;
			Event result = new Event (gst_event_new_tag(taglist == null ? IntPtr.Zero : taglist.Handle));
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_toc(IntPtr toc, bool updated);

		public static Event NewToc(Gst.Toc toc, bool updated)
		{
			IntPtr native_toc = GLib.Marshaller.StructureToPtrAlloc (toc);
			Event result = new Event (gst_event_new_toc(native_toc, updated));
			Marshal.FreeHGlobal (native_toc);
			return result;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_event_new_toc_select(IntPtr uid);

		public static Event NewTocSelect(string uid)
		{
			IntPtr native_uid = GLib.Marshaller.StringToPtrGStrdup (uid);
			Event result = new Event (gst_event_new_toc_select(native_uid));
			GLib.Marshaller.Free (native_uid);
			return result;
		}

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

		protected override void Ref (IntPtr raw)
		{
			if (!Owned) {
				gst_event_ref (raw);
				Owned = true;
			}
		}

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

		protected override void Unref (IntPtr raw)
		{
			if (Owned) {
				gst_event_unref (raw);
				Owned = false;
			}
		}

		class FinalizerInfo {
			IntPtr handle;

			public FinalizerInfo (IntPtr handle)
			{
				this.handle = handle;
			}

			public bool Handler ()
			{
				gst_event_unref (handle);
				return false;
			}
		}

		~Event ()
		{
			if (!Owned)
				return;
			FinalizerInfo info = new FinalizerInfo (Handle);
			GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
		}


		// 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("type"
							, Gst.MiniObject.abi_info.Fields
							, (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.EventType))) // type
							, null
							, "timestamp"
							, (long) Marshal.OffsetOf(typeof(GstEvent_typeAlign), "type")
							, 0
							),
						new GLib.AbiField("timestamp"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // timestamp
							, "type"
							, "seqnum"
							, (long) Marshal.OffsetOf(typeof(GstEvent_timestampAlign), "timestamp")
							, 0
							),
						new GLib.AbiField("seqnum"
							, -1
							, (uint) Marshal.SizeOf(typeof(uint)) // seqnum
							, "timestamp"
							, null
							, (long) Marshal.OffsetOf(typeof(GstEvent_seqnumAlign), "seqnum")
							, 0
							),
					});

				return _abi_info;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstEvent_typeAlign
		{
			sbyte f1;
			private Gst.EventType type;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstEvent_timestampAlign
		{
			sbyte f1;
			private ulong timestamp;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstEvent_seqnumAlign
		{
			sbyte f1;
			private uint seqnum;
		}


		// End of the ABI representation.

#endregion
	}
}