@Override public void onSeekComplete(MediaPlayer mp) { Log.d("onSeekComplete"); if (mOnSeekCompleteListener != null) mOnSeekCompleteListener.onSeekComplete(mp); } };
private static int getCachedFeature() { if (cachedFeatureString == null) { StringBuffer sb = new StringBuffer(); if ((cachedFeature & FEATURE_ARM_V5TE) > 0) sb.append("V5TE "); if ((cachedFeature & FEATURE_ARM_V6) > 0) sb.append("V6 "); if ((cachedFeature & FEATURE_ARM_VFP) > 0) sb.append("VFP "); if ((cachedFeature & FEATURE_ARM_V7A) > 0) sb.append("V7A "); if ((cachedFeature & FEATURE_ARM_VFPV3) > 0) sb.append("VFPV3 "); if ((cachedFeature & FEATURE_ARM_NEON) > 0) sb.append("NEON "); if ((cachedFeature & FEATURE_X86) > 0) sb.append("X86 "); if ((cachedFeature & FEATURE_MIPS) > 0) sb.append("MIPS "); cachedFeatureString = sb.toString(); } Log.d("GET CPU FATURE: %s", cachedFeatureString); return cachedFeature; }
public void onCompletion(MediaPlayer mp) { Log.d("onCompletion"); mCurrentState = STATE_PLAYBACK_COMPLETED; mTargetState = STATE_PLAYBACK_COMPLETED; if (mMediaController != null) mMediaController.hide(); if (mOnCompletionListener != null) mOnCompletionListener.onCompletion(mMediaPlayer); } };
public void suspend() { if (isInPlaybackState()) { release(false); mCurrentState = STATE_SUSPEND_UNSUPPORTED; Log.d("Unable to suspend video. Release MediaPlayer."); } }
public void scanDirectories(String[] directories) { try { long start = System.currentTimeMillis(); prescan(null); long prescan = System.currentTimeMillis(); for (int i = 0; i < directories.length; i++) { if (!TextUtils.isEmpty(directories[i])) { directories[i] = ContextUtils.fixLastSlash(directories[i]); processDirectory(directories[i], MediaFile.sFileExtensions); } } long scan = System.currentTimeMillis(); postscan(directories); long end = System.currentTimeMillis(); Log.d(" prescan time: %dms", prescan - start); Log.d(" scan time: %dms", scan - prescan); Log.d("postscan time: %dms", end - scan); Log.d(" total time: %dms", end - start); } catch (SQLException e) { Log.e("SQLException in MediaScanner.scan()", e); } catch (UnsupportedOperationException e) { Log.e("UnsupportedOperationException in MediaScanner.scan()", e); } catch (RemoteException e) { Log.e("RemoteException in MediaScanner.scan()", e); } }
public boolean onError(MediaPlayer mp, int framework_err, int impl_err) { Log.d("Error: %d, %d", framework_err, impl_err); mCurrentState = STATE_ERROR; mTargetState = STATE_ERROR; if (mMediaController != null) mMediaController.hide(); if (mOnErrorListener != null) { if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err)) return true; } if (getWindowToken() != null) { int message = framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK ? getResources().getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", mContext.getPackageName()): getResources().getIdentifier("VideoView_error_text_unknown", "string", mContext.getPackageName()); new AlertDialog.Builder(mContext).setTitle(getResources().getIdentifier("VideoView_error_title", "string", mContext.getPackageName())).setMessage(message).setPositiveButton(getResources().getIdentifier("VideoView_error_button", "string", mContext.getPackageName()), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { if (mOnCompletionListener != null) mOnCompletionListener.onCompletion(mMediaPlayer); } }).setCancelable(false).show(); } return true; } };
public void hide() { if (mAnchor == null) return; if (mShowing) { try { mHandler.removeMessages(SHOW_PROGRESS); if (mFromXml) setVisibility(View.GONE); else mWindow.dismiss(); } catch (IllegalArgumentException ex) { Log.d("MediaController already removed"); } mShowing = false; if (mHiddenListener != null) mHiddenListener.onHidden(); } }
@Override public boolean onInfo(MediaPlayer mp, int what, int extra) { Log.d("onInfo: (%d, %d)", what, extra); if(MediaPlayer.MEDIA_INFO_UNKNOW_TYPE == what){ Log.e(" VITAMIO--TYPE_CHECK stype not include onInfo mediaplayer unknow type "); } if(MediaPlayer.MEDIA_INFO_FILE_OPEN_OK == what){ long buffersize=mMediaPlayer.audioTrackInit(); mMediaPlayer.audioInitedOk(buffersize); } Log.d("onInfo: (%d, %d)", what, extra); if (mOnInfoListener != null) { mOnInfoListener.onInfo(mp, what, extra); } else if (mMediaPlayer != null) { if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) { mMediaPlayer.pause(); if (mMediaBufferingIndicator != null) mMediaBufferingIndicator.setVisibility(View.VISIBLE); } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) { mMediaPlayer.start(); if (mMediaBufferingIndicator != null) mMediaBufferingIndicator.setVisibility(View.GONE); } } return true; } };
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { Log.d("onVideoSizeChanged: (%dx%d)", width, height); mVideoWidth = mp.getVideoWidth(); mVideoHeight = mp.getVideoHeight(); mVideoAspectRatio = mp.getVideoAspectRatio(); if (mVideoWidth != 0 && mVideoHeight != 0) setVideoLayout(mVideoLayout, mAspectRatio); } };
Log.d("VIDEO: %dx%dx%f, Surface: %dx%d, LP: %dx%d, Window: %dx%dx%f", mVideoWidth, mVideoHeight, mVideoAspectRatio, mSurfaceWidth, mSurfaceHeight, lp.width, lp.height, windowWidth, windowHeight, windowRatio); mVideoLayout = layout; mAspectRatio = aspectRatio;
mMediaPlayer.setOnTimedTextListener(mTimedTextListener); Log.d(" set user optional -------- "); HashMap<String, String> options = new HashMap<String, String>(); options.put("rtsp_transport", "tcp"); // udp
public void onPrepared(MediaPlayer mp) { Log.d("onPrepared");
@Override public void onSeekComplete(MediaPlayer mp) { Log.d("onSeekComplete"); if (mOnSeekCompleteListener != null) mOnSeekCompleteListener.onSeekComplete(mp); } };
if (!vvo_loaded) { vvo_loaded = loadVAO_native_lib( LIB_ROOT , "libvvo.j.so"); Log.d("FALLBACK TO VVO JNI " + vvo_loaded);
public void onCompletion(MediaPlayer mp) { Log.d("onCompletion"); mCurrentState = STATE_PLAYBACK_COMPLETED; mTargetState = STATE_PLAYBACK_COMPLETED; if (mMediaController != null) mMediaController.hide(); if (mOnCompletionListener != null) mOnCompletionListener.onCompletion(mMediaPlayer); } };
public void suspend() { if (isInPlaybackState()) { release(false); mCurrentState = STATE_SUSPEND_UNSUPPORTED; Log.d("Unable to suspend video. Release MediaPlayer."); } }
public void suspend() { if (isInPlaybackState()) { release(false); mCurrentState = STATE_SUSPEND_UNSUPPORTED; Log.d("Unable to suspend video. Release MediaPlayer."); } }
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { Log.d("onVideoSizeChanged: (%dx%d)", width, height); mVideoWidth = mp.getVideoWidth(); mVideoHeight = mp.getVideoHeight(); mVideoAspectRatio = mp.getVideoAspectRatio(); if (mVideoWidth != 0 && mVideoHeight != 0) setVideoLayout(mVideoLayout, mAspectRatio); } };