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;
}
});
Android为TV端助力 MediaPlayer 错误代码(error code)总结 转载的更多相关文章
- Android为TV端助力 MediaPlayer API大全已经方法详解(转载)
通过这张图,我们可以知道一个MediaPlayer对象有以下的状态: 1)当一个MediaPlayer对象被刚刚用new操作符创建或是调用了reset()方法后,它就处于Idle状态.当调用了rele ...
- Android为TV端助力 MediaPlayer的一些使用方法简历
这里提供一些MediaPlayer的简单方法,方便以后熟练的使用它! 1)如何获得MediaPlayer实例: 可以使用直接new的方式: MediaPlayer mp = new MediaPlay ...
- Android为TV端助力之Webview与JS双向交互
package com.hhzt.iptv.adservice; import android.app.Activity;import android.graphics.Bitmap;import a ...
- Android为TV端助力 转载:RecyclerView分页加载
package com.android.ryane.pulltoloaddata_recyclerview; import android.os.Handler;import android.os.L ...
- Android为TV端助力(转载)
作者地址http://www.jianshu.com/u/63915ef020e2 针对Android Tv的自定义RecyclerView 作者 wenju_song 关注 2016.12.09 1 ...
- Android为TV端助力 转载:android MVC设计模式
Controller控制器 import android.app.Dialog; import android.app.ProgressDialog; import android.os.Bundle ...
- Android为TV端助力 不需要Socket的跨进程推送消息AIDL!
上篇介绍了跨进程实时通讯http://www.cnblogs.com/xiaoxiaing/p/5818161.html 但是他有个缺点就是服务端无法推送消息给客户端,今天这篇文章主要说的就是服务器推 ...
- Android为TV端助力 eclipse出现感叹号的解决办法
当eclipse导入项目出现红叉但无提示错误时,去看:1>菜单路径----Window/Show View/Console2>菜单路径----Window/Show View/Error ...
- Android为TV端助力之WebView开发踩坑一
在Android清单配置文件里面 自定义application时,在4.4系统上面不能加上一个属性,见下图 否则界面将不会显示任何数据,在更高或者更低的系统上面没有测试!
随机推荐
- 北大开源全新中文分词工具包:准确率远超THULAC、结巴分词
最近,北大开源了一个中文分词工具包,它在多个分词数据集上都有非常高的分词准确率.其中广泛使用的结巴分词误差率高达 18.55% 和 20.42,而北大的 pkuseg 只有 3.25% 与 4.32% ...
- [Swift]LeetCode188. 买卖股票的最佳时机 IV | Best Time to Buy and Sell Stock IV
Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...
- [Swift]LeetCode395. 至少有K个重复字符的最长子串 | Longest Substring with At Least K Repeating Characters
Find the length of the longest substring T of a given string (consists of lowercase letters only) su ...
- [Swift]LeetCode973. 最接近原点的 K 个点 | K Closest Points to Origin
We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the d ...
- RxJS简介
函数式编程 1.声明式(Declarativ) 和声明式相对应的编程⽅式叫做命令式编程(ImperativeProgramming),命令式编程也是最常见的⼀种编程⽅式. //命令式编程: funct ...
- RabbitMQ面试题
1.为什么要引入MQ系统,直接读写数据库不行吗?其实就是问问你消息队列都有哪些使用场景,然后你项目里具体是什么场景,说说你在这个场景里用消息队列是什么? 面试官问你这个问题,期望的一个回答是说,你们公 ...
- C# listview展示表格格式
有时候我们需要展示表格格式的数据,首先想到的是用datagridview控件,比如更改datagridview某一行的数据,这样操作起来就比较麻烦,而listview属于轻量级,刷新和更改相对来说效率 ...
- Zabbix通过IPMI监控HPE服务器硬件
IPMI是智能型平台管理接口(Intelligent Platform Management Interface)的缩写,是管理基于 Intel结构的企业系统中所使用的外围设备采用的一种工业标准,该标 ...
- Zara带你快速入门WPF(4)---Command与功能区控件
前言:许多数据驱动的应用程序都包含菜单和工具栏或功能区控件,允许用户控制操作,在WPF中,也可以使用功能区控件,所以这里介绍菜单和功能区控件. 一.菜单控件 在WPF中,菜单很容易使用Menu和Men ...
- Leetcode 10. 正则表达式匹配 - 题解
版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C#版 - L ...