MediaPlayer stops playing when streaming over 3G on the Nexus One

by henrik » Fri, 23 Apr 2010 16:02:36 GMT


Sponsored Links
 Hi.

I am maintaining a streaming music player, and I'm running into a
similar problem as  
 http://www.last.fm/group/Last.fm +Android/forum/114391/_/593575

My player stop after roughly 1-2 minutes, and there are no log
messages except for "I/AudioHardwareQSD( 52): AudioHardware pcm
playback is going to standby" just after the playback stops.

This happens when I run it on the Nexus One over 3G.  It does not
happen over Wifi, and it does not happen on my HTC Hero with android
1.5 over 3G.

Do you guys have any hints on how to debug this? Is it e.g. possible
to monitor the memory available to the media player object?

All help is appreciated :)

Best regards,
Henrik

--



Other Threads

1. Trying to understanding Gallery fling source code

I am trying to understand how Gallery implements it fling behaviour.
I appreciate if someone can help me understand
1. why it needs special handing for ACTION_UP and ACTION_CANCEL?
2. why it does not check the retValue before calling UP/CANCEL's handling?
3. what does onUp() trying to do? Why it needs to send out Unpress event?


 @Override
    public boolean onTouchEvent(MotionEvent event) {

        // Give everything to the gesture detector
        boolean retValue = mGestureDetector.onTouchEvent(event);

        int action = event.getAction();
        if (action == MotionEvent.ACTION_UP) {
            // Helper method for lifted finger
            onUp();
        } else if (action == MotionEvent.ACTION_CANCEL) {
            onCancel();
        }

        return retValue;
    }


 /**
     * Called when a touch event's action is MotionEvent.ACTION_UP.
     */
    void onUp() {

        if (mFlingRunnable.mScroller.isFinished()) {
            scrollIntoSlots();
        }

        dispatchUnpress();
    }

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

2. no sound of my media player

there is no sound of my media player although it can successfully play video. 
And I guess it is something wrong with alsa  or some lower level lib, because 
my app can successfully run on emulator.
HERE IS THE CATLOG:
.I/ActivityManager(  451): Starting activity: Intent { 
comp={com.android.mediaplayer/com.android.mediaplayer.MediaPlayerDemo}
V/ActivityThread( 2618): Resuming ActivityRecord{4370ab48 
token=android.os.binderpr...@4370a600 {com.android.mediaplayer/come
D/MediaPlayerDemo( 2618): surfaceCreated called
V/MediaPlayerDemo( 2618): android.content.res.assetfiledescrip...@43710b80
W/PlayerDriver(  424): Using generic video MIO
V/VideoMIO(  424): CloseFrameBuf
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): setParametersSync
D/MediaPlayerDemo( 2618): mMediaPlayer.start() called
D/MediaPlayerDemo( 2618): surfaceChanged called
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): iVideoWidth=176
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): iVideoHeight=144
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): iVideoDisplayWidth=176
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): iVideoDisplayHeight=144
V/VideoMIO(  424): setParametersSync
V/VideoMIO(  424): VIDEO SUBFORMAT SET TO X-YUV-420-PLANAR
V/VideoMIO(  424): CloseFrameBuf
V/VideoMIO(  424): using software codec
V/VideoMIO(  424): video = 176 x 144
V/VideoMIO(  424): frame = 176 x 144
V/VideoMIO(  424): frame #bytes = 50688
I/ActivityManager(  451): Displayed activity 
com.android.mediaplayer/.MediaPlayerDemo_Video: 837 ms
W/AudioFlinger(  424): write blocked for 61 msecs
W/AudioFlinger(  424): write blocked for 48 msecs
W/AudioFlinger(  424): write blocked for 52 msecs
W/AudioFlinger(  424): write blocked for 75 msecs
W/AudioFlinger(  424): write blocked for 50 msecs
W/AudioFlinger(  424): write blocked for 53 msecs


 
 
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. "Failed to reopen debug port for Selected Client to: 8700" error

4. Cannot run Android emulator on Linux

5. VerifyError attempting to use commons-digester

6. SimpleDateFormat PathClassLoader NullPointerException quandary

7. Problem creating new app