Track_Number of container formats like wma,asf, ogg

kcu karthikuppund1 at
Tue Jun 23 21:33:49 PDT 2015

I used gst-discoverer-0.10 in terminal to check the tags, it showed like

gst-discoverer-0.10 BOMBAY\ AWAKENS.wma 
Analyzing file:///home/kcu/BOMBAY%20AWAKENS.wma
Done discovering file:///home/kcu/BOMBAY%20AWAKENS.wma

  container: Advanced Streaming Format (ASF)
    audio: Windows Media Audio 8

  Duration: 0:02:18.541000000
  Seekable: yes
      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);
        printf("\nDiscoverer creation failed");
        printf("\nMessage : %s \n",err->message);
    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",
           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

View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list