当前位置: 首页>>代码示例>>Java>>正文


Java MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING属性代码示例

本文整理汇总了Java中android.media.MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING属性的典型用法代码示例。如果您正苦于以下问题:Java MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING属性的具体用法?Java MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING怎么用?Java MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.media.MediaPlayer的用法示例。


在下文中一共展示了MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onInfo

public boolean onInfo(MediaPlayer mp, int arg1, int arg2) {
                    switch (arg1) {
                        case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING:
                            Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:");
                            break;
                        case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
//                            Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:" + " renderView == SurfaceView : " + (mCurrentRender==RENDER_SURFACE_VIEW));
                            Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START");
                            mSeekWhenPrepared = 0;
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_RENDER_START,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BUFFERING_START:
                            Log.d(TAG, "MEDIA_INFO_BUFFERING_START:");
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_BUFFERING_START,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BUFFERING_END:
                            Log.d(TAG, "MEDIA_INFO_BUFFERING_END:");
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_BUFFERING_END,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING:
                            Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:");
                            break;
                        case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE:
                            Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_METADATA_UPDATE:
                            Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE:
                            Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT:
                            Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:");
                            break;
                    }
                    return true;
                }
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:37,代码来源:DefaultVideoView.java

示例2: onInfo

public boolean onInfo(MediaPlayer mp, int arg1, int arg2) {
                    switch (arg1) {
                        case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING:
                            Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING:");
                            break;
                        case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
//                            Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START:" + " renderView == SurfaceView : " + (mCurrentRender==RENDER_SURFACE_VIEW));
                            Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START");
                            startSeekPos = 0;
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_RENDER_START,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BUFFERING_START:
                            Log.d(TAG, "MEDIA_INFO_BUFFERING_START:");
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_BUFFERING_START,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BUFFERING_END:
                            Log.d(TAG, "MEDIA_INFO_BUFFERING_END:");
                            onPlayerEvent(OnPlayerEventListener.EVENT_CODE_BUFFERING_END,null);
                            break;
                        case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING:
                            Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING:");
                            break;
                        case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE:
                            Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_METADATA_UPDATE:
                            Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE:
                            Log.d(TAG, "MEDIA_INFO_UNSUPPORTED_SUBTITLE:");
                            break;
                        case MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT:
                            Log.d(TAG, "MEDIA_INFO_SUBTITLE_TIMED_OUT:");
                            break;
                    }
                    return true;
                }
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:37,代码来源:DefaultDecoderPlayer.java

示例3: onInfo

@Override
public boolean onInfo(MediaPlayer mp, int what, int extra) {
    // 当一些特定信息出现或者警告时触发
    Log.d(TAG, "INFO = " + what + "/" + extra);
    switch (what) {
        case MediaPlayer.MEDIA_INFO_BAD_INTERLEAVING:
            Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING");
            break;
        case MediaPlayer.MEDIA_INFO_METADATA_UPDATE:
            Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE");
            break;
        case MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING:
            Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING");
            break;
        case MediaPlayer.MEDIA_INFO_NOT_SEEKABLE:
            Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE");
            break;
        case MediaPlayer.MEDIA_INFO_BUFFERING_START:
            Log.d(TAG, "MEDIA_INFO_BUFFERING_START");
            if (mVideoView.isPlaying()) {
                mVideoView.pause();
                mLoadingView.setVisibility(View.VISIBLE);
            }
            break;
        case MediaPlayer.MEDIA_INFO_BUFFERING_END:
            Log.d(TAG, "MEDIA_INFO_BUFFERING_END");
            mVideoView.start();
            mLoadingView.setVisibility(View.GONE);
            break;
        case MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START:
            Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START");
            mLoadingView.setVisibility(View.GONE);
            break;
    }
    return true;
}
 
开发者ID:liying2008,项目名称:Simpler,代码行数:36,代码来源:VideoPlayerActivity.java


注:本文中的android.media.MediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。