Java Code Examples for com.shuyu.gsyvideoplayer.utils.Debuger#printfLog()
The following examples show how to use
com.shuyu.gsyvideoplayer.utils.Debuger#printfLog() .
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: StandardGSYVideoPlayer.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
protected void changeUiToPlayingBufferingClear() { Debuger.printfLog("changeUiToPlayingBufferingClear"); setViewShowState(mTopContainer, INVISIBLE); setViewShowState(mBottomContainer, INVISIBLE); setViewShowState(mStartButton, INVISIBLE); setViewShowState(mLoadingProgressBar, VISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, VISIBLE); setViewShowState(mLockScreen, GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ENDownloadView enDownloadView = (ENDownloadView) mLoadingProgressBar; if (enDownloadView.getCurrentState() == ENDownloadView.STATE_PRE) { ((ENDownloadView) mLoadingProgressBar).start(); } } updateStartImage(); }
Example 2
Source File: GSYVideoView.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
@Override public void onPrepared() { if (mCurrentState != CURRENT_STATE_PREPAREING) return; mHadPrepared = true; if (mVideoAllCallBack != null && isCurrentMediaListener()) { Debuger.printfLog("onPrepared"); mVideoAllCallBack.onPrepared(mOriginUrl, mTitle, this); } if (!mStartAfterPrepared) { setStateAndUi(CURRENT_STATE_PAUSE); onVideoPause();//todo 加上这个 return; } startAfterPrepared(); }
Example 3
Source File: FloatingVideo.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
@Override public void onAutoCompletion() { setStateAndUi(CURRENT_STATE_AUTO_COMPLETE); mSaveChangeViewTIme = 0; if (mTextureViewContainer.getChildCount() > 0) { mTextureViewContainer.removeAllViews(); } if (!mIfCurrentIsFullscreen) getGSYVideoManager().setLastListener(null); mAudioManager.abandonAudioFocus(onAudioFocusChangeListener); //((Activity) getActivityContext()).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); releaseNetWorkState(); if (mVideoAllCallBack != null && isCurrentMediaListener()) { Debuger.printfLog("onAutoComplete"); mVideoAllCallBack.onAutoComplete(mOriginUrl, mTitle, this); } }
Example 4
Source File: StandardVideoOSPlayer.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 6 votes |
@Override protected void changeUiToPreparingShow() { Debuger.printfLog("changeUiToPreparingShow"); setViewShowState(mTopContainer, VISIBLE); setViewShowState(mBottomContainer, VISIBLE); setViewShowState(mStartButton, INVISIBLE); setViewShowState(mLoadingProgressBar, VISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, INVISIBLE); setViewShowState(mLockScreen, GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ENDownloadView enDownloadView = (ENDownloadView) mLoadingProgressBar; if (enDownloadView.getCurrentState() == ENDownloadView.STATE_PRE) { ((ENDownloadView) mLoadingProgressBar).start(); } } }
Example 5
Source File: GSYVideoView.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
@Override public void onInfo(int what, int extra) { if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) { mBackUpPlayingBufferState = mCurrentState; //避免在onPrepared之前就进入了buffering,导致一只loading if (mHadPlay && mCurrentState != CURRENT_STATE_PREPAREING && mCurrentState > 0) setStateAndUi(CURRENT_STATE_PLAYING_BUFFERING_START); } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) { if (mBackUpPlayingBufferState != -1) { if (mBackUpPlayingBufferState == CURRENT_STATE_PLAYING_BUFFERING_START) { mBackUpPlayingBufferState = CURRENT_STATE_PLAYING; } if (mHadPlay && mCurrentState != CURRENT_STATE_PREPAREING && mCurrentState > 0) setStateAndUi(mBackUpPlayingBufferState); mBackUpPlayingBufferState = -1; } } else if (what == getGSYVideoManager().getRotateInfoFlag()) { mRotate = extra; Debuger.printfLog("Video Rotate Info " + extra); if (mTextureView != null) mTextureView.setRotation(mRotate); } }
Example 6
Source File: GSYBaseVideoPlayer.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
/** * 是否竖屏模式的竖屏 */ protected boolean isVerticalVideo() { boolean isVertical = false; int videoHeight = getCurrentVideoHeight(); int videoWidth = getCurrentVideoWidth(); Debuger.printfLog("GSYVideoBase isVerticalVideo videoHeight " + videoHeight + " videoWidth " + videoWidth); Debuger.printfLog("GSYVideoBase isVerticalVideo mRotate " + mRotate); if (videoHeight > 0 && videoWidth > 0) { if (mRotate == 90 || mRotate == 270) { isVertical = videoWidth > videoHeight; } else { isVertical = videoHeight > videoWidth; } } return isVertical; }
Example 7
Source File: StandardVideoOSPlayer.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 6 votes |
@Override protected void changeUiToError() { Debuger.printfLog("changeUiToError"); setViewShowState(mTopContainer, INVISIBLE); setViewShowState(mBottomContainer, INVISIBLE); setViewShowState(mStartButton, VISIBLE); setViewShowState(mLoadingProgressBar, INVISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, INVISIBLE); setViewShowState(mLockScreen, (mIfCurrentIsFullscreen && mNeedLockFull) ? VISIBLE : GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ((ENDownloadView) mLoadingProgressBar).reset(); } updateStartImage(); }
Example 8
Source File: GSYVideoView.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
protected void startPrepare() { if (getGSYVideoManager().listener() != null) { getGSYVideoManager().listener().onCompletion(); } if (mVideoAllCallBack != null) { Debuger.printfLog("onStartPrepared"); mVideoAllCallBack.onStartPrepared(mOriginUrl, mTitle, this); } getGSYVideoManager().setListener(this); getGSYVideoManager().setPlayTag(mPlayTag); getGSYVideoManager().setPlayPosition(mPlayPosition); mAudioManager.requestAudioFocus(onAudioFocusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT); try { if (mContext instanceof Activity) { ((Activity) mContext).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } } catch (Exception e) { e.printStackTrace(); } mBackUpPlayingBufferState = -1; getGSYVideoManager().prepare(mUrl, (mMapHeadData == null) ? new HashMap<String, String>() : mMapHeadData, mLooping, mSpeed, mCache, mCachePath, mOverrideExtension); setStateAndUi(CURRENT_STATE_PREPAREING); }
Example 9
Source File: StandardGSYVideoPlayer.java From Aurora with Apache License 2.0 | 6 votes |
@Override protected void changeUiToPreparingShow() { Debuger.printfLog("changeUiToPreparingShow"); setViewShowState(mTopContainer, VISIBLE); setViewShowState(mBottomContainer, VISIBLE); setViewShowState(mStartButton, INVISIBLE); setViewShowState(mLoadingProgressBar, VISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, INVISIBLE); setViewShowState(mLockScreen, GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ENDownloadView enDownloadView = (ENDownloadView) mLoadingProgressBar; if (enDownloadView.getCurrentState() == ENDownloadView.STATE_PRE) { ((ENDownloadView) mLoadingProgressBar).start(); } } }
Example 10
Source File: GSYVideoControlView.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
/*** * 拖动进度条 */ @Override public void onStopTrackingTouch(SeekBar seekBar) { if (mVideoAllCallBack != null && isCurrentMediaListener()) { if (isIfCurrentIsFullscreen()) { Debuger.printfLog("onClickSeekbarFullscreen"); mVideoAllCallBack.onClickSeekbarFullscreen(mOriginUrl, mTitle, this); } else { Debuger.printfLog("onClickSeekbar"); mVideoAllCallBack.onClickSeekbar(mOriginUrl, mTitle, this); } } if (getGSYVideoManager() != null && mHadPlay) { try { int time = seekBar.getProgress() * getDuration() / 100; getGSYVideoManager().seekTo(time); } catch (Exception e) { Debuger.printfWarning(e.toString()); } } mHadSeekTouch = false; }
Example 11
Source File: StandardVideoOSPlayer.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 5 votes |
protected void changeUiToPrepareingClear() { Debuger.printfLog("changeUiToPrepareingClear"); setViewShowState(mTopContainer, INVISIBLE); setViewShowState(mBottomContainer, INVISIBLE); setViewShowState(mStartButton, INVISIBLE); setViewShowState(mLoadingProgressBar, INVISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, INVISIBLE); setViewShowState(mLockScreen, GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ((ENDownloadView) mLoadingProgressBar).reset(); } }
Example 12
Source File: GSYVideoControlView.java From GSYVideoPlayer with Apache License 2.0 | 5 votes |
@Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); Debuger.printfLog(GSYVideoControlView.this.hashCode() + "------------------------------ dismiss onDetachedFromWindow"); cancelProgressTimer(); cancelDismissControlViewTimer(); }
Example 13
Source File: StandardGSYVideoPlayer.java From Aurora with Apache License 2.0 | 5 votes |
protected void changeUiToClear() { Debuger.printfLog("changeUiToClear"); setViewShowState(mTopContainer, INVISIBLE); setViewShowState(mBottomContainer, INVISIBLE); setViewShowState(mStartButton, INVISIBLE); setViewShowState(mLoadingProgressBar, INVISIBLE); setViewShowState(mThumbImageViewLayout, INVISIBLE); setViewShowState(mBottomProgressBar, INVISIBLE); setViewShowState(mLockScreen, GONE); if (mLoadingProgressBar instanceof ENDownloadView) { ((ENDownloadView) mLoadingProgressBar).reset(); } }
Example 14
Source File: GSYVideoView.java From GSYVideoPlayer with Apache License 2.0 | 5 votes |
/** * 开始播放逻辑 */ protected void startButtonLogic() { if (mVideoAllCallBack != null && (mCurrentState == CURRENT_STATE_NORMAL || mCurrentState == CURRENT_STATE_AUTO_COMPLETE)) { Debuger.printfLog("onClickStartIcon"); mVideoAllCallBack.onClickStartIcon(mOriginUrl, mTitle, this); } else if (mVideoAllCallBack != null) { Debuger.printfLog("onClickStartError"); mVideoAllCallBack.onClickStartError(mOriginUrl, mTitle, this); } prepareVideo(); }
Example 15
Source File: ListADVideoPlayer.java From GSYVideoPlayer with Apache License 2.0 | 5 votes |
@Override public void onAutoCompletion() { super.onAutoCompletion(); if (!isCurrentMediaListener() && mVideoAllCallBack != null) { Debuger.printfLog("onAutoComplete"); mVideoAllCallBack.onAutoComplete(mOriginUrl, mTitle, this); } }
Example 16
Source File: MediaCodecTextureView.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
@Override public void setRenderMode(int mode) { Debuger.printfLog(getClass().getSimpleName() + " not support setRenderMode now"); }
Example 17
Source File: MediaCodecTextureView.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
@Override public void onRenderPause() { Debuger.printfLog(getClass().getSimpleName() + " not support onRenderPause now"); }
Example 18
Source File: GSYTextureView.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
@Override public void setRenderMode(int mode) { Debuger.printfLog(getClass().getSimpleName() + " not support setRenderMode now"); }
Example 19
Source File: GSYVideoControlView.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
/** * 设置播放显示状态 * * @param state */ @Override protected void setStateAndUi(int state) { mCurrentState = state; if ((state == CURRENT_STATE_NORMAL && isCurrentMediaListener()) || state == CURRENT_STATE_AUTO_COMPLETE || state == CURRENT_STATE_ERROR) { mHadPrepared = false; } switch (mCurrentState) { case CURRENT_STATE_NORMAL: if (isCurrentMediaListener()) { Debuger.printfLog(GSYVideoControlView.this.hashCode() + "------------------------------ dismiss CURRENT_STATE_NORMAL"); cancelProgressTimer(); getGSYVideoManager().releaseMediaPlayer(); releasePauseCover(); mBufferPoint = 0; mSaveChangeViewTIme = 0; if (mAudioManager != null) { mAudioManager.abandonAudioFocus(onAudioFocusChangeListener); } } releaseNetWorkState(); break; case CURRENT_STATE_PREPAREING: resetProgressAndTime(); break; case CURRENT_STATE_PLAYING: if (isCurrentMediaListener()) { Debuger.printfLog(GSYVideoControlView.this.hashCode() + "------------------------------ CURRENT_STATE_PLAYING"); startProgressTimer(); } break; case CURRENT_STATE_PAUSE: Debuger.printfLog(GSYVideoControlView.this.hashCode() + "------------------------------ CURRENT_STATE_PAUSE"); startProgressTimer(); break; case CURRENT_STATE_ERROR: if (isCurrentMediaListener()) { getGSYVideoManager().releaseMediaPlayer(); } break; case CURRENT_STATE_AUTO_COMPLETE: Debuger.printfLog(GSYVideoControlView.this.hashCode() + "------------------------------ dismiss CURRENT_STATE_AUTO_COMPLETE"); cancelProgressTimer(); if (mProgressBar != null) { mProgressBar.setProgress(100); } if (mCurrentTimeTextView != null && mTotalTimeTextView != null) { mCurrentTimeTextView.setText(mTotalTimeTextView.getText()); } if (mBottomProgressBar != null) { mBottomProgressBar.setProgress(100); } break; } resolveUIState(state); }
Example 20
Source File: GSYSurfaceView.java From GSYVideoPlayer with Apache License 2.0 | 4 votes |
@Override public void onRenderPause() { Debuger.printfLog(getClass().getSimpleName() + " not support onRenderPause now"); }