Java Code Examples for android.media.MediaPlayer#MEDIA_INFO_SUBTITLE_TIMED_OUT
The following examples show how to use
android.media.MediaPlayer#MEDIA_INFO_SUBTITLE_TIMED_OUT .
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: PlaybackActivity.java From PLDroidShortVideo with Apache License 2.0 | 5 votes |
@Override public boolean onInfo(MediaPlayer mp, int what, int extra) { Log.i(TAG, "OnInfo, what = " + what + ", extra = " + extra); switch (what) { case MediaPlayer.MEDIA_INFO_UNKNOWN: break; case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: break; case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.i(TAG, "video rendering start, ts = " + extra); break; case MediaPlayer.MEDIA_INFO_BUFFERING_START: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_BUFFERING_START"); break; case MediaPlayer.MEDIA_INFO_BUFFERING_END: Log.i(TAG, "onInfo: MEDIA_INFO_BUFFERING_END"); break; case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.i(TAG, "onInfo: MEDIA_INFO_BAD_INTERLEAVING"); break; case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.i(TAG, "onInfo: MEDIA_INFO_NOT_SEEKABLE"); break; case MediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_METADATA_UPDATE"); break; case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE"); break; case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT "); break; default: break; } return true; }
Example 2
Source File: PlaybackActivity.java From PLDroidShortVideo with Apache License 2.0 | 5 votes |
@Override public boolean onInfo(MediaPlayer mp, int what, int extra) { Log.i(TAG, "OnInfo, what = " + what + ", extra = " + extra); switch (what) { case MediaPlayer.MEDIA_INFO_UNKNOWN: break; case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: break; case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START: Log.i(TAG, "video rendering start, ts = " + extra); break; case MediaPlayer.MEDIA_INFO_BUFFERING_START: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_BUFFERING_START"); break; case MediaPlayer.MEDIA_INFO_BUFFERING_END: Log.i(TAG, "onInfo: MEDIA_INFO_BUFFERING_END"); break; case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: Log.i(TAG, "onInfo: MEDIA_INFO_BAD_INTERLEAVING"); break; case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE: Log.i(TAG, "onInfo: MEDIA_INFO_NOT_SEEKABLE"); break; case MediaPlayer.MEDIA_INFO_METADATA_UPDATE: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_METADATA_UPDATE"); break; case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE"); break; case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: Log.i(TAG, "onInfo: MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT "); break; default: break; } return true; }
Example 3
Source File: SysMediaPlayer.java From PlayerBase with Apache License 2.0 | 4 votes |
public boolean onInfo(MediaPlayer mp, int arg1, int arg2) { switch (arg1) { case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: PLog.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:"); break; case MediaPlayer.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 MediaPlayer.MEDIA_INFO_BUFFERING_START: PLog.d(TAG, "MEDIA_INFO_BUFFERING_START:" + arg2); Bundle bundle = BundlePool.obtain(); bundle.putLong(EventKey.LONG_DATA, mBandWidth); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_START,bundle); break; case MediaPlayer.MEDIA_INFO_BUFFERING_END: PLog.d(TAG, "MEDIA_INFO_BUFFERING_END:" + arg2); Bundle bundle1 = BundlePool.obtain(); bundle1.putLong(EventKey.LONG_DATA, mBandWidth); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BUFFERING_END,bundle1); break; case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: PLog.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_BAD_INTERLEAVING,null); break; case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE: PLog.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_NOT_SEEK_ABLE,null); break; case MediaPlayer.MEDIA_INFO_METADATA_UPDATE: PLog.d(TAG, "MEDIA_INFO_METADATA_UPDATE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_METADATA_UPDATE,null); break; case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: PLog.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_UNSUPPORTED_SUBTITLE,null); break; case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: PLog.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:"); submitPlayerEvent(OnPlayerEventListener.PLAYER_EVENT_ON_SUBTITLE_TIMED_OUT,null); break; case MEDIA_INFO_NETWORK_BANDWIDTH: PLog.d(TAG,"band_width : " + arg2); mBandWidth = arg2 * 1000; break; } return true; }
Example 4
Source File: ErrorFactory.java From no-player with Apache License 2.0 | 4 votes |
@SuppressWarnings({"PMD.StdCyclomaticComplexity", "PMD.CyclomaticComplexity"}) public static NoPlayer.PlayerError createErrorFrom(int type, int extra) { String message = String.valueOf(extra); switch (type) { case MediaPlayer.MEDIA_ERROR_IO: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_IO, message); case MediaPlayer.MEDIA_ERROR_MALFORMED: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_MALFORMED, message); case MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK, message); case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_INFO_NOT_SEEKABLE, message); case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_SUBTITLE_TIMED_OUT, message); case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE: return new NoPlayerError(PlayerErrorType.SOURCE, DetailErrorType.MEDIA_PLAYER_UNSUPPORTED_SUBTITLE, message); case MediaPlayer.MEDIA_ERROR_SERVER_DIED: return new NoPlayerError(PlayerErrorType.DRM, DetailErrorType.MEDIA_PLAYER_SERVER_DIED, message); case MediaPlayer.PREPARE_DRM_STATUS_PREPARATION_ERROR: return new NoPlayerError(PlayerErrorType.DRM, DetailErrorType.MEDIA_PLAYER_PREPARE_DRM_STATUS_PREPARATION_ERROR, message); case MediaPlayer.PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR: return new NoPlayerError(PlayerErrorType.DRM, DetailErrorType.MEDIA_PLAYER_PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR, message); case MediaPlayer.PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR: return new NoPlayerError(PlayerErrorType.DRM, DetailErrorType.MEDIA_PLAYER_PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR, message); case MediaPlayer.MEDIA_ERROR_TIMED_OUT: return new NoPlayerError(PlayerErrorType.CONNECTIVITY, DetailErrorType.MEDIA_PLAYER_TIMED_OUT, message); case MediaPlayer.MEDIA_INFO_AUDIO_NOT_PLAYING: return new NoPlayerError(PlayerErrorType.RENDERER_DECODER, DetailErrorType.MEDIA_PLAYER_INFO_AUDIO_NOT_PLAYING, message); case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING: return new NoPlayerError(PlayerErrorType.RENDERER_DECODER, DetailErrorType.MEDIA_PLAYER_BAD_INTERLEAVING, message); case MediaPlayer.MEDIA_INFO_VIDEO_NOT_PLAYING: return new NoPlayerError(PlayerErrorType.RENDERER_DECODER, DetailErrorType.MEDIA_PLAYER_INFO_VIDEO_NOT_PLAYING, message); case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING: return new NoPlayerError(PlayerErrorType.RENDERER_DECODER, DetailErrorType.MEDIA_PLAYER_INFO_VIDEO_TRACK_LAGGING, message); default: return new NoPlayerError(PlayerErrorType.UNKNOWN, DetailErrorType.MEDIA_PLAYER_UNKNOWN, message); } }