summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2009-12-05 20:30:55 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-12-10 10:44:36 +0100
commit8046a36bb47b415f8fa3fd8402abd35c8274e1f2 (patch)
tree5f05b7bbe3dd259fb209f68594def97f504e40f8
parent373f37169dfbe3ead39c026da35a0a62b724a61f (diff)
Restore the simple Message.ParseTag overload
In daa62493 the Message.ParseTag(out Pad pad, out TagList tags) method is added and the old one removed, but they can coexist peacefully.
-rw-r--r--gstreamer-sharp/Message.custom16
-rw-r--r--samples/MetaData.cs3
2 files changed, 17 insertions, 2 deletions
diff --git a/gstreamer-sharp/Message.custom b/gstreamer-sharp/Message.custom
index 1cef4ea..893c074 100644
--- a/gstreamer-sharp/Message.custom
+++ b/gstreamer-sharp/Message.custom
@@ -579,6 +579,22 @@ public static Message NewTag (Gst.Object src, Gst.Pad pad, TagList tags) {
return msg;
}
+[DllImport("libgstreamer-0.10.dll") ]
+static extern void gst_message_parse_tag (IntPtr msg, out IntPtr tags);
+
+public void ParseTag (out TagList tags) {
+ if (Type != MessageType.Tag)
+ throw new ArgumentException ();
+
+ IntPtr raw_ptr;
+
+ gst_message_parse_tag (Handle, out raw_ptr);
+ if (raw_ptr == IntPtr.Zero)
+ tags = null;
+ else
+ tags = (TagList) Gst.GLib.Opaque.GetOpaque (raw_ptr, typeof (TagList), true);
+}
+
[DllImport ("libgstreamer-0.10.dll") ]
static extern void gst_message_parse_tag_full (IntPtr msg, out IntPtr pad, out IntPtr tags);
diff --git a/samples/MetaData.cs b/samples/MetaData.cs
index 1bfdaf2..4c92029 100644
--- a/samples/MetaData.cs
+++ b/samples/MetaData.cs
@@ -55,10 +55,9 @@ public class MetaData {
return true;
case MessageType.Tag:
- Pad pad;
TagList new_tags;
- message.ParseTag (out pad, out new_tags);
+ message.ParseTag (out new_tags);
if (tags != null) {
tags = tags.Merge (new_tags, TagMergeMode.KeepAll);