public boolean isSupportMediaCodecHardDecoder(){
boolean isHardcode = false;
//读取系统配置文件/system/etc/media_codecc.xml
File file = new File("/system/etc/media_codecs.xml");
InputStream inFile = null;
try {
inFile = new FileInputStream(file);
} catch (Exception e) {
// TODO: handle exception
} if(inFile != null) {
XmlPullParserFactory pullFactory;
try {
pullFactory = XmlPullParserFactory.newInstance();
XmlPullParser xmlPullParser = pullFactory.newPullParser();
xmlPullParser.setInput(inFile, "UTF-8");
int eventType = xmlPullParser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT) {
String tagName = xmlPullParser.getName();
switch (eventType) {
case XmlPullParser.START_TAG:
if ("MediaCodec".equals(tagName)) {
String componentName = xmlPullParser.getAttributeValue(0); if(componentName.startsWith("OMX."))
{
if(!componentName.startsWith("OMX.google."))
{
isHardcode = true;
}
}
}
}
eventType = xmlPullParser.next();
}
} catch (Exception e) {
// TODO: handle exception
}
}
return isHardcode;
}

最新文章

  1. IOS FMDB 获取数据库表和表中的数据
  2. 【转】MyEclipse 2015优化技巧
  3. Windows 8.1 应用再出发 (WinJS) - 创建一个简单项目
  4. Leetcode: Random Pick Index
  5. SQL静态
  6. Blackhat EU 2013 黑客大会(Full Schedule for Black Hat USA 2013)
  7. VC5509的通用GEL代码
  8. linux网络相关
  9. 【转】使用 Auto Layout 的典型痛点和技巧
  10. linux学习之(五)-linux文解压、压缩、安装
  11. Bootstrap提示框
  12. Unity PUN插件多人在线同步角色坐标旋转角度和动作
  13. 7.20 Codeforces Beta Round #8
  14. Sublime text 2/3 [Decode error - output not utf-8] 完美解决方法
  15. SQLite与FMDB使用中区别
  16. CSS选择器之基本选择器总结
  17. Link-Cut Tree(LCT)&TopTree讲解
  18. SURF算法
  19. 百度地图POI数据爬取,突破百度地图API爬取数目“400条“的限制11。
  20. python-day13--装饰器

热门文章

  1. uva 11212
  2. xvfb 初步探究
  3. ASP.NET 常用内置对象详解-----Response
  4. MongoDB学习笔记(一)
  5. Bootstrap验证控件的使用
  6. ifconfig 源码
  7. Codeforces 358 D. Dima and Hares
  8. oc深坑測试题及其答案
  9. Qt线程同步操作用QWaitCondition QMutex
  10. 一致性哈希算法(consistent hashing)样例+測试。