2

I have been trying to list out all supported codec in android device using IOMX as shown here by binding with media player service. I got my code working and get the list of components. But I observed that there were no encoder component. Only all decoder component were listed. Then I go to inbuilt camera application provided by android and started recording video which was stored in mp4 file format. When I check the mp4 file's codec information from VLC player, It showed "H264 mpeg4 part10 avc". So here comes my doubt. If there is no component listed for h264/avc encoding then how android can encode frames in h264 format?

Any Suggestion? Thanks.

SKRUY
  • 69
  • 13
sam18
  • 631
  • 1
  • 10
  • 24

1 Answers1

0

In android distribution, there is a suite of codecs that are bundled by Google commonly referred to as "plain vanilla codecs". In case of H.264, there is an encoder bundled, whose sources are at frameworks/av/media/libstagefright/codecs/avc/enc/. Hence, when you encode from the camera, this default codec is used to encode the frames. To verify the same, you could enable the logs in OMXCodec or ACodec and observe that the name of the encoder component is OMX.google.h264.encoder.

The complete list of codecs is available in SoftOMXPlugin.cpp at frameworks/av/media/libstagefright/omx/

Ganesh
  • 5,880
  • 2
  • 36
  • 54
  • Yes, you should be able to. From a Stagefright point of view, the software based plain vanilla component is similar to a user integrated component. – Ganesh Feb 26 '13 at 17:10
  • Do you suggest that it is better to select libstagefright compare to IOMX from media player service for media operations and component listing? – sam18 Feb 27 '13 at 04:09
  • Yes. For easier integration, please use either `OMXCodec` or `ACodec` objects to abstract your underlying codec. If your application is a higher level software, then you may want to consider `MediaCodec` object abstraction which is a layer above `ACodec`. – Ganesh Feb 27 '13 at 16:42