summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Structure.cs
blob: 77f1efc2c9a4b01c3c6210646e3f14a8f015a715 (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
// 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 Structure : GLib.Opaque {

		public GLib.GType Type {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
					return new GLib.GType((*raw_ptr));
				}
			}
			set {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
					*raw_ptr = value.Val;
				}
			}
		}

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

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

		public string Name {
			get  {
				IntPtr raw_ret = gst_structure_get_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gst_structure_set_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

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

		public bool CanIntersect(Gst.Structure struct2) {
			bool raw_ret = gst_structure_can_intersect(Handle, struct2 == null ? IntPtr.Zero : struct2.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

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

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_structure_filter_and_map_in_place(IntPtr raw, GstSharp.StructureFilterMapFuncNative func, IntPtr user_data);

		public void FilterAndMapInPlace(Gst.StructureFilterMapFunc func) {
			GstSharp.StructureFilterMapFuncWrapper func_wrapper = new GstSharp.StructureFilterMapFuncWrapper (func);
			gst_structure_filter_and_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
		}

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

		public void Fixate() {
			gst_structure_fixate(Handle);
		}

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

		public bool FixateField(string field_name) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			bool raw_ret = gst_structure_fixate_field(Handle, native_field_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			return ret;
		}

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

		public bool FixateFieldBoolean(string field_name, bool target) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			bool raw_ret = gst_structure_fixate_field_boolean(Handle, native_field_name, target);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_fixate_field_nearest_double(IntPtr raw, IntPtr field_name, double target);

		public bool FixateFieldNearestDouble(string field_name, double target) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			bool raw_ret = gst_structure_fixate_field_nearest_double(Handle, native_field_name, target);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_fixate_field_nearest_fraction(IntPtr raw, IntPtr field_name, int target_numerator, int target_denominator);

		public bool FixateFieldNearestFraction(string field_name, int target_numerator, int target_denominator) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			bool raw_ret = gst_structure_fixate_field_nearest_fraction(Handle, native_field_name, target_numerator, target_denominator);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_fixate_field_nearest_int(IntPtr raw, IntPtr field_name, int target);

		public bool FixateFieldNearestInt(string field_name, int target) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			bool raw_ret = gst_structure_fixate_field_nearest_int(Handle, native_field_name, target);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			return ret;
		}

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

		public bool FixateFieldString(string field_name, string target) {
			IntPtr native_field_name = GLib.Marshaller.StringToPtrGStrdup (field_name);
			IntPtr native_target = GLib.Marshaller.StringToPtrGStrdup (target);
			bool raw_ret = gst_structure_fixate_field_string(Handle, native_field_name, native_target);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_field_name);
			GLib.Marshaller.Free (native_target);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_foreach(IntPtr raw, GstSharp.StructureForeachFuncNative func, IntPtr user_data);

		public bool Foreach(Gst.StructureForeachFunc func) {
			GstSharp.StructureForeachFuncWrapper func_wrapper = new GstSharp.StructureForeachFuncWrapper (func);
			bool raw_ret = gst_structure_foreach(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_array(IntPtr raw, IntPtr fieldname, out IntPtr array);

		public bool GetArray(string fieldname, out GLib.ValueArray array) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_array;
			bool raw_ret = gst_structure_get_array(Handle, native_fieldname, out native_array);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			array = new GLib.ValueArray(native_array);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_boolean(IntPtr raw, IntPtr fieldname, out bool value);

		public bool GetBoolean(string fieldname, out bool value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_boolean(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_clock_time(IntPtr raw, IntPtr fieldname, out ulong value);

		public bool GetClockTime(string fieldname, out ulong value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_clock_time(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_date(IntPtr raw, IntPtr fieldname, out IntPtr value);

		public bool GetDate(string fieldname, out GLib.Date value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_value;
			bool raw_ret = gst_structure_get_date(Handle, native_fieldname, out native_value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			value = new GLib.Date(native_value);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_date_time(IntPtr raw, IntPtr fieldname, out IntPtr value);

		public bool GetDateTime(string fieldname, out Gst.DateTime value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_value;
			bool raw_ret = gst_structure_get_date_time(Handle, native_fieldname, out native_value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			value = native_value == IntPtr.Zero ? null : (Gst.DateTime) GLib.Opaque.GetOpaque (native_value, typeof (Gst.DateTime), true);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_double(IntPtr raw, IntPtr fieldname, out double value);

		public bool GetDouble(string fieldname, out double value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_double(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_enum(IntPtr raw, IntPtr fieldname, IntPtr enumtype, out int value);

		public bool GetEnum(string fieldname, GLib.GType enumtype, out int value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_enum(Handle, native_fieldname, enumtype.Val, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public GLib.GType GetFieldType(string fieldname) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr raw_ret = gst_structure_get_field_type(Handle, native_fieldname);
			GLib.GType ret = new GLib.GType(raw_ret);
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public bool GetFlagset(string fieldname, out uint value_flags, out uint value_mask) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_flagset(Handle, native_fieldname, out value_flags, out value_mask);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_fraction(IntPtr raw, IntPtr fieldname, out int value_numerator, out int value_denominator);

		public bool GetFraction(string fieldname, out int value_numerator, out int value_denominator) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_fraction(Handle, native_fieldname, out value_numerator, out value_denominator);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_int(IntPtr raw, IntPtr fieldname, out int value);

		public bool GetInt(string fieldname, out int value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_int(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_int64(IntPtr raw, IntPtr fieldname, out long value);

		public bool GetInt64(string fieldname, out long value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_int64(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_list(IntPtr raw, IntPtr fieldname, out IntPtr array);

		public bool GetList(string fieldname, out GLib.ValueArray array) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_array;
			bool raw_ret = gst_structure_get_list(Handle, native_fieldname, out native_array);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			array = new GLib.ValueArray(native_array);
			return ret;
		}

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

		public uint NameId { 
			get {
				uint raw_ret = gst_structure_get_name_id(Handle);
				uint ret = raw_ret;
				return ret;
			}
		}

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

		public string GetString(string fieldname) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr raw_ret = gst_structure_get_string(Handle, native_fieldname);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public bool GetUint(string fieldname, out uint value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_uint(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_get_uint64(IntPtr raw, IntPtr fieldname, out ulong value);

		public bool GetUint64(string fieldname, out ulong value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_get_uint64(Handle, native_fieldname, out value);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public GLib.Value GetValue(string fieldname) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr raw_ret = gst_structure_get_value(Handle, native_fieldname);
			GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public bool HasField(string fieldname) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_has_field(Handle, native_fieldname);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public bool HasFieldTyped(string fieldname, GLib.GType type) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			bool raw_ret = gst_structure_has_field_typed(Handle, native_fieldname, type.Val);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_fieldname);
			return ret;
		}

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

		public bool HasName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			bool raw_ret = gst_structure_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 IntPtr gst_structure_id_get_value(IntPtr raw, uint field);

		public GLib.Value IdGetValue(uint field) {
			IntPtr raw_ret = gst_structure_id_get_value(Handle, field);
			GLib.Value ret = (GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (GLib.Value));
			return ret;
		}

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

		public bool IdHasField(uint field) {
			bool raw_ret = gst_structure_id_has_field(Handle, field);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool IdHasFieldTyped(uint field, GLib.GType type) {
			bool raw_ret = gst_structure_id_has_field_typed(Handle, field, type.Val);
			bool ret = raw_ret;
			return ret;
		}

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

		public void IdSetValue(uint field, GLib.Value value) {
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gst_structure_id_set_value(Handle, field, native_value);
			Marshal.FreeHGlobal (native_value);
		}

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

		public void IdTakeValue(uint field, GLib.Value value) {
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gst_structure_id_take_value(Handle, field, native_value);
			Marshal.FreeHGlobal (native_value);
		}

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

		public Gst.Structure Intersect(Gst.Structure struct2) {
			IntPtr raw_ret = gst_structure_intersect(Handle, struct2 == null ? IntPtr.Zero : struct2.Handle);
			Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true);
			return ret;
		}

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

		public bool IsEqual(Gst.Structure structure2) {
			bool raw_ret = gst_structure_is_equal(Handle, structure2 == null ? IntPtr.Zero : structure2.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool IsSubset(Gst.Structure superset) {
			bool raw_ret = gst_structure_is_subset(Handle, superset == null ? IntPtr.Zero : superset.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_structure_map_in_place(IntPtr raw, GstSharp.StructureMapFuncNative func, IntPtr user_data);

		public bool MapInPlace(Gst.StructureMapFunc func) {
			GstSharp.StructureMapFuncWrapper func_wrapper = new GstSharp.StructureMapFuncWrapper (func);
			bool raw_ret = gst_structure_map_in_place(Handle, func_wrapper.NativeDelegate, IntPtr.Zero);
			bool ret = raw_ret;
			return ret;
		}

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

		public int NFields() {
			int raw_ret = gst_structure_n_fields(Handle);
			int ret = raw_ret;
			return ret;
		}

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

		public string NthFieldName(uint index) {
			IntPtr raw_ret = gst_structure_nth_field_name(Handle, index);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

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

		public void RemoveAllFields() {
			gst_structure_remove_all_fields(Handle);
		}

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

		public void RemoveField(string fieldname) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			gst_structure_remove_field(Handle, native_fieldname);
			GLib.Marshaller.Free (native_fieldname);
		}

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

		public void SetArray(string fieldname, GLib.ValueArray array) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			gst_structure_set_array(Handle, native_fieldname, array == null ? IntPtr.Zero : array.Handle);
			GLib.Marshaller.Free (native_fieldname);
		}

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

		public void SetList(string fieldname, GLib.ValueArray array) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			gst_structure_set_list(Handle, native_fieldname, array == null ? IntPtr.Zero : array.Handle);
			GLib.Marshaller.Free (native_fieldname);
		}

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

		public bool SetParentRefcount(int refcount) {
			bool raw_ret = gst_structure_set_parent_refcount(Handle, refcount);
			bool ret = raw_ret;
			return ret;
		}

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

		public void SetValue(string fieldname, GLib.Value value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gst_structure_set_value(Handle, native_fieldname, native_value);
			GLib.Marshaller.Free (native_fieldname);
			Marshal.FreeHGlobal (native_value);
		}

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

		public void TakeValue(string fieldname, GLib.Value value) {
			IntPtr native_fieldname = GLib.Marshaller.StringToPtrGStrdup (fieldname);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gst_structure_take_value(Handle, native_fieldname, native_value);
			GLib.Marshaller.Free (native_fieldname);
			Marshal.FreeHGlobal (native_value);
		}

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

		public override string ToString() {
			IntPtr raw_ret = gst_structure_to_string(Handle);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

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

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

		public Structure (string str1ng, out string end) 
		{
			IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng);
			IntPtr native_end;
			Raw = gst_structure_from_string(native_str1ng, out native_end);
			GLib.Marshaller.Free (native_str1ng);
			end = GLib.Marshaller.Utf8PtrToString (native_end);
		}

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

		public Structure (string name) 
		{
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			Raw = gst_structure_new_empty(native_name);
			GLib.Marshaller.Free (native_name);
		}

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

		public static Structure NewFromString(string str1ng)
		{
			IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng);
			Structure result = new Structure (gst_structure_new_from_string(native_str1ng));
			GLib.Marshaller.Free (native_str1ng);
			return result;
		}

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

		public Structure (uint quark) 
		{
			Raw = gst_structure_new_id_empty(quark);
		}

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

		protected override void Free (IntPtr raw)
		{
			gst_structure_free (raw);
		}

		class FinalizerInfo {
			IntPtr handle;

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

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

		~Structure ()
		{
			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 GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("type"
							, 0
							, (uint) Marshal.SizeOf(typeof(GLib.GType)) // type
							, null
							, "name"
							, (long) Marshal.OffsetOf(typeof(GstStructure_typeAlign), "type")
							, 0
							),
						new GLib.AbiField("name"
							, -1
							, (uint) Marshal.SizeOf(typeof(uint)) // name
							, "type"
							, null
							, (long) Marshal.OffsetOf(typeof(GstStructure_nameAlign), "name")
							, 0
							),
					});

				return _abi_info;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstStructure_typeAlign
		{
			sbyte f1;
			private GLib.GType type;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GstStructure_nameAlign
		{
			sbyte f1;
			private string name;
		}


		// End of the ABI representation.

#endregion
	}
}