logo       

RE: targetting a specific camera when using libgphoto: msg#00025

multimedia.gphoto.devel

Subject: RE: targetting a specific camera when using libgphoto

Yeah, that don't work:

I have a sony camera plugged in my linux box. /proc/bus/usb/001/044

When I do gphoto2 --camera "Sony Digital Still Camera" --port "usb:001,044"
--shell

I get:
The port you specified ('usb:001,044') can not be found. Please specify one
of the ports.....

Pat

Why not add an api gp_init_camera_from_path? Libusb supports opening a
device path!

pat

-----Original Message-----
From: Marcus Meissner [mailto:marcus@xxxxxxxxxxxxxx]
Sent: Tuesday, February 14, 2006 5:11 PM
To: Patrick Laplante
Cc: gphoto-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [gphoto-devel] targetting a specific camera when using
libgphoto

On Fri, Feb 10, 2006 at 10:33:59AM -0500, Patrick Laplante wrote:
> All,
>
>
>
> Is it possible to manually specify the camera that I want to access in the
> libgphoto API?
>
>
>
> Here is what I am doing. I am working on a small downloader that will, on
> camera connection, get started and will automatically suck all the images
> out of the camera and put them somewhere on my disk. (no user interaction
> needed).
>
>
>
> The trick is that I could be plugging 5 cameras simultaneously so 5
> instances of that downloader will get started (with the camera DEVPATH as
an
> argument).
>
>
>
> So is it possible via the libgphoto API to target a specific camera (like
> passing the DEVPATH as an argument)

Yes. When multiple cameras of the same type are connected, you will
get "usb:XXX,YYY" ports, you can then do

gphoto2 --camera "Name" --port "usb:XXX,YYY" ... more options

The XXX,YYY is from /proc/bus/usb/XXX/YYY , so is easily parseable
by a shellscript.

Ciao, Marcus



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise