问题
When I enumerate all the media codecs on my device, I noticed that mime type "video/avc" is supported by the following encoders:
OMX.qcom.video.encoder.avc
OMX.google.h264.encoder
When you call MediaCodec.CreateEncoderByType()
, how does Android decide which encoder to pick?
Also, besides Google's encoder, many devices may have another encoder specific to the hardware, such as the one from Qualcomm in my case. Generally speaking, should one choose native encoder over the one from Google? Regards.
回答1:
Tried it on a few different devices. It appears the native encoder always appears before the one from Google. This is the one that gets picked up. I guess native encoder is more optimized as it has more knowledge of the hardware.
来源:https://stackoverflow.com/questions/38859106/mime-type-video-avc-supported-by-multiple-encoders-on-my-android-device