User avatar
gagle
Posts: 82
Joined: Fri Feb 14, 2014 6:54 pm
Contact: Website

[OpenMAX] How to check whether the camera is running

Sat Jun 14, 2014 7:03 pm

When I change the camera component to IDLE, I get an error (insufficient resources) if the camera is already running. I suspect that this is just a stroke of luck due to the way that I've written my code.

How does MMAL do to check if the camera is already running? Is it something related to openmax, vcos, etc?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9943
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: [OpenMAX] How to check whether the camera is running

Sat Jun 14, 2014 8:45 pm

How does MMAL do to check if the camera is already running?
It doesn't.
mmal_component_enable is the same as changing the IL component to executing (via idle), and it picks up on the same error if the camera is already open.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”