Page 1 of 1

stuck getting omx to shutdown/startup with camera component

Posted: Sat Nov 09, 2013 11:15 am
by wibble82

Just posted this in gfx forum, but wasn't sure if it was better placed in camera section...

I'm writing some code to try and access the camera component. I've taken a fair bit from various sources and it almost works. My current and final issue is that open mx seems to lock up (normally inside OMX_GetState, but I think it happens at other points), almost consistently on my 3rd run of the application. Once this has happened the program can't be shutdown (even calling abort from the signal handler), and the system won't reboot even if I type sudo reboot in a different console.

The only clue I can think of is that on shutting down OMX in the prior runs, I hit this error in shutting down the camera component:
OMX error: Failed to switch state of the camera component to loaded: 0x80001000 insufficient resource

It could be irrelevant, but I could imagine if the camera system hadn't properly shutdown it would cause odd behaviour on future runs of the application when it started trying to use OMX again. Problem is, I'm totally stuck diagnosing either side of the problem.

Anyone any thoughts? tips? Any help at all?

Code all here if you fancy a look:



Re: stuck getting omx to shutdown/startup with camera compon

Posted: Sat Nov 09, 2013 12:46 pm
by jamesh
I think you are leaking memory in the GPU, probably not shutting down correctly. It eventually runs out of memory and dies a horrible death.

Re: stuck getting omx to shutdown/startup with camera compon

Posted: Sat Nov 09, 2013 2:40 pm
by wibble82
Yeah that's what I was thinking - problem is, how do I track that kind of issue down. My omx use has been mostly guesswork, so I'm not really clear in how I should be using it.

Or I could just stop being impatient and wait for the mmal version of write to texture I guess :)