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

		public Gst.BufferPool Pool {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool"));
					return GLib.Object.GetObject((*raw_ptr)) as Gst.BufferPool;
				}
			}
			set {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool"));
					*raw_ptr = value == null ? IntPtr.Zero : value.Handle;
				}
			}
		}

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

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

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

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

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

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

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

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

		public Gst.Meta AddMeta(Gst.MetaInfo info, IntPtr parms) {
			IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
			IntPtr raw_ret = gst_buffer_add_meta(Handle, native_info, parms);
			Gst.Meta ret = Gst.Meta.New (raw_ret);
			Marshal.FreeHGlobal (native_info);
			return ret;
		}

		public Gst.Meta AddMeta(Gst.MetaInfo info) {
			return AddMeta (info, IntPtr.Zero);
		}

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

		public Gst.ParentBufferMeta AddParentBufferMeta(Gst.Buffer reference) {
			IntPtr raw_ret = gst_buffer_add_parent_buffer_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle);
			Gst.ParentBufferMeta ret = Gst.ParentBufferMeta.New (raw_ret);
			return ret;
		}

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

		public Gst.ProtectionMeta AddProtectionMeta(Gst.Structure info) {
			info.Owned = false;
			IntPtr raw_ret = gst_buffer_add_protection_meta(Handle, info == null ? IntPtr.Zero : info.Handle);
			Gst.ProtectionMeta ret = Gst.ProtectionMeta.New (raw_ret);
			return ret;
		}

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

		public Gst.ReferenceTimestampMeta AddReferenceTimestampMeta(Gst.Caps reference, ulong timestamp, ulong duration) {
			IntPtr raw_ret = gst_buffer_add_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle, timestamp, duration);
			Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret);
			return ret;
		}

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

		public Gst.Buffer Append(Gst.Buffer buf2) {
			buf2.Owned = false;
			IntPtr raw_ret = gst_buffer_append(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle);
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

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

		public void AppendMemory(Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_append_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
		}

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

		public Gst.Buffer AppendRegion(Gst.Buffer buf2, long offset, long size) {
			buf2.Owned = false;
			IntPtr raw_ret = gst_buffer_append_region(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle, new IntPtr (offset), new IntPtr (size));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

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

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

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_buffer_copy_into(IntPtr raw, IntPtr src, int flags, UIntPtr offset, UIntPtr size);

		public bool CopyInto(Gst.Buffer src, Gst.BufferCopyFlags flags, ulong offset, ulong size) {
			bool raw_ret = gst_buffer_copy_into(Handle, src == null ? IntPtr.Zero : src.Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size));
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_buffer_copy_region(IntPtr raw, int flags, UIntPtr offset, UIntPtr size);

		public Gst.Buffer CopyRegion(Gst.BufferCopyFlags flags, ulong offset, ulong size) {
			IntPtr raw_ret = gst_buffer_copy_region(Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern UIntPtr gst_buffer_fill(IntPtr raw, UIntPtr offset, byte[] src, UIntPtr n_length);

		public ulong Fill(ulong offset, byte[] src) {
			UIntPtr raw_ret = gst_buffer_fill(Handle, new UIntPtr (offset), src, new UIntPtr ((ulong) (src == null ? 0 : src.Length)));
			ulong ret = (ulong) raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_buffer_find_memory(IntPtr raw, UIntPtr offset, UIntPtr size, out uint idx, out uint length, out UIntPtr skip);

		public bool FindMemory(ulong offset, ulong size, out uint idx, out uint length, out ulong skip) {
			UIntPtr native_skip;
			bool raw_ret = gst_buffer_find_memory(Handle, new UIntPtr (offset), new UIntPtr (size), out idx, out length, out native_skip);
			bool ret = raw_ret;
			skip = (ulong) native_skip;
			return ret;
		}

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

		public Gst.Memory AllMemory { 
			get {
				IntPtr raw_ret = gst_buffer_get_all_memory(Handle);
				Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
				return ret;
			}
		}

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

		public Gst.BufferFlags Flags { 
			get {
				int raw_ret = gst_buffer_get_flags(Handle);
				Gst.BufferFlags ret = (Gst.BufferFlags) raw_ret;
				return ret;
			}
		}

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

		public Gst.Memory GetMemory(uint idx) {
			IntPtr raw_ret = gst_buffer_get_memory(Handle, idx);
			Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_buffer_get_memory_range(IntPtr raw, uint idx, int length);

		public Gst.Memory GetMemoryRange(uint idx, int length) {
			IntPtr raw_ret = gst_buffer_get_memory_range(Handle, idx, length);
			Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
			return ret;
		}

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

		public Gst.Meta GetMeta(GLib.GType api) {
			IntPtr raw_ret = gst_buffer_get_meta(Handle, api.Val);
			Gst.Meta ret = Gst.Meta.New (raw_ret);
			return ret;
		}

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

		public uint GetNMeta(GLib.GType api_type) {
			uint raw_ret = gst_buffer_get_n_meta(Handle, api_type.Val);
			uint ret = raw_ret;
			return ret;
		}

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

		public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta(Gst.Caps reference) {
			IntPtr raw_ret = gst_buffer_get_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle);
			Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret);
			return ret;
		}

		public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta() {
			return GetReferenceTimestampMeta (null);
		}

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

		public ulong Size { 
			get {
				UIntPtr raw_ret = gst_buffer_get_size(Handle);
				ulong ret = (ulong) raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern UIntPtr gst_buffer_get_sizes(IntPtr raw, out UIntPtr offset, out UIntPtr maxsize);

		public ulong GetSizes(out ulong offset, out ulong maxsize) {
			UIntPtr native_offset;
			UIntPtr native_maxsize;
			UIntPtr raw_ret = gst_buffer_get_sizes(Handle, out native_offset, out native_maxsize);
			ulong ret = (ulong) raw_ret;
			offset = (ulong) native_offset;
			maxsize = (ulong) native_maxsize;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern UIntPtr gst_buffer_get_sizes_range(IntPtr raw, uint idx, int length, out UIntPtr offset, out UIntPtr maxsize);

		public ulong GetSizesRange(uint idx, int length, out ulong offset, out ulong maxsize) {
			UIntPtr native_offset;
			UIntPtr native_maxsize;
			UIntPtr raw_ret = gst_buffer_get_sizes_range(Handle, idx, length, out native_offset, out native_maxsize);
			ulong ret = (ulong) raw_ret;
			offset = (ulong) native_offset;
			maxsize = (ulong) native_maxsize;
			return ret;
		}

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

		public bool HasFlags(Gst.BufferFlags flags) {
			bool raw_ret = gst_buffer_has_flags(Handle, (int) flags);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_buffer_insert_memory(IntPtr raw, int idx, IntPtr mem);

		public void InsertMemory(int idx, Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_insert_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle);
		}

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

		public bool IsAllMemoryWritable { 
			get {
				bool raw_ret = gst_buffer_is_all_memory_writable(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_buffer_is_memory_range_writable(IntPtr raw, uint idx, int length);

		public bool IsMemoryRangeWritable(uint idx, int length) {
			bool raw_ret = gst_buffer_is_memory_range_writable(Handle, idx, length);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool Map(out Gst.MapInfo info, Gst.MapFlags flags) {
			IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo)));
			bool raw_ret = gst_buffer_map(Handle, native_info, (int) flags);
			bool ret = raw_ret;
			info = Gst.MapInfo.New (native_info);
			Marshal.FreeHGlobal (native_info);
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_buffer_map_range(IntPtr raw, uint idx, int length, IntPtr info, int flags);

		public bool MapRange(uint idx, int length, out Gst.MapInfo info, Gst.MapFlags flags) {
			IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo)));
			bool raw_ret = gst_buffer_map_range(Handle, idx, length, native_info, (int) flags);
			bool ret = raw_ret;
			info = Gst.MapInfo.New (native_info);
			Marshal.FreeHGlobal (native_info);
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_buffer_memcmp(IntPtr raw, UIntPtr offset, byte[] mem, UIntPtr n_length);

		public int Memcmp(ulong offset, byte[] mem) {
			int raw_ret = gst_buffer_memcmp(Handle, new UIntPtr (offset), mem, new UIntPtr ((ulong) (mem == null ? 0 : mem.Length)));
			int ret = raw_ret;
			return ret;
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern UIntPtr gst_buffer_memset(IntPtr raw, UIntPtr offset, byte val, UIntPtr size);

		public ulong Memset(ulong offset, byte val, ulong size) {
			UIntPtr raw_ret = gst_buffer_memset(Handle, new UIntPtr (offset), val, new UIntPtr (size));
			ulong ret = (ulong) raw_ret;
			return ret;
		}

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

		public uint NMemory() {
			uint raw_ret = gst_buffer_n_memory(Handle);
			uint ret = raw_ret;
			return ret;
		}

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

		public Gst.Memory PeekMemory(uint idx) {
			IntPtr raw_ret = gst_buffer_peek_memory(Handle, idx);
			Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), false);
			return ret;
		}

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

		public void PrependMemory(Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_prepend_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
		}

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

		public void RemoveAllMemory() {
			gst_buffer_remove_all_memory(Handle);
		}

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

		public void RemoveMemory(uint idx) {
			gst_buffer_remove_memory(Handle, idx);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_buffer_remove_memory_range(IntPtr raw, uint idx, int length);

		public void RemoveMemoryRange(uint idx, int length) {
			gst_buffer_remove_memory_range(Handle, idx, length);
		}

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

		public bool RemoveMeta(Gst.Meta meta) {
			IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta);
			bool raw_ret = gst_buffer_remove_meta(Handle, native_meta);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_meta);
			return ret;
		}

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

		public void ReplaceAllMemory(Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_replace_all_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_buffer_replace_memory(IntPtr raw, uint idx, IntPtr mem);

		public void ReplaceMemory(uint idx, Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_replace_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_buffer_replace_memory_range(IntPtr raw, uint idx, int length, IntPtr mem);

		public void ReplaceMemoryRange(uint idx, int length, Gst.Memory mem) {
			mem.Owned = false;
			gst_buffer_replace_memory_range(Handle, idx, length, mem == null ? IntPtr.Zero : mem.Handle);
		}

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

		public void Resize(long offset, long size) {
			gst_buffer_resize(Handle, new IntPtr (offset), new IntPtr (size));
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_buffer_resize_range(IntPtr raw, uint idx, int length, IntPtr offset, IntPtr size);

		public bool ResizeRange(uint idx, int length, long offset, long size) {
			bool raw_ret = gst_buffer_resize_range(Handle, idx, length, new IntPtr (offset), new IntPtr (size));
			bool ret = raw_ret;
			return ret;
		}

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

		public bool SetFlags(Gst.BufferFlags flags) {
			bool raw_ret = gst_buffer_set_flags(Handle, (int) flags);
			bool ret = raw_ret;
			return ret;
		}

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

		public void SetSize(long size) {
			gst_buffer_set_size(Handle, new IntPtr (size));
		}

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

		public void Unmap(Gst.MapInfo info) {
			IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
			gst_buffer_unmap(Handle, native_info);
			Marshal.FreeHGlobal (native_info);
		}

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

		public bool UnsetFlags(Gst.BufferFlags flags) {
			bool raw_ret = gst_buffer_unset_flags(Handle, (int) flags);
			bool ret = raw_ret;
			return ret;
		}

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

		public static uint MaxMemory { 
			get {
				uint raw_ret = gst_buffer_get_max_memory();
				uint ret = raw_ret;
				return ret;
			}
		}

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

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

		public Buffer () 
		{
			Raw = gst_buffer_new();
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_buffer_new_allocate(IntPtr allocator, UIntPtr size, IntPtr parms);

		public Buffer (Gst.Allocator allocator, ulong size, Gst.AllocationParams parms) 
		{
			IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms);
			Raw = gst_buffer_new_allocate(allocator == null ? IntPtr.Zero : allocator.Handle, new UIntPtr (size), native_parms);
			Marshal.FreeHGlobal (native_parms);
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_buffer_new_wrapped(byte[] data, UIntPtr n_length);

		public Buffer (byte[] data) 
		{
			Raw = gst_buffer_new_wrapped(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)));
		}

		[DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_buffer_new_wrapped_full(int flags, byte[] data, UIntPtr maxsize, UIntPtr offset, UIntPtr size, IntPtr user_data, GLib.DestroyNotify notify);

		public Buffer (Gst.MemoryFlags flags, byte[] data, ulong maxsize, ulong offset, ulong size, IntPtr user_data, GLib.DestroyNotify notify) 
		{
			Raw = gst_buffer_new_wrapped_full((int) flags, data, new UIntPtr (maxsize), new UIntPtr (offset), new UIntPtr (size), user_data, notify);
		}


		// 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("pool"
							, Gst.MiniObject.abi_info.Fields
							, (uint) Marshal.SizeOf(typeof(IntPtr)) // pool
							, null
							, "pts"
							, (uint) Marshal.SizeOf(typeof(IntPtr))
							, 0
							),
						new GLib.AbiField("pts"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // pts
							, "pool"
							, "dts"
							, (long) Marshal.OffsetOf(typeof(GstBuffer_ptsAlign), "pts")
							, 0
							),
						new GLib.AbiField("dts"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // dts
							, "pts"
							, "duration"
							, (long) Marshal.OffsetOf(typeof(GstBuffer_dtsAlign), "dts")
							, 0
							),
						new GLib.AbiField("duration"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // duration
							, "dts"
							, "offset"
							, (long) Marshal.OffsetOf(typeof(GstBuffer_durationAlign), "duration")
							, 0
							),
						new GLib.AbiField("offset"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // offset
							, "duration"
							, "offset_end"
							, (long) Marshal.OffsetOf(typeof(GstBuffer_offsetAlign), "offset")
							, 0
							),
						new GLib.AbiField("offset_end"
							, -1
							, (uint) Marshal.SizeOf(typeof(ulong)) // offset_end
							, "offset"
							, null
							, (long) Marshal.OffsetOf(typeof(GstBuffer_offset_endAlign), "offset_end")
							, 0
							),
					});

				return _abi_info;
			}
		}

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

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

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

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

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


		// End of the ABI representation.

#endregion
	}
}