android tv 时间错误,Android为TV端助力 MediaPlayer 错误代码(error code)总结 转载

public static final int MEDIA_ERROR_IO

Added in API level 17 File or network related operation errors.

Constant Value: -1004 (0xfffffc14)

public static final int MEDIA_ERROR_MALFORMED

Added in API level 17 Bitstream is not conforming to the related coding standard or file spec.

Constant Value: -1007 (0xfffffc11)

public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK

Added in API level 3 The video is streamed and its container is not valid for progressive playback i.e the video's index (e.g moov atom) is not at the start of the file.

See Also

MediaPlayer.OnErrorListener

Constant Value: 200 (0x000000c8)

public static final int MEDIA_ERROR_SERVER_DIED

Added in API level 1 Media server died. In this case, the application must release the MediaPlayer object and instantiate a new one.

See Also

MediaPlayer.OnErrorListener

Constant Value: 100 (0x00000064)

public static final int MEDIA_ERROR_TIMED_OUT

Added in API level 17 Some operation takes too long to complete, usually more than 3-5 seconds.

Constant Value: -110 (0xffffff92)

public static final int MEDIA_ERROR_UNKNOWN

Added in API level 1 Unspecified media player error.

See Also

MediaPlayer.OnErrorListener

Constant Value: 1 (0x00000001)

public static final int MEDIA_ERROR_UNSUPPORTED

Added in API level 17 Bitstream is conforming to the related coding standard or file spec, but the media framework does not support the feature.

Constant Value: -1010 (0xfffffc0e)

public static final int MEDIA_INFO_BAD_INTERLEAVING

Added in API level 3 Bad interleaving means that a media has been improperly interleaved or not interleaved at all, e.g has all the video samples first then all the audio ones. Video is playing but a lot of disk seeks may be happening.

See Also

MediaPlayer.OnInfoListener

Constant Value: 800 (0x00000320)

public static final int MEDIA_INFO_BUFFERING_END

Added in API level 9 MediaPlayer is resuming playback after filling buffers.

See Also

MediaPlayer.OnInfoListener

Constant Value: 702 (0x000002be)

public static final int MEDIA_INFO_BUFFERING_START

Added in API level 9 MediaPlayer is temporarily pausing playback internally in order to buffer more data.

See Also

MediaPlayer.OnInfoListener

Constant Value: 701 (0x000002bd)

public static final int MEDIA_INFO_METADATA_UPDATE

Added in API level 5 A new set of metadata is available.

See Also

MediaPlayer.OnInfoListener

Constant Value: 802 (0x00000322)

public static final int MEDIA_INFO_NOT_SEEKABLE

Added in API level 3 The media cannot be seeked (e.g live stream)

See Also

MediaPlayer.OnInfoListener

Constant Value: 801 (0x00000321)

public static final int MEDIA_INFO_UNKNOWN

Added in API level 3 Unspecified media player info.

See Also

MediaPlayer.OnInfoListener

Constant Value: 1 (0x00000001)

public static final int MEDIA_INFO_VIDEO_RENDERING_START

Added in API level 17 The player just pushed the very first video frame for rendering.

See Also

MediaPlayer.OnInfoListener

Constant Value: 3 (0x00000003)

public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING

Added in API level 3 The video is too complex for the decoder: it can't decode frames fast enough. Possibly only the audio plays fine at this stage.

See Also

MediaPlayer.OnInfoListener

Constant Value: 700 (0x000002bc)

mediaPlayer.setOnErrorListener(new OnErrorListener() {

@Override

public boolean onError(MediaPlayer mp, int what, int extra) {

Log.d(TAG, "OnError - Error code: " + what + " Extra code: " + extra);

switch (what) {

case -1004:

Log.d(TAG, "MEDIA_ERROR_IO");

break;

case -1007:

Log.d(TAG, "MEDIA_ERROR_MALFORMED");

break;

case 200:

Log.d(TAG, "MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK");

break;

case 100:

Log.d(TAG, "MEDIA_ERROR_SERVER_DIED");

break;

case -110:

Log.d(TAG, "MEDIA_ERROR_TIMED_OUT");

break;

case 1:

Log.d(TAG, "MEDIA_ERROR_UNKNOWN");

break;

case -1010:

Log.d(TAG, "MEDIA_ERROR_UNSUPPORTED");

break;

}

switch (extra) {

case 800:

Log.d(TAG, "MEDIA_INFO_BAD_INTERLEAVING");

break;

case 702:

Log.d(TAG, "MEDIA_INFO_BUFFERING_END");

break;

case 701:

Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE");

break;

case 802:

Log.d(TAG, "MEDIA_INFO_METADATA_UPDATE");

break;

case 801:

Log.d(TAG, "MEDIA_INFO_NOT_SEEKABLE");

break;

case 1:

Log.d(TAG, "MEDIA_INFO_UNKNOWN");

break;

case 3:

Log.d(TAG, "MEDIA_INFO_VIDEO_RENDERING_START");

break;

case 700:

Log.d(TAG, "MEDIA_INFO_VIDEO_TRACK_LAGGING");

break;

}

return false;

}

});

内容来源于网络如有侵权请私信删除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值