Java Code Examples for tv.danmaku.ijk.media.player.IMediaPlayer#MEDIA_INFO_VIDEO_ROTATION_CHANGED
The following examples show how to use
tv.danmaku.ijk.media.player.IMediaPlayer#MEDIA_INFO_VIDEO_ROTATION_CHANGED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IjkVideoView.java From DMusic with Apache License 2.0 | 6 votes |
@Override public boolean onInfo(IMediaPlayer mp, int what, int extra) { // 当what为MEDIA_INFO_VIDEO_RENDERING_START时播放第一帧画面了 if (mActivity == null || mActivity.isFinishing()) { return false; } switch (what) { case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: videoRotationDegree = extra; ULog.d("MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + extra); if (renderView != null) { renderView.setVideoRotation(extra); } break; // case IMediaPlayer.MEDIA_INFO_... } return listener == null || listener.onInfo(mp, what, extra); }
Example 2
Source File: MxVideoPlayer.java From MxVideoPlayer with Apache License 2.0 | 6 votes |
@Override public void onInfo(int what, int extra) { Log.i(TAG, "onInfo what : " + what + " extra : " + extra); if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_START) { MxMediaManager.getInstance().mBackUpBufferState = mCurrentState; setUiPlayState(CURRENT_STATE_PLAYING_BUFFERING_START); Log.i(TAG, "MEDIA_INFO_BUFFERING_START"); } else if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_END) { if (MxMediaManager.getInstance().mBackUpBufferState != -1) { setUiPlayState(MxMediaManager.getInstance().mBackUpBufferState); MxMediaManager.getInstance().mBackUpBufferState = -1; } Log.i(TAG, "MEDIA_INFO_BUFFERING_END"); } else if (what == IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED) { MxMediaManager.getInstance().mVideoRotation = extra; MxMediaManager.mTextureView.setRotation(extra); mCacheImageView.setRotation(extra); Log.i(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED"); } }
Example 3
Source File: MediaPlayerView.java From HeroVideo-master with Apache License 2.0 | 5 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; } return true; }
Example 4
Source File: DefaultVideoPlayer.java From NewFastFrame with Apache License 2.0 | 5 votes |
@Override public boolean onInfo(IMediaPlayer iMediaPlayer, int what, int extra) { if (what == MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) { // 渲染开始 mState = PLAY_STATE_PLAYING; mVideoController.onPlayStateChanged(mState); } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) { // 缓存开始 if (mState == PLAY_STATE_PLAYING) { mState = PLAY_STATE_BUFFERING_PLAYING; } else if (mState == PLAY_STATE_PAUSE) { mState = PLAY_STATE_BUFFERING_PAUSE; } mVideoController.onPlayStateChanged(mState); } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) { // 缓存结束 if (mState == PLAY_STATE_BUFFERING_PAUSE) { mState = PLAY_STATE_PAUSE; } else if (mState == PLAY_STATE_BUFFERING_PLAYING) { mState = PLAY_STATE_PLAYING; } mVideoController.onPlayStateChanged(mState); } else if (what == IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED) { // 视频旋转了extra度,需要恢复 if (defaultTextureView != null) { defaultTextureView.setRotation(extra); CommonLogger.d("视频旋转角度:" + extra); } } else { CommonLogger.e("播放视频出错" + what + ":::" + extra); } return true; }
Example 5
Source File: IjkVideoView.java From MVideo with Apache License 2.0 | 5 votes |
@Override public boolean onInfo(IMediaPlayer iMediaPlayer, int what, int extra) { if (what == IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED) { if (rotateDirectionValue != 1) { mRenderView.setVideoRotation(rotateDirectionValue); } else { mRenderView.setVideoRotation(extra); } } return false; }
Example 6
Source File: IjkVideoView.java From MKVideoPlayer with MIT License | 5 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; } return true; }
Example 7
Source File: IjkPlayer.java From PlayerBase with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: PLog.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START"); startSeekPos = 0; submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_VIDEO_RENDER_START,null); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: PLog.d(TAG, "MEDIA_INFO_BUFFERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_START,null); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: PLog.d(TAG, "MEDIA_INFO_BUFFERING_END:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_END,null); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: //not support break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: PLog.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BAD_INTERLEAVING,null); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: PLog.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_NOT_SEEK_ABLE,null); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: PLog.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_METADATA_UPDATE,null); break; case IMediaPlayer.MEDIA_INFO_TIMED_TEXT_ERROR: PLog.d(TAG, "MEDIA_INFO_TIMED_TEXT_ERROR:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_TIMED_TEXT_ERROR,null); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: PLog.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_UNSUPPORTED_SUBTITLE,null); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: PLog.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_SUBTITLE_TIMED_OUT,null); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: PLog.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); Bundle bundle = BundlePool.obtain(); bundle.putInt(EventKey.INT_DATA,arg2); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_VIDEO_ROTATION_CHANGED,bundle); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_RENDER_START,null); break; case IMediaPlayer.MEDIA_INFO_AUDIO_DECODED_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_DECODED_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_DECODER_START,null); break; case IMediaPlayer.MEDIA_INFO_AUDIO_SEEK_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_SEEK_RENDERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_SEEK_RENDERING_START,null); break; } return true; }
Example 8
Source File: GSYVideoBaseManager.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
@Override public int getRotateInfoFlag() { return IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED; }
Example 9
Source File: IjkVideoView.java From LivePlayback with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 10
Source File: IjkVideoView.java From MD with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 11
Source File: ParsingPlayerProxy.java From ParsingPlayer with GNU Lesser General Public License v2.1 | 4 votes |
@Override public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mStateListener != null) mStateListener.onInfo(arg1); switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: LogUtil.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: LogUtil.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: LogUtil.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: LogUtil.w(TAG, "Bad networking!"); LogUtil.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: LogUtil.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: LogUtil.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: LogUtil.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: LogUtil.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: LogUtil.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: LogUtil.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: LogUtil.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: LogUtil.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 12
Source File: IjkVideoView.java From TvPlayer with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 13
Source File: VideoMediaPlayer.java From YCVideoPlayer with Apache License 2.0 | 4 votes |
@Override public boolean onInfo(IMediaPlayer mp, int what, int extra) { if (what == IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) { // 播放器开始渲染 videoPlayer.setCurrentState(ConstantKeys.CurrentState.STATE_PLAYING); videoPlayer.getController().onPlayStateChanged(videoPlayer.getCurrentState()); VideoLogUtil.d("listener---------onInfo ——> MEDIA_INFO_VIDEO_RENDERING_START:STATE_PLAYING"); } else if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_START) { // MediaPlayer暂时不播放,以缓冲更多的数据 if (videoPlayer.getCurrentState() == ConstantKeys.CurrentState.STATE_PAUSED || videoPlayer.getCurrentState() == ConstantKeys.CurrentState.STATE_BUFFERING_PAUSED) { videoPlayer.setCurrentState(ConstantKeys.CurrentState.STATE_BUFFERING_PAUSED); VideoLogUtil.d("listener---------onInfo ——> MEDIA_INFO_BUFFERING_START:STATE_BUFFERING_PAUSED"); } else { videoPlayer.setCurrentState(ConstantKeys.CurrentState.STATE_BUFFERING_PLAYING); VideoLogUtil.d("listener---------onInfo ——> MEDIA_INFO_BUFFERING_START:STATE_BUFFERING_PLAYING"); } videoPlayer.getController().onPlayStateChanged(videoPlayer.getCurrentState()); } else if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_END) { // 填充缓冲区后,MediaPlayer恢复播放/暂停 if (videoPlayer.getCurrentState() == ConstantKeys.CurrentState.STATE_BUFFERING_PLAYING) { videoPlayer.setCurrentState(ConstantKeys.CurrentState.STATE_PLAYING); videoPlayer.getController().onPlayStateChanged(videoPlayer.getCurrentState()); VideoLogUtil.d("listener---------onInfo ——> MEDIA_INFO_BUFFERING_END: STATE_PLAYING"); } if (videoPlayer.getCurrentState() == ConstantKeys.CurrentState.STATE_BUFFERING_PAUSED) { videoPlayer.setCurrentState(ConstantKeys.CurrentState.STATE_PAUSED); videoPlayer.getController().onPlayStateChanged(videoPlayer.getCurrentState()); VideoLogUtil.d("listener---------onInfo ——> MEDIA_INFO_BUFFERING_END: STATE_PAUSED"); } } else if (what == IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED) { // 视频旋转了extra度,需要恢复 if (mTextureView != null) { mTextureView.setRotation(extra); VideoLogUtil.d("listener---------视频旋转角度:" + extra); } } else if (what == IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE) { VideoLogUtil.d("listener---------视频不能seekTo,为直播视频"); } else { VideoLogUtil.d("listener---------onInfo ——> what:" + what); } return true; }
Example 14
Source File: IjkVideoView.java From ShareBox with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 15
Source File: PlayerView.java From VRPlayer with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 16
Source File: IjkVideoView.java From AndroidTvDemo with Apache License 2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 17
Source File: IjkVideoView.java From DanDanPlayForAndroid with MIT License | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 18
Source File: XMediaPlayer.java From XPlayer2 with Apache License 2.0 | 4 votes |
@Override public boolean onInfo(IMediaPlayer iMediaPlayer, int what, int extra) { if (mMediaPlayerListener != null) { mMediaPlayerListener.onInfo(what, extra); } MLog.i("TTT", "what="+what+"\n extra=" + extra); // int MEDIA_INFO_VIDEO_RENDERING_START = 3;//视频准备渲染 // int MEDIA_INFO_BUFFERING_START = 701;//开始缓冲 // int MEDIA_INFO_BUFFERING_END = 702;//缓冲结束 // int MEDIA_INFO_VIDEO_ROTATION_CHANGED = 10001;//视频选择信息 // int MEDIA_ERROR_SERVER_DIED = 100;//视频中断,一般是视频源异常或者不支持的视频类型。 // int MEDIA_ERROR_IJK_PLAYER = -10000,//一般是视频源有问题或者数据格式不支持,比如音频不是AAC之类的 // int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200;//数据错误没有有效的回收 // int MEDIA_INFO_UNKNOWN = 1;//未知信息 // int MEDIA_INFO_STARTED_AS_NEXT = 2;//播放下一条 // int MEDIA_INFO_VIDEO_RENDERING_START = 3;//视频开始整备中 // int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700;//视频日志跟踪 // int MEDIA_INFO_BUFFERING_START = 701;//开始缓冲中 // int MEDIA_INFO_BUFFERING_END = 702;//缓冲结束 // int MEDIA_INFO_NETWORK_BANDWIDTH = 703;//网络带宽,网速方面 // int MEDIA_INFO_BAD_INTERLEAVING = 800;// // int MEDIA_INFO_NOT_SEEKABLE = 801;//不可设置播放位置,直播方面 // int MEDIA_INFO_METADATA_UPDATE = 802;// // int MEDIA_INFO_TIMED_TEXT_ERROR = 900; // int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901;//不支持字幕 // int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902;//字幕超时 // // int MEDIA_INFO_VIDEO_INTERRUPT= -10000;//数据连接中断 // int MEDIA_INFO_VIDEO_ROTATION_CHANGED = 10001;//视频方向改变 // int MEDIA_INFO_AUDIO_RENDERING_START = 10002;//音频开始整备中 // // int MEDIA_ERROR_UNKNOWN = 1;//未知错误 // int MEDIA_ERROR_SERVER_DIED = 100;//服务挂掉 // int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200;//数据错误没有有效的回收 // int MEDIA_ERROR_IO = -1004;//IO错误 // int MEDIA_ERROR_MALFORMED = -1007; // int MEDIA_ERROR_UNSUPPORTED = -1010;//数据不支持 // int MEDIA_ERROR_TIMED_OUT = -110;//数据超时 switch (what) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: // 缓冲结束,开始播放,可以隐藏掉加载进度条 Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + extra); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + extra); // mVideoRotationDegree = arg2; // Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); // if (mRenderView != null) // mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 19
Source File: IjkVideoView.java From TVRemoteIME with GNU General Public License v2.0 | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, arg1, arg2); } switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: Log.d(TAG, "MEDIA_INFO_BUFFERING_START:"); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: Log.d(TAG, "MEDIA_INFO_BUFFERING_END:"); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: Log.d(TAG, "MEDIA_INFO_NETWORK_BANDWIDTH: " + arg2); break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: mVideoRotationDegree = arg2; Log.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); if (mRenderView != null) mRenderView.setVideoRotation(arg2); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: Log.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); break; } return true; }
Example 20
Source File: IjkPlayer.java From VideoDemoJava with MIT License | 4 votes |
public boolean onInfo(IMediaPlayer mp, int arg1, int arg2) { switch (arg1) { case IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: PLog.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START"); startSeekPos = 0; submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_VIDEO_RENDER_START, null); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_START: PLog.d(TAG, "MEDIA_INFO_BUFFERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_START, null); break; case IMediaPlayer.MEDIA_INFO_BUFFERING_END: PLog.d(TAG, "MEDIA_INFO_BUFFERING_END:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_END, null); break; case IMediaPlayer.MEDIA_INFO_NETWORK_BANDWIDTH: //not support break; case IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: PLog.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BAD_INTERLEAVING, null); break; case IMediaPlayer.MEDIA_INFO_NOT_SEEKABLE: PLog.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_NOT_SEEK_ABLE, null); break; case IMediaPlayer.MEDIA_INFO_METADATA_UPDATE: PLog.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_METADATA_UPDATE, null); break; case IMediaPlayer.MEDIA_INFO_TIMED_TEXT_ERROR: PLog.d(TAG, "MEDIA_INFO_TIMED_TEXT_ERROR:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_TIMED_TEXT_ERROR, null); break; case IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: PLog.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_UNSUPPORTED_SUBTITLE, null); break; case IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: PLog.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_SUBTITLE_TIMED_OUT, null); break; case IMediaPlayer.MEDIA_INFO_VIDEO_ROTATION_CHANGED: PLog.d(TAG, "MEDIA_INFO_VIDEO_ROTATION_CHANGED: " + arg2); Bundle bundle = BundlePool.obtain(); bundle.putInt(EventKey.INT_DATA, arg2); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_VIDEO_ROTATION_CHANGED, bundle); break; case IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_RENDERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_RENDER_START, null); break; case IMediaPlayer.MEDIA_INFO_AUDIO_DECODED_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_DECODED_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_DECODER_START, null); break; case IMediaPlayer.MEDIA_INFO_AUDIO_SEEK_RENDERING_START: PLog.d(TAG, "MEDIA_INFO_AUDIO_SEEK_RENDERING_START:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_AUDIO_SEEK_RENDERING_START, null); break; } return true; }