1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Buffer : Gst.MiniObject {
14 public Gst.BufferPool Pool {
17 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool"));
18 return GLib.Object.GetObject((*raw_ptr)) as Gst.BufferPool;
23 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("pool"));
24 *raw_ptr = value == null ? IntPtr.Zero : value.Handle;
32 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("pts"));
38 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("pts"));
47 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("dts"));
53 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("dts"));
59 public ulong Duration {
62 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("duration"));
68 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("duration"));
77 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset"));
83 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset"));
89 public ulong OffsetEnd {
92 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset_end"));
98 ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("offset_end"));
104 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
105 static extern IntPtr gst_buffer_get_type();
107 public static GLib.GType GType {
109 IntPtr raw_ret = gst_buffer_get_type();
110 GLib.GType ret = new GLib.GType(raw_ret);
115 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
116 static extern IntPtr gst_buffer_add_custom_meta(IntPtr raw, IntPtr name);
118 public Gst.CustomMeta AddCustomMeta(string name) {
119 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
120 IntPtr raw_ret = gst_buffer_add_custom_meta(Handle, native_name);
121 Gst.CustomMeta ret = Gst.CustomMeta.New (raw_ret);
122 GLib.Marshaller.Free (native_name);
126 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
127 static extern IntPtr gst_buffer_add_meta(IntPtr raw, IntPtr info, IntPtr parms);
129 public Gst.Meta AddMeta(Gst.MetaInfo info, IntPtr parms) {
130 IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
131 IntPtr raw_ret = gst_buffer_add_meta(Handle, native_info, parms);
132 Gst.Meta ret = Gst.Meta.New (raw_ret);
133 Marshal.FreeHGlobal (native_info);
137 public Gst.Meta AddMeta(Gst.MetaInfo info) {
138 return AddMeta (info, IntPtr.Zero);
141 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
142 static extern IntPtr gst_buffer_add_parent_buffer_meta(IntPtr raw, IntPtr reference);
144 public Gst.ParentBufferMeta AddParentBufferMeta(Gst.Buffer reference) {
145 IntPtr raw_ret = gst_buffer_add_parent_buffer_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle);
146 Gst.ParentBufferMeta ret = Gst.ParentBufferMeta.New (raw_ret);
150 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
151 static extern IntPtr gst_buffer_add_protection_meta(IntPtr raw, IntPtr info);
153 public Gst.ProtectionMeta AddProtectionMeta(Gst.Structure info) {
155 IntPtr raw_ret = gst_buffer_add_protection_meta(Handle, info == null ? IntPtr.Zero : info.Handle);
156 Gst.ProtectionMeta ret = Gst.ProtectionMeta.New (raw_ret);
160 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
161 static extern IntPtr gst_buffer_add_reference_timestamp_meta(IntPtr raw, IntPtr reference, ulong timestamp, ulong duration);
163 public Gst.ReferenceTimestampMeta AddReferenceTimestampMeta(Gst.Caps reference, ulong timestamp, ulong duration) {
164 IntPtr raw_ret = gst_buffer_add_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle, timestamp, duration);
165 Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret);
169 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
170 static extern IntPtr gst_buffer_append(IntPtr raw, IntPtr buf2);
172 public Gst.Buffer Append(Gst.Buffer buf2) {
174 IntPtr raw_ret = gst_buffer_append(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle);
175 Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
179 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
180 static extern void gst_buffer_append_memory(IntPtr raw, IntPtr mem);
182 public void AppendMemory(Gst.Memory mem) {
184 gst_buffer_append_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
187 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
188 static extern IntPtr gst_buffer_append_region(IntPtr raw, IntPtr buf2, IntPtr offset, IntPtr size);
190 public Gst.Buffer AppendRegion(Gst.Buffer buf2, long offset, long size) {
192 IntPtr raw_ret = gst_buffer_append_region(Handle, buf2 == null ? IntPtr.Zero : buf2.Handle, new IntPtr (offset), new IntPtr (size));
193 Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
197 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
198 static extern IntPtr gst_buffer_copy_deep(IntPtr raw);
200 public Gst.Buffer CopyDeep() {
201 IntPtr raw_ret = gst_buffer_copy_deep(Handle);
202 Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
206 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
207 static extern bool gst_buffer_copy_into(IntPtr raw, IntPtr src, int flags, UIntPtr offset, UIntPtr size);
209 public bool CopyInto(Gst.Buffer src, Gst.BufferCopyFlags flags, ulong offset, ulong size) {
210 bool raw_ret = gst_buffer_copy_into(Handle, src == null ? IntPtr.Zero : src.Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size));
215 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
216 static extern IntPtr gst_buffer_copy_region(IntPtr raw, int flags, UIntPtr offset, UIntPtr size);
218 public Gst.Buffer CopyRegion(Gst.BufferCopyFlags flags, ulong offset, ulong size) {
219 IntPtr raw_ret = gst_buffer_copy_region(Handle, (int) flags, new UIntPtr (offset), new UIntPtr (size));
220 Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
224 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
225 static extern UIntPtr gst_buffer_fill(IntPtr raw, UIntPtr offset, byte[] src, UIntPtr n_length);
227 public ulong Fill(ulong offset, byte[] src) {
228 UIntPtr raw_ret = gst_buffer_fill(Handle, new UIntPtr (offset), src, new UIntPtr ((ulong) (src == null ? 0 : src.Length)));
229 ulong ret = (ulong) raw_ret;
233 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234 static extern bool gst_buffer_find_memory(IntPtr raw, UIntPtr offset, UIntPtr size, out uint idx, out uint length, out UIntPtr skip);
236 public bool FindMemory(ulong offset, ulong size, out uint idx, out uint length, out ulong skip) {
238 bool raw_ret = gst_buffer_find_memory(Handle, new UIntPtr (offset), new UIntPtr (size), out idx, out length, out native_skip);
240 skip = (ulong) native_skip;
244 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
245 static extern IntPtr gst_buffer_get_all_memory(IntPtr raw);
247 public Gst.Memory AllMemory {
249 IntPtr raw_ret = gst_buffer_get_all_memory(Handle);
250 Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
255 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
256 static extern IntPtr gst_buffer_get_custom_meta(IntPtr raw, IntPtr name);
258 public Gst.CustomMeta GetCustomMeta(string name) {
259 IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
260 IntPtr raw_ret = gst_buffer_get_custom_meta(Handle, native_name);
261 Gst.CustomMeta ret = Gst.CustomMeta.New (raw_ret);
262 GLib.Marshaller.Free (native_name);
266 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
267 static extern int gst_buffer_get_flags(IntPtr raw);
269 public Gst.BufferFlags Flags {
271 int raw_ret = gst_buffer_get_flags(Handle);
272 Gst.BufferFlags ret = (Gst.BufferFlags) raw_ret;
277 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
278 static extern IntPtr gst_buffer_get_memory(IntPtr raw, uint idx);
280 public Gst.Memory GetMemory(uint idx) {
281 IntPtr raw_ret = gst_buffer_get_memory(Handle, idx);
282 Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
286 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
287 static extern IntPtr gst_buffer_get_memory_range(IntPtr raw, uint idx, int length);
289 public Gst.Memory GetMemoryRange(uint idx, int length) {
290 IntPtr raw_ret = gst_buffer_get_memory_range(Handle, idx, length);
291 Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), true);
295 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
296 static extern IntPtr gst_buffer_get_meta(IntPtr raw, IntPtr api);
298 public Gst.Meta GetMeta(GLib.GType api) {
299 IntPtr raw_ret = gst_buffer_get_meta(Handle, api.Val);
300 Gst.Meta ret = Gst.Meta.New (raw_ret);
304 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
305 static extern uint gst_buffer_get_n_meta(IntPtr raw, IntPtr api_type);
307 public uint GetNMeta(GLib.GType api_type) {
308 uint raw_ret = gst_buffer_get_n_meta(Handle, api_type.Val);
313 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
314 static extern IntPtr gst_buffer_get_reference_timestamp_meta(IntPtr raw, IntPtr reference);
316 public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta(Gst.Caps reference) {
317 IntPtr raw_ret = gst_buffer_get_reference_timestamp_meta(Handle, reference == null ? IntPtr.Zero : reference.Handle);
318 Gst.ReferenceTimestampMeta ret = Gst.ReferenceTimestampMeta.New (raw_ret);
322 public Gst.ReferenceTimestampMeta GetReferenceTimestampMeta() {
323 return GetReferenceTimestampMeta (null);
326 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
327 static extern UIntPtr gst_buffer_get_size(IntPtr raw);
331 UIntPtr raw_ret = gst_buffer_get_size(Handle);
332 ulong ret = (ulong) raw_ret;
337 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
338 static extern UIntPtr gst_buffer_get_sizes(IntPtr raw, out UIntPtr offset, out UIntPtr maxsize);
340 public ulong GetSizes(out ulong offset, out ulong maxsize) {
341 UIntPtr native_offset;
342 UIntPtr native_maxsize;
343 UIntPtr raw_ret = gst_buffer_get_sizes(Handle, out native_offset, out native_maxsize);
344 ulong ret = (ulong) raw_ret;
345 offset = (ulong) native_offset;
346 maxsize = (ulong) native_maxsize;
350 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
351 static extern UIntPtr gst_buffer_get_sizes_range(IntPtr raw, uint idx, int length, out UIntPtr offset, out UIntPtr maxsize);
353 public ulong GetSizesRange(uint idx, int length, out ulong offset, out ulong maxsize) {
354 UIntPtr native_offset;
355 UIntPtr native_maxsize;
356 UIntPtr raw_ret = gst_buffer_get_sizes_range(Handle, idx, length, out native_offset, out native_maxsize);
357 ulong ret = (ulong) raw_ret;
358 offset = (ulong) native_offset;
359 maxsize = (ulong) native_maxsize;
363 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
364 static extern bool gst_buffer_has_flags(IntPtr raw, int flags);
366 public bool HasFlags(Gst.BufferFlags flags) {
367 bool raw_ret = gst_buffer_has_flags(Handle, (int) flags);
372 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
373 static extern void gst_buffer_insert_memory(IntPtr raw, int idx, IntPtr mem);
375 public void InsertMemory(int idx, Gst.Memory mem) {
377 gst_buffer_insert_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle);
380 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
381 static extern bool gst_buffer_is_all_memory_writable(IntPtr raw);
383 public bool IsAllMemoryWritable {
385 bool raw_ret = gst_buffer_is_all_memory_writable(Handle);
391 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
392 static extern bool gst_buffer_is_memory_range_writable(IntPtr raw, uint idx, int length);
394 public bool IsMemoryRangeWritable(uint idx, int length) {
395 bool raw_ret = gst_buffer_is_memory_range_writable(Handle, idx, length);
400 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
401 static extern bool gst_buffer_map(IntPtr raw, IntPtr info, int flags);
403 public bool Map(out Gst.MapInfo info, Gst.MapFlags flags) {
404 IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo)));
405 bool raw_ret = gst_buffer_map(Handle, native_info, (int) flags);
407 info = Gst.MapInfo.New (native_info);
408 Marshal.FreeHGlobal (native_info);
412 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
413 static extern bool gst_buffer_map_range(IntPtr raw, uint idx, int length, IntPtr info, int flags);
415 public bool MapRange(uint idx, int length, out Gst.MapInfo info, Gst.MapFlags flags) {
416 IntPtr native_info = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.MapInfo)));
417 bool raw_ret = gst_buffer_map_range(Handle, idx, length, native_info, (int) flags);
419 info = Gst.MapInfo.New (native_info);
420 Marshal.FreeHGlobal (native_info);
424 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
425 static extern int gst_buffer_memcmp(IntPtr raw, UIntPtr offset, byte[] mem, UIntPtr n_length);
427 public int Memcmp(ulong offset, byte[] mem) {
428 int raw_ret = gst_buffer_memcmp(Handle, new UIntPtr (offset), mem, new UIntPtr ((ulong) (mem == null ? 0 : mem.Length)));
433 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
434 static extern UIntPtr gst_buffer_memset(IntPtr raw, UIntPtr offset, byte val, UIntPtr size);
436 public ulong Memset(ulong offset, byte val, ulong size) {
437 UIntPtr raw_ret = gst_buffer_memset(Handle, new UIntPtr (offset), val, new UIntPtr (size));
438 ulong ret = (ulong) raw_ret;
442 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
443 static extern uint gst_buffer_n_memory(IntPtr raw);
445 public uint NMemory() {
446 uint raw_ret = gst_buffer_n_memory(Handle);
451 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
452 static extern IntPtr gst_buffer_peek_memory(IntPtr raw, uint idx);
454 public Gst.Memory PeekMemory(uint idx) {
455 IntPtr raw_ret = gst_buffer_peek_memory(Handle, idx);
456 Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Memory), false);
460 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
461 static extern void gst_buffer_prepend_memory(IntPtr raw, IntPtr mem);
463 public void PrependMemory(Gst.Memory mem) {
465 gst_buffer_prepend_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
468 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
469 static extern void gst_buffer_remove_all_memory(IntPtr raw);
471 public void RemoveAllMemory() {
472 gst_buffer_remove_all_memory(Handle);
475 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
476 static extern void gst_buffer_remove_memory(IntPtr raw, uint idx);
478 public void RemoveMemory(uint idx) {
479 gst_buffer_remove_memory(Handle, idx);
482 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
483 static extern void gst_buffer_remove_memory_range(IntPtr raw, uint idx, int length);
485 public void RemoveMemoryRange(uint idx, int length) {
486 gst_buffer_remove_memory_range(Handle, idx, length);
489 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
490 static extern bool gst_buffer_remove_meta(IntPtr raw, IntPtr meta);
492 public bool RemoveMeta(Gst.Meta meta) {
493 IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta);
494 bool raw_ret = gst_buffer_remove_meta(Handle, native_meta);
496 Marshal.FreeHGlobal (native_meta);
500 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
501 static extern void gst_buffer_replace_all_memory(IntPtr raw, IntPtr mem);
503 public void ReplaceAllMemory(Gst.Memory mem) {
505 gst_buffer_replace_all_memory(Handle, mem == null ? IntPtr.Zero : mem.Handle);
508 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
509 static extern void gst_buffer_replace_memory(IntPtr raw, uint idx, IntPtr mem);
511 public void ReplaceMemory(uint idx, Gst.Memory mem) {
513 gst_buffer_replace_memory(Handle, idx, mem == null ? IntPtr.Zero : mem.Handle);
516 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
517 static extern void gst_buffer_replace_memory_range(IntPtr raw, uint idx, int length, IntPtr mem);
519 public void ReplaceMemoryRange(uint idx, int length, Gst.Memory mem) {
521 gst_buffer_replace_memory_range(Handle, idx, length, mem == null ? IntPtr.Zero : mem.Handle);
524 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
525 static extern void gst_buffer_resize(IntPtr raw, IntPtr offset, IntPtr size);
527 public void Resize(long offset, long size) {
528 gst_buffer_resize(Handle, new IntPtr (offset), new IntPtr (size));
531 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
532 static extern bool gst_buffer_resize_range(IntPtr raw, uint idx, int length, IntPtr offset, IntPtr size);
534 public bool ResizeRange(uint idx, int length, long offset, long size) {
535 bool raw_ret = gst_buffer_resize_range(Handle, idx, length, new IntPtr (offset), new IntPtr (size));
540 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
541 static extern bool gst_buffer_set_flags(IntPtr raw, int flags);
543 public bool SetFlags(Gst.BufferFlags flags) {
544 bool raw_ret = gst_buffer_set_flags(Handle, (int) flags);
549 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
550 static extern void gst_buffer_set_size(IntPtr raw, IntPtr size);
552 public void SetSize(long size) {
553 gst_buffer_set_size(Handle, new IntPtr (size));
556 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
557 static extern void gst_buffer_unmap(IntPtr raw, IntPtr info);
559 public void Unmap(Gst.MapInfo info) {
560 IntPtr native_info = GLib.Marshaller.StructureToPtrAlloc (info);
561 gst_buffer_unmap(Handle, native_info);
562 Marshal.FreeHGlobal (native_info);
565 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
566 static extern bool gst_buffer_unset_flags(IntPtr raw, int flags);
568 public bool UnsetFlags(Gst.BufferFlags flags) {
569 bool raw_ret = gst_buffer_unset_flags(Handle, (int) flags);
574 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
575 static extern uint gst_buffer_get_max_memory();
577 public static uint MaxMemory {
579 uint raw_ret = gst_buffer_get_max_memory();
585 public Buffer(IntPtr raw) : base(raw) {}
587 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
588 static extern IntPtr gst_buffer_new();
592 Raw = gst_buffer_new();
595 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
596 static extern IntPtr gst_buffer_new_allocate(IntPtr allocator, UIntPtr size, IntPtr parms);
598 public Buffer (Gst.Allocator allocator, ulong size, Gst.AllocationParams parms)
600 IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms);
601 Raw = gst_buffer_new_allocate(allocator == null ? IntPtr.Zero : allocator.Handle, new UIntPtr (size), native_parms);
602 Marshal.FreeHGlobal (native_parms);
605 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
606 static extern IntPtr gst_buffer_new_wrapped_bytes(IntPtr bytes);
608 public Buffer (GLib.Bytes bytes)
610 Raw = gst_buffer_new_wrapped_bytes(bytes == null ? IntPtr.Zero : bytes.Handle);
613 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
614 static extern IntPtr gst_buffer_new_wrapped_full(int flags, byte[] data, UIntPtr maxsize, UIntPtr offset, UIntPtr size, IntPtr user_data, GLib.DestroyNotify notify);
616 public Buffer (Gst.MemoryFlags flags, byte[] data, ulong maxsize, ulong offset, ulong size, IntPtr user_data, GLib.DestroyNotify notify)
618 Raw = gst_buffer_new_wrapped_full((int) flags, data, new UIntPtr (maxsize), new UIntPtr (offset), new UIntPtr (size), user_data, notify);
621 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
622 static extern IntPtr gst_buffer_ref(IntPtr raw);
624 protected override void Ref (IntPtr raw)
627 gst_buffer_ref (raw);
632 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
633 static extern void gst_buffer_unref(IntPtr raw);
635 protected override void Unref (IntPtr raw)
638 gst_buffer_unref (raw);
643 protected override Action<IntPtr> DisposeUnmanagedFunc {
645 return gst_buffer_unref;
650 // Internal representation of the wrapped structure ABI.
651 static GLib.AbiStruct _abi_info = null;
652 static public new GLib.AbiStruct abi_info {
654 if (_abi_info == null)
655 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
656 new GLib.AbiField("pool"
657 , Gst.MiniObject.abi_info.Fields
658 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pool
661 , (uint) Marshal.SizeOf(typeof(IntPtr))
664 new GLib.AbiField("pts"
666 , (uint) Marshal.SizeOf(typeof(ulong)) // pts
669 , (long) Marshal.OffsetOf(typeof(GstBuffer_ptsAlign), "pts")
672 new GLib.AbiField("dts"
674 , (uint) Marshal.SizeOf(typeof(ulong)) // dts
677 , (long) Marshal.OffsetOf(typeof(GstBuffer_dtsAlign), "dts")
680 new GLib.AbiField("duration"
682 , (uint) Marshal.SizeOf(typeof(ulong)) // duration
685 , (long) Marshal.OffsetOf(typeof(GstBuffer_durationAlign), "duration")
688 new GLib.AbiField("offset"
690 , (uint) Marshal.SizeOf(typeof(ulong)) // offset
693 , (long) Marshal.OffsetOf(typeof(GstBuffer_offsetAlign), "offset")
696 new GLib.AbiField("offset_end"
698 , (uint) Marshal.SizeOf(typeof(ulong)) // offset_end
701 , (long) Marshal.OffsetOf(typeof(GstBuffer_offset_endAlign), "offset_end")
710 [StructLayout(LayoutKind.Sequential)]
711 public struct GstBuffer_ptsAlign
717 [StructLayout(LayoutKind.Sequential)]
718 public struct GstBuffer_dtsAlign
724 [StructLayout(LayoutKind.Sequential)]
725 public struct GstBuffer_durationAlign
728 private ulong duration;
731 [StructLayout(LayoutKind.Sequential)]
732 public struct GstBuffer_offsetAlign
735 private ulong offset;
738 [StructLayout(LayoutKind.Sequential)]
739 public struct GstBuffer_offset_endAlign
742 private ulong offset_end;
746 // End of the ABI representation.