Android上的MediaPlayer和SeekBar(成长堆)

时间:2013-11-27 08:49:33

标签: java android android-mediaplayer seekbar

播放歌曲20秒后,活动将关闭..

我从Logcat(绿线)

得到了这个错误的图片

enter image description here

我认为记忆存在问题,但我无法抓住它!

我在Sony Xperia P和三星Galaxy S3上进行了测试,每次都会出现同样的问题

我试图找到这个问题的解决方案1周..但是没有办法解决它

记录:当我删除这些行

endTime.setText(String.valueOf(milliSecondsToTimer(mp.getDuration())));
currentTime.setText(String.valueOf(milliSecondsToTimer(mp.getCurrentPosition())));

一切似乎都好......

活动代码:

package com.blurcode.enrique2013;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SeekBar;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.TextView;
import android.widget.Toast;
public class Music extends Activity implements OnCompletionListener,   SeekBar.OnSeekBarChangeListener  {

private ListView list_music;
private static MediaPlayer mp =null;
private static SeekBar seek = null;

private static TextView currentTime;
private static TextView endTime;

private ImageView Play;
private static ImageView Forward;
private static ImageView Backward;
private static ImageView Next;
private static ImageView Previous;

ArrayList<String> Parts;
private Timer myTimer1;


@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.music);
    Init();
    //SeekLoad();

    myTimer1 = new Timer();
    myTimer1.schedule(new TimerTask() 
    {
        public void run()
        {
            UpdateProgressBar();
        }
    },100, 100);

    Init_list();

    MediaClicks();

}

void Init(){
    seek = (SeekBar)findViewById(R.id.seek);
    currentTime = (TextView)findViewById(R.id.currentTime);
    endTime = (TextView)findViewById(R.id.endTime);

    Play = (ImageView)findViewById(R.id.player_play);
    Forward = (ImageView)findViewById(R.id.player_forward);
    Backward = (ImageView)findViewById(R.id.player_backward);
    Next = (ImageView)findViewById(R.id.player_next);
    Previous = (ImageView)findViewById(R.id.player_back);


    if(mp != null){
        if(!mp.isPlaying())
            Play.setImageResource(R.drawable.player_play);
        else
            Play.setImageResource(R.drawable.player_pause);
    }else{
        Play.setImageResource(R.drawable.player_play);
    }


}

void MediaClicks(){
    Play.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            try{
                if(mp != null){
                    if(mp.isPlaying()){
                        mp.pause();
                        Play.setImageResource(R.drawable.player_play);
                    }else{
                        mp.start();
                        Play.setImageResource(R.drawable.player_pause);
                    }
                }else{
                    Toast.makeText(getApplicationContext(), "Select one music from the list", Toast.LENGTH_SHORT).show();
                }
            }catch(Exception ex){Toast.makeText(getApplicationContext(), ex.getMessage(), 500).show();}
        }
    });

    Forward.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            int currentPosition = mp.getCurrentPosition();
            if(currentPosition + 5000 <= mp.getDuration()){
                mp.seekTo(currentPosition + 5000);
            }else{
                mp.seekTo(mp.getDuration());
            }
        }
    });

    Backward.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            int currentPosition = mp.getCurrentPosition();
            if(currentPosition - 5000 >= 0){
                mp.seekTo(currentPosition - 5000);
            }else{
                mp.seekTo(0);
            }
        }
    });

    Next.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {

        }
    });

    Previous.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {

        }
    });
}

void SeekLoad(){
    seek.setProgress(0);
    seek.setMax(mp.getDuration());
}

void PlayNow(String url){
    try{
        mp = new MediaPlayer();

        seek.setOnSeekBarChangeListener(this); // Important
        mp.setOnCompletionListener(this); // Important

        mp.reset();
        mp.setDataSource(url);
        mp.prepare();
        mp.start();
        mp.setOnCompletionListener(new OnCompletionListener() {
            public void onCompletion(MediaPlayer mp) {
                Play.setImageResource(R.drawable.player_play);
            }
        });
        SeekLoad();



    }catch(Exception ex){Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_SHORT).show();}
}

public void UpdateProgressBar() {
    this.runOnUiThread(Timer_Tick1);
}  

// Milliseconds To Time
public String milliSecondsToTimer(long milliseconds){
    String finalTimerString = "";
    String secondsString = "";

    int hours = (int)( milliseconds / (1000*60*60));
    int minutes = (int)(milliseconds % (1000*60*60)) / (1000*60);
    int seconds = (int) ((milliseconds % (1000*60*60)) % (1000*60) / 1000);
    if(hours > 0){
        finalTimerString = hours + ":";
    }

    if(seconds < 10){
        secondsString = "0" + seconds;
    }else{
        secondsString = "" + seconds;}

    finalTimerString = finalTimerString + minutes + ":" + secondsString;
    return finalTimerString;
}

public int getProgressPercentage(long currentDuration, long totalDuration){
    Double percentage = (double) 0;

    long currentSeconds = (int) (currentDuration / 1000);
    long totalSeconds = (int) (totalDuration / 1000);

    percentage =(((double)currentSeconds)/totalSeconds)*100;

    return percentage.intValue();
}


private Runnable Timer_Tick1 = new Runnable(){
    public void run(){ 
        try{
            endTime.setText(String.valueOf(milliSecondsToTimer(mp.getDuration())));
            currentTime.setText(String.valueOf(milliSecondsToTimer(mp.getCurrentPosition())));
            seek.setProgress(mp.getCurrentPosition());
            //int progress = (int)(getProgressPercentage(mp.getCurrentPosition(), mp.getDuration()));
        }catch (Exception ex) {} 
    }
};


void Init_list(){
    list_music = (ListView)findViewById(R.id.list_music);
    Parts = new ArrayList<String>();
    Parts.add("First Song");
    Parts.add("Second Song");
    Parts.add("Third Song");
    Parts.add("Fourth Song");
    Parts.add("Fifth Song");
    Parts.add("Sixth Song");
    Parts.add("First Song");
    Parts.add("First Song");
    Parts.add("First Song");
    Parts.add("First Song");
    Parts.add("First Song");

    ListAdapterSimple adapter = new ListAdapterSimple(Parts,getApplicationContext());
    list_music.setAdapter(adapter);
    list_music.setOnItemClickListener(new OnItemClickListener() {

        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {
            if(checkInternetConnection()){
                //arg2
                switch(arg2){
                case 0:
                    Toast.makeText(getApplicationContext(), "buffering..", 600).show();
                    PlayNow("http://server11.mp3quran.net/shatri/002.mp3");
                    Music.this.Play.setImageResource(R.drawable.player_pause);
                    /*
                    new Thread(new Runnable() {

                        public void run() {
                            PlayNow("http://server11.mp3quran.net/shatri/002.mp3");
                            runOnUiThread(new Runnable() {
                                public void run() {
                                    Music.this.Play.setImageResource(R.drawable.player_pause);
                                }
                            });
                        }
                    }).start();*/

                    break;

                }
            }else{
                Toast.makeText(getApplicationContext(), "Check your Internet connection please", Toast.LENGTH_LONG).show();
            }
        }
    });
}

public  boolean checkInternetConnection(){
    boolean isFound;
    ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
    if (conMgr.getActiveNetworkInfo() != null
            && conMgr.getActiveNetworkInfo().isAvailable()
            && conMgr.getActiveNetworkInfo().isConnected()) 
    {

        isFound=true;
    } else 
    {
        isFound= false;
    }
    return isFound;
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.music, menu);
    return true;
}

public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {
    // TODO Auto-generated method stub

}
public void onStartTrackingTouch(SeekBar seekBar) {
    // TODO Auto-generated method stub

}

public void onStopTrackingTouch(SeekBar seekBar) {
    // TODO Auto-generated method stub

}

public void onCompletion(MediaPlayer mp) {
    // TODO Auto-generated method stub

}}

Logcat输出:

11-27 16:55:12.296: V/MediaPlayer(8356): getDuration
11-27 16:55:12.296: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 12805 (msec)
11-27 16:55:12.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 12805 (msec)
11-27 16:55:12.456: V/MediaPlayer(8356): getDuration
11-27 16:55:12.456: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.461: V/MediaPlayer-JNI(8356): getCurrentPosition: 12991 (msec)
11-27 16:55:12.461: V/MediaPlayer-JNI(8356): getCurrentPosition: 12991 (msec)
11-27 16:55:12.616: V/MediaPlayer(8356): getDuration
11-27 16:55:12.616: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.616: V/MediaPlayer-JNI(8356): getCurrentPosition: 13177 (msec)
11-27 16:55:12.616: V/MediaPlayer-JNI(8356): getCurrentPosition: 13177 (msec)
11-27 16:55:12.621: V/MediaPlayer(8356): getDuration
11-27 16:55:12.626: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.626: V/MediaPlayer-JNI(8356): getCurrentPosition: 13177 (msec)
11-27 16:55:12.626: V/MediaPlayer-JNI(8356): getCurrentPosition: 13177 (msec)
11-27 16:55:12.666: V/MediaPlayer(8356): message received msg=3, ext1=0, ext2=0
11-27 16:55:12.666: V/MediaPlayer(8356): buffering 0
11-27 16:55:12.666: V/MediaPlayer(8356): callback application
11-27 16:55:12.666: V/MediaPlayer(8356): back from callback
11-27 16:55:12.751: V/MediaPlayer(8356): getDuration
11-27 16:55:12.751: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.756: V/MediaPlayer-JNI(8356): getCurrentPosition: 13363 (msec)
11-27 16:55:12.756: V/MediaPlayer-JNI(8356): getCurrentPosition: 13363 (msec)
11-27 16:55:12.906: V/MediaPlayer(8356): getDuration
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:12.906: V/MediaPlayer(8356): getDuration
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:12.906: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:13.061: V/MediaPlayer(8356): getDuration
11-27 16:55:13.061: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.066: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:13.066: V/MediaPlayer-JNI(8356): getCurrentPosition: 13548 (msec)
11-27 16:55:13.226: V/MediaPlayer(8356): getDuration
11-27 16:55:13.226: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.231: V/MediaPlayer-JNI(8356): getCurrentPosition: 13734 (msec)
11-27 16:55:13.231: V/MediaPlayer-JNI(8356): getCurrentPosition: 13734 (msec)
11-27 16:55:13.231: V/MediaPlayer(8356): getDuration
11-27 16:55:13.231: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.231: V/MediaPlayer-JNI(8356): getCurrentPosition: 13734 (msec)
11-27 16:55:13.231: V/MediaPlayer-JNI(8356): getCurrentPosition: 13734 (msec)
11-27 16:55:13.386: V/MediaPlayer(8356): getDuration
11-27 16:55:13.386: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.386: V/MediaPlayer-JNI(8356): getCurrentPosition: 13920 (msec)
11-27 16:55:13.386: V/MediaPlayer-JNI(8356): getCurrentPosition: 13920 (msec)
11-27 16:55:13.386: V/MediaPlayer(8356): getDuration
11-27 16:55:13.386: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.391: V/MediaPlayer-JNI(8356): getCurrentPosition: 13920 (msec)
11-27 16:55:13.391: V/MediaPlayer-JNI(8356): getCurrentPosition: 13920 (msec)
11-27 16:55:13.546: V/MediaPlayer(8356): getDuration
11-27 16:55:13.546: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.546: V/MediaPlayer-JNI(8356): getCurrentPosition: 14106 (msec)
11-27 16:55:13.546: V/MediaPlayer-JNI(8356): getCurrentPosition: 14106 (msec)
11-27 16:55:13.666: V/MediaPlayer(8356): message received msg=3, ext1=0, ext2=0
11-27 16:55:13.666: V/MediaPlayer(8356): buffering 0
11-27 16:55:13.666: V/MediaPlayer(8356): callback application
11-27 16:55:13.666: V/MediaPlayer(8356): back from callback
11-27 16:55:13.686: V/MediaPlayer(8356): getDuration
11-27 16:55:13.686: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.691: V/MediaPlayer-JNI(8356): getCurrentPosition: 14291 (msec)
11-27 16:55:13.691: V/MediaPlayer-JNI(8356): getCurrentPosition: 14291 (msec)
11-27 16:55:13.691: V/MediaPlayer(8356): getDuration
11-27 16:55:13.691: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.691: V/MediaPlayer-JNI(8356): getCurrentPosition: 14291 (msec)
11-27 16:55:13.691: V/MediaPlayer-JNI(8356): getCurrentPosition: 14291 (msec)
11-27 16:55:13.841: V/MediaPlayer(8356): getDuration
11-27 16:55:13.841: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.846: V/MediaPlayer-JNI(8356): getCurrentPosition: 14477 (msec)
11-27 16:55:13.846: V/MediaPlayer-JNI(8356): getCurrentPosition: 14477 (msec)
11-27 16:55:13.981: V/MediaPlayer(8356): getDuration
11-27 16:55:13.981: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:13.981: V/MediaPlayer-JNI(8356): getCurrentPosition: 14477 (msec)
11-27 16:55:13.981: V/MediaPlayer-JNI(8356): getCurrentPosition: 14477 (msec)
11-27 16:55:14.131: V/MediaPlayer(8356): getDuration
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getCurrentPosition: 14663 (msec)
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getCurrentPosition: 14663 (msec)
11-27 16:55:14.131: V/MediaPlayer(8356): getDuration
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getCurrentPosition: 14663 (msec)
11-27 16:55:14.131: V/MediaPlayer-JNI(8356): getCurrentPosition: 14663 (msec)
11-27 16:55:14.301: V/MediaPlayer(8356): getDuration
11-27 16:55:14.301: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.306: V/MediaPlayer-JNI(8356): getCurrentPosition: 14849 (msec)
11-27 16:55:14.306: V/MediaPlayer-JNI(8356): getCurrentPosition: 14849 (msec)
11-27 16:55:14.306: V/MediaPlayer(8356): getDuration
11-27 16:55:14.306: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.306: V/MediaPlayer-JNI(8356): getCurrentPosition: 14849 (msec)
11-27 16:55:14.306: V/MediaPlayer-JNI(8356): getCurrentPosition: 14849 (msec)
11-27 16:55:14.441: V/MediaPlayer(8356): getDuration
11-27 16:55:14.441: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.441: V/MediaPlayer-JNI(8356): getCurrentPosition: 15035 (msec)
11-27 16:55:14.441: V/MediaPlayer-JNI(8356): getCurrentPosition: 15035 (msec)
11-27 16:55:14.576: V/MediaPlayer(8356): getDuration
11-27 16:55:14.576: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.576: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.576: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.666: V/MediaPlayer(8356): message received msg=3, ext1=0, ext2=0
11-27 16:55:14.666: V/MediaPlayer(8356): buffering 0
11-27 16:55:14.666: V/MediaPlayer(8356): callback application
11-27 16:55:14.666: V/MediaPlayer(8356): back from callback
11-27 16:55:14.721: V/MediaPlayer(8356): getDuration
11-27 16:55:14.721: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.726: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.726: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.726: V/MediaPlayer(8356): getDuration
11-27 16:55:14.726: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.726: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.726: V/MediaPlayer-JNI(8356): getCurrentPosition: 15220 (msec)
11-27 16:55:14.881: V/MediaPlayer(8356): getDuration
11-27 16:55:14.881: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:14.881: V/MediaPlayer-JNI(8356): getCurrentPosition: 15406 (msec)
11-27 16:55:14.881: V/MediaPlayer-JNI(8356): getCurrentPosition: 15406 (msec)
11-27 16:55:15.031: V/MediaPlayer(8356): getDuration
11-27 16:55:15.031: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.031: V/MediaPlayer-JNI(8356): getCurrentPosition: 15592 (msec)
11-27 16:55:15.031: V/MediaPlayer-JNI(8356): getCurrentPosition: 15592 (msec)
11-27 16:55:15.031: V/MediaPlayer(8356): getDuration
11-27 16:55:15.031: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.036: V/MediaPlayer-JNI(8356): getCurrentPosition: 15592 (msec)
11-27 16:55:15.036: V/MediaPlayer-JNI(8356): getCurrentPosition: 15592 (msec)
11-27 16:55:15.166: V/MediaPlayer(8356): getDuration
11-27 16:55:15.166: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.166: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.171: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.296: V/MediaPlayer(8356): getDuration
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.296: V/MediaPlayer(8356): getDuration
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.296: V/MediaPlayer-JNI(8356): getCurrentPosition: 15778 (msec)
11-27 16:55:15.416: V/MediaPlayer(8356): getDuration
11-27 16:55:15.416: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.421: V/MediaPlayer-JNI(8356): getCurrentPosition: 15963 (msec)
11-27 16:55:15.421: V/MediaPlayer-JNI(8356): getCurrentPosition: 15963 (msec)
11-27 16:55:15.551: V/MediaPlayer(8356): getDuration
11-27 16:55:15.551: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.556: V/MediaPlayer-JNI(8356): getCurrentPosition: 16149 (msec)
11-27 16:55:15.556: V/MediaPlayer-JNI(8356): getCurrentPosition: 16149 (msec)
11-27 16:55:15.666: V/MediaPlayer(8356): message received msg=3, ext1=0, ext2=0
11-27 16:55:15.666: V/MediaPlayer(8356): buffering 0
11-27 16:55:15.666: V/MediaPlayer(8356): callback application
11-27 16:55:15.666: V/MediaPlayer(8356): back from callback
11-27 16:55:15.716: V/MediaPlayer(8356): getDuration
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:15.716: V/MediaPlayer(8356): getDuration
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:15.716: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:15.846: V/MediaPlayer(8356): getDuration
11-27 16:55:15.846: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:15.846: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:15.846: V/MediaPlayer-JNI(8356): getCurrentPosition: 16335 (msec)
11-27 16:55:16.006: V/MediaPlayer(8356): getDuration
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getCurrentPosition: 16521 (msec)
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getCurrentPosition: 16521 (msec)
11-27 16:55:16.006: V/MediaPlayer(8356): getDuration
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getCurrentPosition: 16521 (msec)
11-27 16:55:16.006: V/MediaPlayer-JNI(8356): getCurrentPosition: 16521 (msec)
11-27 16:55:16.211: V/MediaPlayer(8356): getDuration
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getCurrentPosition: 16706 (msec)
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getCurrentPosition: 16706 (msec)
11-27 16:55:16.211: V/MediaPlayer(8356): getDuration
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getCurrentPosition: 16706 (msec)
11-27 16:55:16.211: V/MediaPlayer-JNI(8356): getCurrentPosition: 16706 (msec)
11-27 16:55:16.396: V/MediaPlayer(8356): getDuration
11-27 16:55:16.396: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.401: V/MediaPlayer-JNI(8356): getCurrentPosition: 16892 (msec)
11-27 16:55:16.401: V/MediaPlayer-JNI(8356): getCurrentPosition: 16892 (msec)
11-27 16:55:16.401: V/MediaPlayer(8356): getDuration
11-27 16:55:16.401: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.401: V/MediaPlayer-JNI(8356): getCurrentPosition: 16892 (msec)
11-27 16:55:16.401: V/MediaPlayer-JNI(8356): getCurrentPosition: 16892 (msec)
11-27 16:55:16.591: V/MediaPlayer(8356): getDuration
11-27 16:55:16.591: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.591: V/MediaPlayer-JNI(8356): getCurrentPosition: 17078 (msec)
11-27 16:55:16.591: V/MediaPlayer-JNI(8356): getCurrentPosition: 17078 (msec)
11-27 16:55:16.666: V/MediaPlayer(8356): message received msg=3, ext1=0, ext2=0
11-27 16:55:16.666: V/MediaPlayer(8356): buffering 0
11-27 16:55:16.666: V/MediaPlayer(8356): callback application
11-27 16:55:16.666: V/MediaPlayer(8356): back from callback
11-27 16:55:16.761: V/MediaPlayer(8356): getDuration
11-27 16:55:16.761: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.761: V/MediaPlayer-JNI(8356): getCurrentPosition: 17264 (msec)
11-27 16:55:16.761: V/MediaPlayer-JNI(8356): getCurrentPosition: 17264 (msec)
11-27 16:55:16.766: V/MediaPlayer(8356): getDuration
11-27 16:55:16.766: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.766: V/MediaPlayer-JNI(8356): getCurrentPosition: 17264 (msec)
11-27 16:55:16.766: V/MediaPlayer-JNI(8356): getCurrentPosition: 17264 (msec)
11-27 16:55:16.951: V/MediaPlayer(8356): getDuration
11-27 16:55:16.951: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.951: V/MediaPlayer-JNI(8356): getCurrentPosition: 17449 (msec)
11-27 16:55:16.951: V/MediaPlayer-JNI(8356): getCurrentPosition: 17449 (msec)
11-27 16:55:16.956: V/MediaPlayer(8356): getDuration
11-27 16:55:16.956: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:16.956: V/MediaPlayer-JNI(8356): getCurrentPosition: 17449 (msec)
11-27 16:55:16.956: V/MediaPlayer-JNI(8356): getCurrentPosition: 17449 (msec)
11-27 16:55:17.106: V/MediaPlayer(8356): getDuration
11-27 16:55:17.106: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:17.111: V/MediaPlayer-JNI(8356): getCurrentPosition: 17635 (msec)
11-27 16:55:17.111: V/MediaPlayer-JNI(8356): getCurrentPosition: 17635 (msec)
11-27 16:55:17.111: V/MediaPlayer(8356): getDuration
11-27 16:55:17.111: V/MediaPlayer-JNI(8356): getDuration: 7084625 (msec)
11-27 16:55:17.111: V/MediaPlayer-JNI(8356): getCurrentPosition: 17635 (msec)
11-27 16:55:17.111: V/MediaPlayer-JNI(8356): getCurrentPosition: 17635 (msec)
11-27 16:55:18.036: D/dalvikvm(10335): GC_FOR_ALLOC freed 42K, 6% free 12160K/12931K, paused 21ms, total 21ms
11-27 16:55:18.041: I/dalvikvm-heap(10335): Grow heap (frag case) to 13.684MB for 1310416-byte allocation
11-27 16:55:18.066: D/dalvikvm(10335): GC_CONCURRENT freed <1K, 6% free 13438K/14215K, paused 12ms+2ms, total 24ms
11-27 16:55:18.081: D/dalvikvm(10335): GC_FOR_ALLOC freed 0K, 6% free 13438K/14215K, paused 11ms, total 11ms
11-27 16:55:18.091: I/dalvikvm-heap(10335): Grow heap (frag case) to 15.905MB for 2329616-byte allocation
11-27 16:55:18.111: D/dalvikvm(10335): GC_CONCURRENT freed 0K, 5% free 15713K/16519K, paused 12ms+2ms, total 23ms
11-27 16:55:18.111: D/dalvikvm(10335): WAIT_FOR_CONCURRENT_GC blocked 4ms
11-27 16:55:18.161: D/dalvikvm(10335): GC_FOR_ALLOC freed 1637K, 15% free 15079K/17543K, paused 12ms, total 12ms
11-27 16:55:18.186: D/dalvikvm(10335): GC_CONCURRENT freed <1K, 9% free 16070K/17543K, paused 3ms+1ms, total 14ms
11-27 16:55:18.186: D/dalvikvm(10335): WAIT_FOR_CONCURRENT_GC blocked 9ms
11-27 16:55:18.211: D/dalvikvm(10335): GC_FOR_ALLOC freed 356K, 9% free 16038K/17543K, paused 12ms, total 12ms
11-27 16:55:18.211: I/dalvikvm-heap(10335): Grow heap (frag case) to 16.786MB for 590800-byte allocation
11-27 16:55:18.231: D/dalvikvm(10335): GC_FOR_ALLOC freed <1K, 9% free 16615K/18183K, paused 12ms, total 12ms
11-27 16:55:18.251: D/dalvikvm(10335): GC_FOR_ALLOC freed 324K, 9% free 16619K/18183K, paused 12ms, total 12ms
11-27 16:55:18.281: D/dalvikvm(10335): GC_FOR_ALLOC freed 326K, 8% free 17196K/18567K, paused 12ms, total 12ms
11-27 16:55:18.351: D/libEGL(10335): loaded /system/lib/egl/libEGL_mali.so
11-27 16:55:18.366: D/libEGL(10335): loaded /system/lib/egl/libGLESv1_CM_mali.so
11-27 16:55:18.366: D/libEGL(10335): loaded /system/lib/egl/libGLESv2_mali.so
11-27 16:55:18.371: D/(10335): Device driver API match
11-27 16:55:18.371: D/(10335): Device driver API version: 10
11-27 16:55:18.371: D/(10335): User space API version: 10 
11-27 16:55:18.371: D/(10335): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 
11-27 16:55:18.411: D/OpenGLRenderer(10335): Enabling debug mode 0

0 个答案:

没有答案