3

I'm very new to Android. Now i need to work on Adding my own codec to Android.I mean, I want to know what all the steps i need to take to add my own codec to android.

I'm very fresh to this i need some basic things, so can someone please explain the steps I need to take in order to add a new codec to Android?

sawa
  • 165,429
  • 45
  • 277
  • 381
NewBee
  • 69
  • 2
  • 4
  • Don't just ask the same exact question if you don't get an answer in a few hours. Edit the original to add more information. – Bill the Lizard Mar 04 '11 at 13:33
  • Can you explain some things about your codec specifically. What language is it written in? What A/V formats does it support. I would imagine that you would be looking at an android NDK implementation. [VLC](http://wiki.videolan.org/AndroidCompile) has been porting over a lot of codecs within their libvlc library. That is probably where you want to get started. – shibbybird Apr 09 '12 at 17:34

2 Answers2

3

This is virtually impossible to do in a portable way as all audio and video codecs are compiled at the platform level (due to the fact that most of the time they require hardware specific acceleration)

If you are only interested on this working on a specific hardware platform and have an unlocked bootloader (So you can boot a custom build of Android) you can compile the full Android platform from scratch using the AOSP as a base.

Depending on which version of Android you're targeting you're looking at adding code to either Opencore or Stagefright (The subsystems that Android uses for A/V decoding and parsing) here you can add audio decoders, audio encoders, video encoders, video decoders and container parsers.

Here is some discussion of adding to Stagefright:

http://freepine.blogspot.com/2010/01/overview-of-stagefrighter-player.html

http://groups.google.com/group/android-porting/msg/5d88e76845a22bbb

However unless the encoding scheme you wish to support is very simple (What are you wanting to add?) it is likely to be too CPU intensive for most Android devices to run without being able to offload some of the work to another system (like the radio chipset or the GPU).

CMF
  • 114
  • 2
  • Hello CMF, i'm compiling full Android , Tell me how and where to add my codec before compiling android source, – NewBee Mar 07 '11 at 04:54
  • I want add my own codec while compiling android source.. Please can you explain what all the steps I need to take. My client will be giving his own codec to me I need to add that to android. – NewBee Mar 07 '11 at 06:51
0

In Android Framework, mediacodec is implemented as Stagefright, a media playback engine at the native level that has built-in software-based codecs for popular media formats. Stagefright also supports integration with custom hardware codecs provided as OpenMAX component. Here is the article which summaries the steps. CHECK HERE

josedlujan
  • 5,357
  • 2
  • 27
  • 49
  • Without summarizing the steps themselves here, this is effectively a link-only answer. Also, please be careful with links to your own site; [overt self-promotion is not allowed here](https://stackoverflow.com/help/behavior). – S.L. Barth is on codidact.com Sep 19 '17 at 14:48