<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 04/24/2012 11:18 AM, Sree Gowri wrote:
<blockquote
cite="mid:CAHHUHfFK5D2NsYqu-uM-iopi9ROx6haHi9Nd=uc0GX3Fxi3H8A@mail.gmail.com"
type="cite">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Apr 16, 2012 at 12:53 AM,
Stefan Sauer <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div> On 04/12/2012 06:23 AM, Sree Gowri wrote:
<blockquote type="cite"><font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">Hi,<br>
<br>
I am trying to extract audio metadata like
streamurl,streamtitle,artist,genre,album.However I
am not able to extract the metadata using
GstTagList. Below is the snippet of the code. Does
anyone suggest what are the additions to be done in
order to extract the metadata?<br>
<br>
Only the following data has been extracted.<br>
layer: 3<br>
mode: joint<br>
emphasis: none<br>
audio codec: MPEG-1 layer 3<br>
bitrate: 128000<br>
<br>
Pipeline is as follows:<br>
<br>
[code]<br>
app->pipeline= gst_parse_launch("appsrc
name=mysource ! audio/mpeg ! mad ! alsasink",
NULL);<br>
[/code]<br>
</font></blockquote>
</div>
<font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">"appsrc
name=mysource ! audio/mpeg ! </font>mp3parse <font
face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">! mad !
alsasink"<br>
or even better<br>
</font><font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif">"appsrc
name=mysource ! audio/mpeg ! decodebin2</font><font
face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif"> ! alsasink"</font><br>
<br>
Stefan<br>
<br>
<blockquote type="cite">
<div>
<div><font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif"><br>
Audio data fed to the appsrc element<br>
<br>
[code]<br>
buf =( GstBuffer *) gst_app_buffer_new (data,
READBUF, g_free, data);<br>
g_signal_emit_by_name (GST_APP_SRC
(app->appsrc), "push-buffer", buf, &ret);<br>
[/code]<br>
<br>
Bus message<br>
<br>
[code]<br>
case GST_MESSAGE_TAG:<br>
{<br>
GstTagList *tags = NULL;<br>
char *artist;<br>
gst_message_parse_tag (message,
&tags);<br>
g_print ("Got tags from element %s:\n",
GST_OBJECT_NAME (message->src));<br>
if (gst_tag_list_get_string (tags,
GST_TAG_ARTIST, &artist))<br>
{<br>
printf("got artist: %s\n",artist);<br>
}<br>
else<br>
{<br>
printf("no artist!! \n");<br>
}<br>
gst_tag_list_foreach (tags, print_tag,
NULL);<br>
g_print ("\n");<br>
gst_tag_list_free (tags);<br>
break;<br>
[/code]<br>
<br>
print_tag function code<br>
[code]<br>
static void print_tag (const GstTagList * list,
const gchar * tag, gpointer unused)<br>
{<br>
gint i, count;<br>
count = gst_tag_list_get_tag_size (list, tag);<br>
for (i = 0; i < count; i++) {<br>
gchar *str;<br>
if (gst_tag_get_type (tag) == G_TYPE_STRING) {<br>
if (!gst_tag_list_get_string_index (list,
tag, i, &str))<br>
g_assert_not_reached ();<br>
<br>
} else {<br>
str =<br>
g_strdup_value_contents
(gst_tag_list_get_value_index (list, tag, i));<br>
}<br>
if (i == 0) {<br>
g_print (" %15s: %s\n", gst_tag_get_nick
(tag), str);<br>
} else {<br>
g_print (" : %s\n", str);<br>
}<br>
g_free (str); <br>
}<br>
}<br>
[/code]<br>
<br>
Thanks and Regards,<br>
Sree Gowri<br>
</font></div>
</div>
</blockquote>
</div>
</blockquote>
<div> Hi stephan,<br>
<br>
First would like to thank you for the input you
provided.<br>
<br>
I tried both the pipelines that you have
mentioned,however meta data has not been extracted.<br>
<br>
Kindly request you to let me know if there are any
other changes that needs to be done.<br>
</div>
</div>
</div>
</blockquote>
<br>
Are you sure the stream you are looking at is tagged with such
metadata? Try gst-launch-0.10 -t playbin2 uri=...<br>
<br>
Stefan<br>
<br>
<blockquote
cite="mid:CAHHUHfFK5D2NsYqu-uM-iopi9ROx6haHi9Nd=uc0GX3Fxi3H8A@mail.gmail.com"
type="cite">
<div class="gmail_extra">
<div class="gmail_quote">
<div> <br>
Regards,<br>
Sree Gowri<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<blockquote type="cite">
<div>
<div><font face="Default Sans
Serif,Verdana,Arial,Helvetica,sans-serif"> </font>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a moz-do-not-send="true" href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a moz-do-not-send="true" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.freedesktop.org"
target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>