Unable to open Codec Engine on Beagle Board

Hi all

            I am working on Beagle board running Android on top of
it.I compiled the sample Video Encode application which is part of the
DMAI sample applications and i am able to encode video data present in
a file. I am using H.264 Encoder which runs remotely on the DSP
side.

            Now, my intention is to create a Shared Library out of the
sample video encode application and make use of it in my Android
application.In my Android app i will load the Shared Library(created
from video encode app) and i will call the corresponding JNI for
encoding the video data .

            So, i've renamed the main() function of the sample video
encode appl. as EncodeVideoData() and created a Shared Library(.so)
out of it.I've written a JNI for the EncodeVideoData() function and i
am calling it from my Android Application.

            Now the problem arises!!! I am Calling the JNI for
EncodeVideoData() from my Android Application and Control passes to
the EncodeVideoData(), which checks for a raw YUYY input file and then
other misc. parameters and then proceeds to open the Codec Engine via
Engine_open.I am failing at this point.The call to Engine_open() fails
telling "unable to open the code engine!!!".I checked the error code
returned by Engine_open() and found out that the application is unable
to load the DSP server image(cs.x64P) onto the DSP.
So my problem is how to tell the Android app. in which location it
should look for the server image.

            In normal case, the sample video encode application is
configured,built and compiled in such a way that the target 'C'
application looks for the DSP server image cs.x64P in its current
folder.The codec_engine_2_24/packages/ti/sdo/ce/Engine.xs file also
specifies that the "Target application will look for the DSP Server
image cs.x64P in its current directory".

            In my case the Target application is an Android
Application and its not able to find the location of DSP server image
and thus fails to load it into the DSP.I've placed the DSP server
image in the same folder where my Android app exists.Still no use.

           So has anyone of you tried encoding or decoding using DVSDK
from Android application side???

Thanks & Regards
Ananth

Ananth, likely the Engine_open() requires root.
Android Java-Activity/JNI code does not run as root.

On Android phones, (I don't know OxDroid well enough yet), this solved
by having the MediaPlayerService do all the heavy lifting. Alas, it's a
morasse of PV-related indirection header files, and it's hard to get it
to do new things.

We wound up builing our own service on top of the lower-level OMX/AVC
code, which we run as root and talk to the activity with binder.

aney wrote:

             In normal case, the sample video encode application is
configured,built and compiled in such a way that the target 'C'
application looks for the DSP server image cs.x64P in its current
folder.The codec_engine_2_24/packages/ti/sdo/ce/Engine.xs file also
specifies that the "Target application will look for the DSP Server
image cs.x64P in its current directory".

             In my case the Target application is an Android
Application and its not able to find the location of DSP server image
and thus fails to load it into the DSP.I've placed the DSP server
image in the same folder where my Android app exists.Still no use.

            So has anyone of you tried encoding or decoding using DVSDK
from Android application side???

recompile the app to use the codec server from a fixed path and make sure that path/server is world readable.

I know that all the demo apps put the codec server in a relative path,
but nothing stops you from setting a fixed path....