jvcleave / ofxRPiCameraVideoGrabber

development of ofxRPiCameraVideoGrabber, an addon to control the native Raspberry Pi camera in openFrameworks
89 stars 17 forks source link

Way to tell that camera init has failed #24

Open kr15h opened 8 years ago

kr15h commented 8 years ago

Currently trying to develop a solution with a HDMI input board instead of a Raspberry Pi camera. The app keeps crashing after trying to close a failed ofxRPiCameraVideoGrabber::setup(). I spent some time into trying to understand how it would be possible to tell if the camera initialisation has failed. When running raspivid -pf from the cli, I get a clear output:

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates

I wonder whether it would be possible to get any status like this after failing during `ofxRPiCameraVideoGrabber::setup().

jvcleave commented 8 years ago

you could just have it return a bool but there is a lot going on in there so you would have to write checks for those methods as well

Which HDMI board?

kr15h commented 8 years ago

This: http://www.auvidea.eu/index.php/theme-styles/2014-12-30-22-32-06/b101

jvcleave commented 8 years ago

Nice - I know @vade had it working with this addon but it likely takes a certain version of the firmware.

kr15h commented 8 years ago

It works. The problem is that I want it to be possible to detect when the HDMI cable is disconnected and switch from HDMI in to something else if that happens.

jvcleave commented 8 years ago

Here is what I would do

make Debug gdb ./yourApp r to run (wait til crashes) bt create the bool for pass/fail there

kr15h commented 8 years ago

Thanks! Will try.

jvcleave commented 8 years ago

you may run into some message like "SIG-something" - typically hitting 'c' will get you past it

vade commented 8 years ago

@jvcleave I have a second auvidea board, and I kind of stopped messing with it due to other things.

Would you be up for me sending you one of the dev boards ? Id love some 'official' support for it - maybe!?

jvcleave commented 8 years ago

@vade Would love to try it - I actually looked into ordering one a while back but they never responded to my email. I don't think I have your email so if you can ping me at jvcleave@gmail.com I can give you info

natxopedreira commented 7 years ago

I just received the B101 board, its very cool but sometimes it doesn't start correctly and it trows

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC or mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board

So it will be cool to implement something to see if the board its ok, jvcleave can you tell me wich methods i need to check in setup?

Also would be nice to know wich version of raspbian and firmware are others using, as i think they are related to last version of those.

@kr15h @vade are you using the board? wich raspbian and firmware version are you running?