How to detect Android H.264 hardware acceleration capability

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

A large number, though not all, of Android devices support hardware acceleration of the H.264 video codec but not the VP8/VP9 codecs. To provide a higher quality user experience, we would like to select the codec that is hardware accelerated when possible. Hence, would like runtime detection of whether the specific device has H.264 hardware acceleration support or not and based on this will set the particular codecs that is used in the SDP for session negotiation of the webRTC peerconnection. I.e., if H.264 is supported with hardware then will set that as the higher priority codec as opposed to VP8/VP9. Any thoughts on this would be greatly appreciated.

profilepic.png
manpreet 2 years ago

Use the MediaCodecList API to iterate over the available encoders and decoders. Encoders whose name start with OMX.google. are SW codecs - any other codec can more or less be assumed to be a HW codec. The easiest is probably to use findEncoderForFormat (and findDecoderForFormat) and see what name this returns. If you need more detail, you can iterate through the list manually.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.