Hi,
    I am trying to implement a Radio application in Android. The
native MediaPlayer class takes only http/rtsp or file (as far as i
know) as it's source. And my urls actually send data in ICY protocols
thus the native player can not stream from these urls.
So what I do is make a proxy server on localhost which takes the url
and forwards the whole stream after removing the ICY headers and
adding the basic http headers like
"status, date, content-type, content-length and connection"
to the the native media player. I have also
setAudioStreamType(AudioManager.STREAM_MUSIC). But the player gives an
error And here the snippet of the error log -

05-20 14:41:35.594: ERROR/PlayerDriver(51): Command PLAYER_INIT
completed with an error or info PVMFFailure

05-20 14:41:35.594: ERROR/MediaPlayer(8828): error (1, -1)

05-20 14:41:35.594: WARN/System.err(8828): java.io.IOException:
Prepare failed.: status=0x1



05-20 14:41:35.724: WARN/System.err(8828):     at
android.media.MediaPlayer.prepare(Native Method)
05-20 14:41:35.724: WARN/System.err(8828):     at
com.wirkle.explore_Radio.My_Radio2.onCreate(My_Radio2.java:38)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2364)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.os.Handler.dispatchMessage(Handler.java:99)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.os.Looper.loop(Looper.java:123)
05-20 14:41:35.734: WARN/System.err(8828):     at
android.app.ActivityThread.main(ActivityThread.java:4203)
05-20 14:41:35.744: WARN/System.err(8828):     at
java.lang.reflect.Method.invokeNative(Native Method)
05-20 14:41:35.744: WARN/System.err(8828):     at
java.lang.reflect.Method.invoke(Method.java:521)
05-20 14:41:35.744: WARN/System.err(8828):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
05-20 14:41:35.744: WARN/System.err(8828):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
05-20 14:41:35.744: WARN/System.err(8828):     at
dalvik.system.NativeStart.main(Native Method)

And yes I have also written the data part of the stream into a file
and set that file as dataSource() for the media player and the file
works i.e the media player plays the file
(audio/mpeg codec - mp3 format).
Why and what is happening. And how to resolve this.
Also if some one knows any way one can set our own made buffer in
setdataSource() for the media player.
Also if anyone knows how to work with setDataSource(FileDesciptor )
that is with FileDesciptor itself.
Please Help!!!!!
And Thanks in Advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to