当前位置: 代码迷 >> 综合 >> Android查看支持硬编解码器(十二)
  详细解决方案

Android查看支持硬编解码器(十二)

热度:43   发布时间:2024-02-05 19:20:11.0
1.支持的软硬codec
/system/etc/media_codecs.xml
<MediaCodecs><Include href="media_codecs_google_audio.xml" /><Settings><Setting name="max-video-encoder-input-buffers" value="4" /><Setting name="supports-multiple-secure-codecs" value="false" /><Setting name="supports-secure-with-non-secure-codec" value="false" /></Settings><Decoders>//h264解码器<MediaCodec name="OMX.rk.video_decoder.avc" type="video/avc"><Quirk name="requires-allocate-on-input-ports" /><Quirk name="requires-allocate-on-output-ports" /><Limit name="size" max="4096x2160" min="176x144"/><Limit name="alignment" value="8x8"/><Limit name="block-size" value="16x16"/><Limit name="blocks-per-second" max="244800" min="1"/><Limit name="bitrate" range="1-10000000"/><Feature name="adaptive-playback"/><Limit name="concurrent-instances" max="6" /></MediaCodec>//h265解码器<MediaCodec name="OMX.rk.video_decoder.hevc" type="video/hevc"><Quirk name="requires-allocate-on-input-ports" /><Quirk name="requires-allocate-on-output-ports" /><Limit name="size" max="4096x2160" min="176x144"/><Limit name="alignment" value="8x8"/><Limit name="block-size" value="16x16"/><Limit name="blocks-per-second" max="244800" min="1"/><Limit name="bitrate" range="1-10000000"/><Feature name="adaptive-playback"/><Limit name="concurrent-instances" max="6" /></MediaCodec></Decoders><Encoders>//h264编码器<MediaCodec name="OMX.rk.video_encoder.avc" type="video/avc" ><Quirk name="requires-allocate-on-input-ports" /><Quirk name="requires-allocate-on-output-ports" /><Limit name="size" min="176x144" max="1920x1088" /><Limit name="alignment" value="16x8" /><Limit name="bitrate" range="1-40000000" /><Feature name="bitrate-modes" value="VBR,CBR" /><Limit name="concurrent-instances" max="4" /></MediaCodec></Encoders><Include href="media_codecs_rk_vpu.xml" /><Include href="media_codecs_google_video.xml" />
</MediaCodecs>2.软硬codec支持的详细参数,设备支持的具体profile和level等详细信息.
/system/etc/media_profiles.xml<EncoderProfile quality="480p" fileFormat="mp4" duration="30"><Video codec="h264"bitRate="256000"width="640"height="480"frameRate="15" /><Audio codec="aac"bitRate="61000"sampleRate="44100"channels="1" /></EncoderProfile><!--  If your sensor driver don't support 480p stream, Please turn off this element --><EncoderProfile quality="480p" fileFormat="mp4" duration="30"><Video codec="h264"bitRate="256000"width="720"height="480"frameRate="12" /><Audio codec="aac"bitRate="61000"sampleRate="44100"channels="1" /></EncoderProfile>

 

  相关解决方案