Not able to play video from the network URL

by Amit Panwar » Tue, 28 Apr 2009 10:53:16 GMT


Sponsored Links
 i,

I am trying to play a 3gp video from the network URL but it doesn't
play and throws the following exception:

04-28 16:17:13.973: ERROR/VideoPlayer(821): error: Prepare failed.:
status=0xFFFFFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821): java.io.IOException:
Prepare failed.: status=0xFFFFFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.media.MediaPlayer.prepare(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming.playVideo
(VideoStreaming.java:232)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming.access$0
(VideoStreaming.java:197)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.sape.android.activities.VideoStreaming$1.onClick
(VideoStreaming.java:117)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.performClick(View.java:2129)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.onTouchEvent(View.java:3543)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.View.dispatchTouchEvent(View.java:3198)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1089)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.app.Activity.dispatchTouchEvent(Activity.java:1871)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.os.Handler.dispatchMessage(Handler.java:88)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.os.Looper.loop(Looper.java:123)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
android.app.ActivityThread.main(ActivityThread.java:3739)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
java.lang.reflect.Method.invokeNative(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
java.lang.reflect.Method.invoke(Method.java:515)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
04-28 16:17:13.973: ERROR/VideoPlayer(821): at
dalvik.system.NativeStart.main(Native Method)
04-28 16:17:14.003: ERROR/MediaPlayer(821): stop called in state 0

The code I am trying is :

path = "http://d.peperonity.com/c/d/4E76D7/12563/
ssc3/home/062/akram.ak47/albums/dog_smoke.3gp";
//path = setNewFile(path );
//path = "/data/data/com.example.android.apis/
files/mediaplayertmp.dat";
if (path == "") {
// Tell the user to provide a media file U



Not able to play video from the network URL

by Amit Panwar » Tue, 28 Apr 2009 18:58:44 GMT


 Hi,

I am not able to play the video streaming example from the samples
provided in Android SDK for any video URL:

ex: 
 http://d.peperonity.com/c/d/4E76D7/12563/ssc3/home/062/akram.ak47/albums/dog_smoke.3gp 

The issue comes at the time of executing the prepare() method:

and throws the following exeption:


04-28 16:17:13.973: ERROR/VideoPlayer(821): error: Prepare failed.:
status=0xFFFFFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821): java.io.IOException:
Prepare failed.: status=0xFFFFFFF6
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.media.MediaPlayer.prepare(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.sape.android.activities.VideoStreaming.playVideo
(VideoStreaming.java:232)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.sape.android.activities.VideoStreaming.access$0
(VideoStreaming.java:197)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.sape.android.activities.VideoStreaming$1.onClick
(VideoStreaming.java:117)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.View.performClick(View.java:2129)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.View.onTouchEvent(View.java:3543)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.View.dispatchTouchEvent(View.java:3198)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1593)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1089)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.app.Activity.dispatchTouchEvent(Activity.java:1871)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1577)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1140)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.os.Handler.dispatchMessage(Handler.java:88)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.os.Looper.loop(Looper.java:123)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
android.app.ActivityThread.main(ActivityThread.java:3739)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
java.lang.reflect.Method.invoke(Method.java:515)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
04-28 16:17:13.973: ERROR/VideoPlayer(821):     at
dalvik.system.NativeStart.main(Native Method)


Please help me to resolve the issue. If someone else has the same with
it.

Thanks,
Amit
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. When do I need a new Activity?

Hello, this is as beginner as it gets.

I'm creating an app that is basically a series of forms that collect
info from the user, and then display that info to the user as well as
allow them to modify it... very simple, almost no logic.

I have been reading about activities, but in my test, I noticed I can
easily change what appears on the screen when my app is running simply
by using setContentView method and passing it a reference to another
layout xml resource.

It feels "wrong" but seems to work, so I am wondering what problems
might arise from my approach.

When exactly should an app have multiple activities? When not?

Any input greatly appreciated.

--~--~---------~--~----~------------~-------~--~----~

2. Android presentation backgrounds

Hey there,

I've just completed a week of work at my company, investigating
android, and obviously spent time developing applications and playing
with the API.
However I know have to give a presentation about my findings (mostly
good by the way), and I wanted some background pictures for my
presentation that are android themed.  Surely someone here has had to
do something like this and either has some lying around, or knows of a
website that has some CC or freely licensed background pictures.

Cheers

Michael Brunton-Spall

--~--~---------~--~----~------------~-------~--~----~

3. Fwd: Emualator fails at Boot up

4. surffaceHolder.lockCanvas(dirtyRect) help?

5. Is there any interface for setting Z order of View

6. Android Layout Tricks #1 problem

7. Reusing HttpUrlConnection fails with GZIPInputStream?