Quantcast

Testing gphoto2 without a camera

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Testing gphoto2 without a camera

tzaman
Hello!

I am messing around a bit with gphoto2, but currently I'm all out of camera's. I do wish to mess around with some scripts and I was wondering if I could somehow simulate a camera. It's not problem if it would take some coding time. So (Marcus :)?) how would I go about that, or is something like that already incorporated in the form of unit tests or such? Love your work.

Tim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing gphoto2 without a camera

Marcus Meissner-4
On Sun, Aug 07, 2016 at 10:48:23PM -0700, tzaman wrote:
> Hello!
>
> I am messing around a bit with gphoto2, but currently I'm all out of
> camera's. I do wish to mess around with some scripts and I was wondering if
> I could somehow simulate a camera. It's not problem if it would take some
> coding time. So (Marcus :)?) how would I go about that, or is something like
> that already incorporated in the form of unit tests or such? Love your work.

You can. :)

In libgphoto2 2.5.10 I have implemented a "virtual ptp" camera.

If you move away the usb and usb1 port drivers, the "usb:" port will
be provided by the vusb driver, which emulates a basic PTP camera.

(e.g.:
        rm /usr/lib64/libgphoto2_port/0.12.0/usb.*
        rm /usr/lib64/libgphoto2_port/0.12.0/usb1.*
)

The file content this virtual camera sees will be below:
        /usr/share/libgphoto2_port/0.12.0/vcamera/

You should copy one or more .JPG files into this directory, then
downloading and also capture will work.

Ciao, Marcus

------------------------------------------------------------------------------
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Loading...