maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Multiple Cameras (https://talk.maemo.org/showthread.php?t=54737)

Dak 2010-06-01 01:01

Multiple Cameras
 
I would like to create a diagnostic app that shows the output from both the /dev/video0 and /dev/video1 cameras simultaneously.

To keep things simple, I'm using the gst_parse_launch( "v4l2src device=/dev/videoX ! xvimagesink", NULL ) method to get a pipeline. I make two calls, where X is "0" or "1".

However, only the first call works...the second always fails with a "cannot open /dev/video1 for reading or writing" error. If I reverse the calls, obviously the error refers to /dev/video0.

I understand that I cannot open the *same* device in two separate applications, but why can I not open two *different* devices within the same app? Do I need to write some device_open code at a lower level perhaps?

chia0418 2010-06-01 02:32

Re: Multiple Cameras
 
According to the wiki, http://wiki.maemo.org/N900_Hardware_Camera_Sensor, the answer is obvious: The camera is used by several applications, including the built in camera application. It is connected via a multiplexor to the single camera bus on the CPU, along with the front camera. The two cannot be used at once. :)

Dak 2010-06-01 12:09

Re: Multiple Cameras
 
Good pointer. That kills that bright idea stone dead :)

noobmonkey 2010-06-01 12:13

Re: Multiple Cameras
 
Yeah :( - i am also trying similar - but kinda bodgejobbing it (Less framerate) - and seeing if i can make it look like i am doing it at the same time :P - kinda works - but nothing mega successful to share yet!

Dak 2010-06-01 14:03

Re: Multiple Cameras
 
How are you attempting this, noobmonkey?

Are you just creating/closing pipelines alternately, and overlaying the incoming frames as fast as you can? In C, of course ;)

That would seem to be the only available approach, unless deeper hackery can expose a better trick...

abbra 2010-06-01 14:19

Re: Multiple Cameras
 
I can confirm, both front-side and main cameras are connected to the same bus that is exclusive, you cannot drive two devices through the bus simultaneously. Reconfiguring the bus takes time. It has nothing to do with multiple applications, this is pure hardware limitation.

Dak 2010-06-01 14:40

Re: Multiple Cameras
 
Is there a way I can grab the kernel source without using scratchbox?

A simple link to a repository?

I don't want to build the kernel - not yet, anyway - but rather simply inspect the code to better understand what is happening...

EDIT : I'm a dingus....I found the place...

http://repository.maemo.org/pool/mae...free/k/kernel/

qwerty12 2010-06-01 14:45

Re: Multiple Cameras
 
Quote:

Originally Posted by Dak (Post 693926)
Is there a way I can grab the kernel source without using scratchbox?

A simple link to a repository?

I don't want to build the kernel - not yet, anyway - but rather simply inspect the code to better understand what is happening...

If you're running Debian or similar: dget -ux http://repository.maemo.org/pool/fre...101501+0m5.dsc

Else, just grab http://repository.maemo.org/pool/fre...28.orig.tar.gz and the diff from the same folder

noobmonkey 2010-06-03 15:34

Re: Multiple Cameras
 
Quote:

Originally Posted by Dak (Post 693857)
How are you attempting this, noobmonkey?

Are you just creating/closing pipelines alternately, and overlaying the incoming frames as fast as you can? In C, of course ;)

That would seem to be the only available approach, unless deeper hackery can expose a better trick...

Using python and failed with threading pipelines quickly - so trying qtmultimedia when i can get the a7se of a thing to work!

belveder 2010-09-15 11:40

Re: Multiple Cameras
 
Hi,

has there been any progress on getting both cameras to work at the same time? It's really unfortunate that both cameras share a single bus, for cost reasons obviously...

I just wonder if anyone can finally confirm that we are on a dead end road with the N900 concerning the simultaneous usage of both cameras...

Regards...


All times are GMT. The time now is 14:37.

vBulletin® Version 3.8.8