Problems moving from Loaded state to Idle

Hello, i’m trying to use Tegra hardware to decode h.264 in an android environment.

I dlopened “/system/lib/” on asus transformer.

I’ve been struggling with moving from Loaded state into Idle, with no success so far :confused:

The “OMX_SendCommand(decoder_handle, OMX_CommandStateSet, OMX_StateIdle, 0)” itself returns fine, but very soon later the callback event handler is then called with Error event of type OMX_ErrorInsufficientResources.

(And i never really move into Idle state…)

What are the first things i need to look for ?

I tried using OMX_AllocateBuffer for both input and output files,
I also tried using OMX_UseBuffer instead.

Searching for solutions, i noticed chromium code for their
Where in some part they set fake buffers, just in order to move from Loaded to Idle state.

Here’s the comment they have there:
“// Fill the component with fake output buffers. This seems to be required for
// the component to move from Loaded to Idle. How bogus.”

I tried that and it didn’t work either.

Here’s a link to my code:

Hopefully my error will be more obvious to an expert in using OpenMAX IL.

Please help me with this one, starting to go crazy here… :wink:

I have the same problem.
Its because of OpenMax IL needs system privilege.
But the android app doesn’t have it :frowning:

So the error is shown OMX_ErrorInsufficientResources.

I Can go to loaded state to Idle in Android Shell (as su in console)
but with app it doesn’t…

Looking for a solution for it… How to get system privilege for android app? or any other workaround?

Thanks for the reply!

System privileges is quite tricky to get (for a non custom android build…)

Strangely it does work for me on android 2.x on Motorola ATRIX 4G,
so i assume it’s a change that started in 3.x for tablets.