mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
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:
parent
373f37169d
commit
8046a36bb4
2 changed files with 17 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue