views:

497

answers:

2

I want to use the codecs in Android from my application. For now I just want to use the H.264 codec for testing, unless the mp3 or aac codecs provide functions for sending the audio to the device's speaker in which case I would prefer one of those.

I have the NDK installed along with Cygwin, GNU Make, and GNU Awk. I can't figure out what I need to do from here though. I'm downloading the entire OpenCORE tree right now but I don't even know how to build it or make Eclipse plugin know it needs to include the files.

An example or a tutorial would be much appreciated.

EDIT:

It looks like I can use JNI like P/Invoke which would mean I don't have to build the OpenCORE libraries myself. However, I can't find any documentation on the names of the libraries I need to load.

I'm also confused as to how to do it. I'm looking at http://www.koushikdutta.com/2009/01/jni-in-android-and-foreword-of-why-jni.html and I don't understand what the purpose of writing a library to access a library is. Couldn't you just use something like System.loadLibrary("opencore.so")?

A: 

You cannot build opencore seperately. It has to be built with whole source code. What are you trying to acheive. If you just want to play a video/audio, use VideoView or MediaPlayer object.

Vinay
I cannot use the MediaPlayer object. It is far too limited. The only parameters it can take are a FileDescriptor or a String pointing to either a local file, an HTTP resource, or an RTSP resource. I need to be able to pick up a multicast stream and play it on the device.
Mr. Ambiguous
Then You have to build Android OS itself by modifying the OpenCore
Vinay
A: 

Hi,

Build the Android source and use the headers and the static library from it. This will propel you straight to the zone of unsupported APIs.

ognian
But how do I build it? That's what Make is for right? I'm entering `make Android.mk` into Cygwin and it's saying `make: Nothing to be done for 'Android.mk'.`
Mr. Ambiguous
You can't build Android on Microsoft OS host, check out the instructions to build on Linux or Mac: http://source.android.com/source/download.html
ognian