author | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2017-06-26 07:54:22 (GMT) |
---|---|---|
committer | Xiaoliang Wang <xiaoliang.wang@amlogic.com> | 2017-06-26 07:57:11 (GMT) |
commit | 1ffa41821da2da36aef2542aee32a61596bbd1d4 (patch) | |
tree | 0aa93959952ae63cf82a8d91edcf3b24c9a7b928 | |
parent | 7e828176023ff20c77e1c0f6412a54386934f407 (diff) | |
download | VideoPlayer-1ffa41821da2da36aef2542aee32a61596bbd1d4.zip VideoPlayer-1ffa41821da2da36aef2542aee32a61596bbd1d4.tar.gz VideoPlayer-1ffa41821da2da36aef2542aee32a61596bbd1d4.tar.bz2 |
PD#145913: invoke play file directly instead of sending message
Change-Id: I7da71e770bfd4d9de97ac78b6f4f2d4c72075ab6
-rw-r--r-- | src/com/droidlogic/videoplayer/VideoPlayer.java | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/src/com/droidlogic/videoplayer/VideoPlayer.java b/src/com/droidlogic/videoplayer/VideoPlayer.java index e80c10f..9064c17 100644 --- a/src/com/droidlogic/videoplayer/VideoPlayer.java +++ b/src/com/droidlogic/videoplayer/VideoPlayer.java @@ -316,7 +316,8 @@ public class VideoPlayer extends Activity { //browserBack(); initPlayer(); mPath = path; - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(path); } } else { @@ -482,21 +483,7 @@ public class VideoPlayer extends Activity { break; case MSG_PLAY: LOGI (TAG, "[handleMessage]resume mode:" + mOption.getResumeMode() + ",mPath:" + mPath); - if (mOption != null && mPath != null && mPermissionGranted) { - resetVariate(); - showOsdView(); - if (mResumePlay.getEnable() == true) { - setVideoPath (mPath); - } - else { - if (mOption.getResumeMode() == true) { - bmPlay (mPath); - } - else { - setVideoPath (mPath); - } - } - } + playFile(mPath); break; case MSG_STOP: stop(); @@ -512,7 +499,8 @@ public class VideoPlayer extends Activity { //browserBack(); initPlayer(); mPath = path; - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(path); } } else { @@ -1129,7 +1117,8 @@ public class VideoPlayer extends Activity { LOGI (TAG, "[surfaceCreated]mResumePlay prepare path:" + path); if (path != null) { mPath = path; - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(path); } else { browserBack(); @@ -1142,13 +1131,15 @@ public class VideoPlayer extends Activity { else { LOGI (TAG, "[surfaceCreated]0path:" + mPlayList.getcur()); mPath = mPlayList.getcur(); - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(mPlayList.getcur()); } } else { LOGI (TAG, "[surfaceCreated]1path:" + mPlayList.getcur()); mPath = mPlayList.getcur(); - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(mPlayList.getcur()); } } public void surfaceDestroyed (SurfaceHolder holder) { @@ -2379,7 +2370,8 @@ public class VideoPlayer extends Activity { mBookmark.set (mPlayList.getcur(), curtime); mStateBac = STATE_STOP; mPath = mPlayList.moveprev(); - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(mPlayList.moveprev()); } else { LOGI (TAG, "[playPrev]mState=STATE_PREPARING, error status do nothing only waitting"); @@ -2398,7 +2390,8 @@ public class VideoPlayer extends Activity { mBookmark.set (mPlayList.getcur(), curtime); mStateBac = STATE_STOP; mPath = mPlayList.movenext(); - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(mPlayList.movenext()); } else { LOGI (TAG, "[playNext]mState=STATE_PREPARING, error status do nothing only waitting"); @@ -2417,7 +2410,8 @@ public class VideoPlayer extends Activity { mBookmark.set (mPlayList.getcur(), curtime); mStateBac = STATE_STOP; mPath = mPlayList.getcur(); - sendPlayFileMsg(); + //sendPlayFileMsg(); + playFile(mPlayList.getcur()); } private void fastForward() { |