|
|
|
|
@ -35,18 +35,18 @@ public class IjkVideoView extends FrameLayout implements MediaController.MediaPl |
|
|
|
|
|
|
|
|
|
private final String TAG = IjkVideoView.class.getSimpleName(); |
|
|
|
|
|
|
|
|
|
public static final int STATE_ERROR = -1; |
|
|
|
|
public static final int STATE_IDLE = 0; |
|
|
|
|
public static final int STATE_PREPARING = 1; |
|
|
|
|
public static final int STATE_PREPARED = 2; |
|
|
|
|
public static final int STATE_PLAYING = 3; |
|
|
|
|
public static final int STATE_PAUSED = 4; |
|
|
|
|
public static final int STATE_ENDED = 5; |
|
|
|
|
|
|
|
|
|
private static final int codec = IjkMediaPlayer.OPT_CATEGORY_CODEC; |
|
|
|
|
private static final int format = IjkMediaPlayer.OPT_CATEGORY_FORMAT; |
|
|
|
|
private static final int player = IjkMediaPlayer.OPT_CATEGORY_PLAYER; |
|
|
|
|
|
|
|
|
|
private static final int STATE_ERROR = -1; |
|
|
|
|
private static final int STATE_IDLE = 0; |
|
|
|
|
private static final int STATE_PREPARING = 1; |
|
|
|
|
private static final int STATE_PREPARED = 2; |
|
|
|
|
private static final int STATE_PLAYING = 3; |
|
|
|
|
private static final int STATE_PAUSED = 4; |
|
|
|
|
private static final int STATE_PLAYBACK_COMPLETED = 5; |
|
|
|
|
|
|
|
|
|
private static final int PLAYER_NONE = -1; |
|
|
|
|
private static final int PLAYER_SYS = 0; |
|
|
|
|
private static final int PLAYER_IJK = 1; |
|
|
|
|
@ -312,6 +312,10 @@ public class IjkVideoView extends FrameLayout implements MediaController.MediaPl |
|
|
|
|
return mVideoHeight; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getPlaybackState() { |
|
|
|
|
return mCurrentState; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public SubtitleView getSubtitleView() { |
|
|
|
|
return mSubtitleView; |
|
|
|
|
} |
|
|
|
|
@ -509,8 +513,8 @@ public class IjkVideoView extends FrameLayout implements MediaController.MediaPl |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onCompletion(IMediaPlayer mp) { |
|
|
|
|
mCurrentState = STATE_PLAYBACK_COMPLETED; |
|
|
|
|
mTargetState = STATE_PLAYBACK_COMPLETED; |
|
|
|
|
mCurrentState = STATE_ENDED; |
|
|
|
|
mTargetState = STATE_ENDED; |
|
|
|
|
mListener.onCompletion(mPlayer); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|