in reply to CPAN module for Picture Transfer Protocol ?

I read the wiki article, and am not sure if you are asking your question correctly.

Because of the usb filesystem, all you need to do is mount the camera as a mass storage device, to get at the images. The PTP aspect is transparent as the usb filesystem drivers handle that read.

If, on the other hand you want actually manipulate the low level storage electronics in these PTP cameras or memory cards, Perl may be of use with pack and unpack

Maybe look at the usb filesystem drivers that handle PTP?


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: CPAN module for Picture Transfer Protocol ?

Replies are listed 'Best First'.
Re^2: CPAN module for Picture Transfer Protocol ?
by chrestomanci (Priest) on May 01, 2011 at 20:58 UTC

    I think you have miss-understood what PTP is. It is not the same as USB mass storage. Different cameras prefer one protocol over the other when they are connected to a PC.

    I have edited my original post to add some clarification.

    I don't need to to use low level access to the USB device using pack or suchlike, libgphoto2 provides an abstraction layer, but it is a C library. My question is are there perl bindings available for that library?

      My question is are there perl bindings available for that library?

      Searching for "libgphoto2 perl" brings up

      RPM Search Mandriva 2009 camdump-1.01-0.13mdv2008.1.i586.rpm Content of RPM : /etc/camdump /etc/dynamic/hooks/camdump.hook /usr/bin +/camdump /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/au +to/gphoto2_perl/libgphoto2_perl.so rpm.pbone.net/index.php3/stat/4/idpl/9472588/dir//com...
      So some bindings existed at some point. But i think, since there is a cli interface, there is no reason to bind :)

        Thanks for that tip. I guess my next step is to download the rpm, extract the contents and see what I find. Hopefully there will be a still working email address for the author. I have already been able to download the source code of the rpm package.