Track_Number of container formats like wma,asf, ogg
kcu
karthikuppund1 at gmail.com
Tue Jun 23 21:33:49 PDT 2015
I used gst-discoverer-0.10 in terminal to check the tags, it showed like
this,
gst-discoverer-0.10 BOMBAY\ AWAKENS.wma
Analyzing file:///home/kcu/BOMBAY%20AWAKENS.wma
Done discovering file:///home/kcu/BOMBAY%20AWAKENS.wma
Topology:
container: Advanced Streaming Format (ASF)
audio: Windows Media Audio 8
Properties:
Duration: 0:02:18.541000000
Seekable: yes
Tags:
title: BOMBAY AWAKENS
artist: { "AR\ REHMAN", "A.R.\ Rahman" }
date: 2002-01-01
album: BOMBAY DREAMS
track number: 1
container format: ASF
audio codec: WMA Version 8
so i guess track no is present in tags. Hence I used discoverer, and
modified my code as below,
GstDiscoverer *disc = NULL;
GstDiscovererInfo *info = NULL;
GstDiscovererStreamInfo *sinfo = NULL;
GError *err = NULL;
gchar file[200] = "file:///home/kcu/";
GstTagList *tglst = NULL;
guint tno = 0;
GstDiscovererResult result = 0;
disc = gst_discoverer_new(3*GST_SECOND,&err);
if(!disc)
{
printf("\nDiscoverer creation failed");
printf("\nMessage : %s \n",err->message);
}
strcat(file,gData->currentPlayParams.playparam.FileSystem.filename);
info = gst_discoverer_discover_uri(disc,file, &err);
result = gst_discoverer_info_get_result(info);
if(result == GST_DISCOVERER_OK)
printf("Discoverer OK\n");
else if(result == GST_DISCOVERER_ERROR)
printf("Error, Message:%s\n",err->message);
else if(result == GST_DISCOVERER_TIMEOUT)
printf("Time out\n");
sinfo = gst_discoverer_info_get_stream_info(info);
if(sinfo != NULL) printf("\nsinfo not null\n");
tglst = (GstTagList *) gst_discoverer_stream_info_get_tags(sinfo);
if(tglst != NULL)
{
printf("\ntaglist is not null\n");
if(gst_tag_list_get_uint(tglst, /*GST_TAG_TRACK_NUMBER*/"track-number",
&tno))
printf("\n T.No: %u\n",tno);
}
else printf("\n tag is null\n");
but i am always getting tag is null, am i doing something wrong?
I have attached the file for your reference
BOMBAY_AWAKENS.wma
<http://gstreamer-devel.966125.n4.nabble.com/file/n4672429/BOMBAY_AWAKENS.wma>
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Track-Number-of-container-formats-like-wma-asf-ogg-tp4672414p4672429.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list