Track_Number of container formats like wma,asf, ogg

yannick inizan inizan.yannick at gmail.com
Tue Jun 23 05:07:42 PDT 2015


here an sample in Vala :

public static void main (string[] args) {
Gst.init (ref args);
var pb = Gst.ElementFactory.make ("playbin", "playbin");
pb["uri"] = "file:///home/yannick/Musique/test.wma";
pb.bus.add_watch (0, (bus, message) => {
switch (message.type) {
case Gst.MessageType.TAG:
Gst.TagList list;
message.parse_tag (out list);
uint track;
list.get_uint ("track-number", out track);
print (@"$track\n");
break;
}
return true;
});
pb.set_state (Gst.State.PLAYING);
new MainLoop().run();
}

I found TAG type twice. first message with 7 as track number and 0 in
second message. may be you could save a static tag list and save tag only
if his value changed

2015-06-23 13:28 GMT+02:00 kcu <karthikuppund1 at gmail.com>:

> Hi,
>
> I am trying to develop a gstreamer based media player, To print track
> number
> i am doing this
> BOMBAY_AWAKENS.wma
> <
> http://gstreamer-devel.966125.n4.nabble.com/file/n4672414/BOMBAY_AWAKENS.wma
> >
> if(!gst_tag_list_get_uint(tagList, GST_TAG_TRACK_NUMBER,
>                     &TrackNumber))
>         {
>             TrackNumber = 0;
>         }
>
> It works fine for mp3 and aac, only for wma,asf & ogg files track number is
> always 0,( tried with different files, gst_tag_list_get_uint is returning
> false )
>
> what might be wrong?
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Track-Number-of-container-formats-like-wma-asf-ogg-tp4672414.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150623/f0bcd600/attachment.html>


More information about the gstreamer-devel mailing list