<p dir="ltr">Rewriting everything is not necessary. I have a working solution for metadata extraction, that still relies on MediaPlayer, I can license it for a fair price.</p>
<p dir="ltr">I am using it here: <a href="http://radiofonia.net/android">http://radiofonia.net/android</a></p>
<p dir="ltr">Marcin</p>
<div class="gmail_quote">20 cze 2014 06:59 &quot;John Selbie&quot; &lt;<a href="mailto:jselbie@hotmail.com">jselbie@hotmail.com</a>&gt; napisaÅ‚(a):<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Greetings,<div><br></div><div>tl;dr - I&#39;m looking for sources to an Android Icecast client written in Java.<br><div><br></div><div>long summary:</div><div><br></div><div>I maintain an open source Android app (WREK Online) that plays the live mp3 stream from the station&#39;s Icecast server.</div>
<div><br></div><div>Using the built in MediaPlayer class that is part of the Android SDK works OK. As a developer, I just give it the streaming URL of the Icecast server, hook up a few callbacks, and it plays just fine. Â But this class has its limitations and a few bugs.</div>
<div><br></div><div><span style="font-size:12pt">The biggest limitation of Android&#39;s MediaPlayer class is that it can&#39;t pull down the metadata from the Icecast server. It doesn&#39;t pass allow an option for the developer to pass up an Ice-MetaData header for the specified URL. And even if you could, it likely wouldn&#39;t be able to parse out the inline metadata within the returned HTTP byte stream (as indicated by the presence of an icy-metaint header).</span></div>
<div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">So therefore, my app can&#39;t show the current artist and song title on the screen very easily. An alternative option is to continuously make an http polling request for the &quot;status.xsl&quot; page on the server and parse this information out. But polling isn&#39;t an ideal solution.</span></div>
<div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">I am considering going full on an writing my own replacement for MediaPlayer. This would mean handling my own HTTP streaming, my own MP3 frame parser, Â additional code to extract out the metadata from the stream bytes, calling into Android&#39;s MediaCodec APIs to convert to PCM, and ultimately into an AudioTrack instance. All of which I am comfortable doing. However, this will likely take me a better part of a week to get working with lots of testing and bug fixing.</span></div>
<div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">Is there an open-source solution I could potentially leverage? I know there are few Linux projects written in C/C++ that have been ported to the Android NDK, but I&#39;d prefer an Android Java solution. Â I&#39;ve Google&#39;d around, but couldn&#39;t find anything definitive.</span></div>
<div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">Suggestions?</span></div><div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">Thanks,</span></div><div><span style="font-size:12pt">jSelbie</span></div>
<div><span style="font-size:12pt"><br></span></div><div><br></div><div><br></div></div>                                               </div></div>
<br>_______________________________________________<br>
Icecast-dev mailing list<br>
<a href="mailto:Icecast-dev@xiph.org">Icecast-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/icecast-dev" target="_blank">http://lists.xiph.org/mailman/listinfo/icecast-dev</a><br>
<br></blockquote></div>