获取支持codeC的Android设备 [英] Get supported Codec for Android device
问题描述
有没有办法问它支持什么编码的音频和视频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的Android设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!