获取支持codeC的Andr​​oid设备 [英] Get supported Codec for Android device

查看:189
本文介绍了获取支持codeC的Andr​​oid设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法问它支持什么编码的音频和视频codeCS Android设备?

我发现,不支持某些列为强制性的codeCS设备 <一href="http://developer.android.com/guide/appendix/media-formats.html">http://developer.android.com/guide/appendix/media-formats.html 而且似乎是支持更多codeC没有被列入其中的设备。

解决方案
  

有没有办法问它支持什么编码的音频和视频codeCS Android设备?

我真的很希望有,但是没有,至少到ICS。

果冻豆提供了一个媒体codeC 类。虽然它并没有给我的支持codeCS清单,它确实有 createEn coderByType(),在那里你传递一个MIME类型。 presumably,这将抛出一个的RuntimeException 或返回如果不支持所需的MIME类型。我不能答应,仅仅因为媒体codeC 报道说,一间codeR可用,它是保证,比如说, MediaRecorder 。

Is there a way to ask an Android device what audio and video Codecs it supports for encoding?

I found devices that do not support some of the codecs listed as mandatory in http://developer.android.com/guide/appendix/media-formats.html and there seem to be devices supporting additional codec not listed there.

解决方案

Is there a way to ask an Android device what audio and video Codecs it supports for encoding?

I really wish there were, but there is not, at least through ICS.

Jelly Bean offers a MediaCodec class. While it does not have a "give me a list of supported codecs", it does have createEncoderByType(), where you pass in a MIME type. Presumably, that will throw a RuntimeException or return null if your desired MIME type is not supported. And I cannot promise that just because MediaCodec reports that an encoder is available that it is guaranteed to work from, say, MediaRecorder.

这篇关于获取支持codeC的Andr​​oid设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆