From 7fb126bfd17d26d5da8bebedd1d329e2f31de791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 19 Apr 2009 18:29:19 +0200 Subject: [PATCH] Fix some more structure ownerships --- gstreamer-sharp/Gstreamer.metadata | 2 +- gstreamer-sharp/Message.custom | 12 ++++++++++++ gstreamer-sharp/Structure.custom | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 724b3e7696..f92421806c 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata @@ -228,11 +228,11 @@ 1 1 1 + 1 1 1 1 1 - uint diff --git a/gstreamer-sharp/Message.custom b/gstreamer-sharp/Message.custom index 953a87feb1..53a7331c02 100644 --- a/gstreamer-sharp/Message.custom +++ b/gstreamer-sharp/Message.custom @@ -66,6 +66,18 @@ public uint Seqnum { } } + +[DllImport ("gstreamer-0.10.dll") ] +static extern IntPtr gst_message_get_structure (IntPtr raw); + +public Gst.Structure Structure { + get { + IntPtr raw_ret = gst_structure_copy (gst_message_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-0.10.dll") ] static extern IntPtr gst_message_new_eos (IntPtr src); diff --git a/gstreamer-sharp/Structure.custom b/gstreamer-sharp/Structure.custom index 96fe7b6dcb..a773b304ab 100644 --- a/gstreamer-sharp/Structure.custom +++ b/gstreamer-sharp/Structure.custom @@ -199,7 +199,7 @@ public IEnumerable Fields { public static Structure NewFromString (string structure) { IntPtr raw_ret = gst_structure_from_string (structure, IntPtr.Zero); - Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true); return ret; }