summaryrefslogtreecommitdiff
path: root/sources/generated/Gst/Buffer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'sources/generated/Gst/Buffer.cs')
-rw-r--r--sources/generated/Gst/Buffer.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/sources/generated/Gst/Buffer.cs b/sources/generated/Gst/Buffer.cs
index cc3e305..b795d55 100644
--- a/sources/generated/Gst/Buffer.cs
+++ b/sources/generated/Gst/Buffer.cs
@@ -596,6 +596,51 @@ namespace Gst {
Raw = gst_buffer_new_wrapped_full((int) flags, data, new UIntPtr (maxsize), new UIntPtr (offset), new UIntPtr (size), user_data, notify);
}
+ [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern IntPtr gst_buffer_ref(IntPtr raw);
+
+ protected override void Ref (IntPtr raw)
+ {
+ if (!Owned) {
+ gst_buffer_ref (raw);
+ Owned = true;
+ }
+ }
+
+ [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern void gst_buffer_unref(IntPtr raw);
+
+ protected override void Unref (IntPtr raw)
+ {
+ if (Owned) {
+ gst_buffer_unref (raw);
+ Owned = false;
+ }
+ }
+
+ class FinalizerInfo {
+ IntPtr handle;
+
+ public FinalizerInfo (IntPtr handle)
+ {
+ this.handle = handle;
+ }
+
+ public bool Handler ()
+ {
+ gst_buffer_unref (handle);
+ return false;
+ }
+ }
+
+ ~Buffer ()
+ {
+ 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;