[gthumb-list] Import photos from PTP device (gphoto2)



Hi,

Since the gvfs release, I can import photo from my camera using PTP.
(whereas it works well with previous gthumb release).

$ gthumb --version
gthumb 2.11.4, Copyright (C) 2001-2010 Free Software Foundation, Inc.

So gthumb uses gvfs (and gvfs-backends) to read storage devices.

$ gphoto2 --auto-detect
Modèle                        Port
----------------------------------------------------------
Canon PowerShot G5 (normal mode) usb:            
Canon PowerShot G5 (normal mode) usb:002,008     

My camera is well detected.

$ gvfs-mout -l
Drive(0): Disque dur 500 GB
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
  Volume(0): Système de fichiers 70 GB
    Type: GProxyVolume (GProxyVolumeMonitorGdu)
Drive(1): Lecteur CD/DVD/Blu-Ray
  Type: GProxyDrive (GProxyVolumeMonitorGdu)

But not mounted (beside of, not display in nautilus)

gthumb doesn't see my camera.

Now, if I mount manually my camera :

$ gvfs-mount "gphoto2://[usb:002,008]/"
$ gvfs-mount -l
Drive(0): Disque dur 500 GB
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
  Volume(0): Système de fichiers 70 GB
    Type: GProxyVolume (GProxyVolumeMonitorGdu)
Drive(1): Lecteur CD/DVD/Blu-Ray
  Type: GProxyDrive (GProxyVolumeMonitorGdu)
Mount(0): Canon Digital Camera -> gphoto2://[usb:002,008]/
  Type: GDaemonMount

So, my camera is well mounted !

But gthumb doesn't still see my camera !

If I read the code :

  static void
  update_source_list (DialogData *data)
  {
      [...]

      mounts = g_volume_monitor_get_mounts (g_volume_monitor_get ());

// Why get only the mounted volume ? If the device isn't mounted,
// gthumb can't import data ! gthumb should mount automatically 
// the volume.

      for (scan = mounts; scan; scan = scan->next) {
[...]  
          volume = g_mount_get_volume (mount);
          if (volume != NULL) {
              if (g_volume_can_mount (volume)) {

// Why only devices with volumes ?
// A PTP device hasn't volume :(

I have prepared a patch to be able to import media from a devices with
no volume (as PTP devices).
But I don't know how can I list the devices not mounted ? 


Maybe I'm on the wrong way ?


Regards,

Nicolas VIVIEN






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]