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.
This commit is contained in:
Maarten Bosmans 2009-12-05 20:30:55 +01:00 committed by Sebastian Dröge
parent 373f37169d
commit 8046a36bb4
2 changed files with 17 additions and 2 deletions

View file

@ -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);

View file

@ -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);