[vlc-commits] commit: MTP: update to libmtp 1.0.0 + fixes (Fabio Ritrovato )

git at videolan.org git at videolan.org
Mon Mar 8 23:29:40 CET 2010


vlc | branch: master | Fabio Ritrovato <sephiroth87 at videolan.org> | Mon Mar  8 23:29:12 2010 +0100| [88a0b150bc85653d84ba4039edb1998f39b6b268] | committer: Fabio Ritrovato 

MTP: update to libmtp 1.0.0 + fixes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88a0b150bc85653d84ba4039edb1998f39b6b268
---

 configure.ac                     |    2 +-
 modules/services_discovery/mtp.c |   12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c6197e..a5660dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4237,7 +4237,7 @@ PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discov
 
 dnl
 dnl MTP devices services discovery
-PKG_ENABLE_MODULES_VLC([MTP], [], [libmtp >= 0.3.0],[MTP devices support],[auto])
+PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
 
 dnl
 dnl  Lirc plugin
diff --git a/modules/services_discovery/mtp.c b/modules/services_discovery/mtp.c
index 96df1d6..c85d775 100644
--- a/modules/services_discovery/mtp.c
+++ b/modules/services_discovery/mtp.c
@@ -147,6 +147,8 @@ static void *Run( void *data )
             msg_Dbg( p_sd, "New device found" );
             if( AddDevice( p_sd, &p_rawdevices[0] ) == VLC_SUCCESS )
                 i_status = 1;
+            else
+                i_status = 2;
         }
         else
         {
@@ -161,7 +163,13 @@ static void *Run( void *data )
         }
         free( p_rawdevices );
         vlc_restorecancel(canc);
-        msleep( 500000 );
+        if( i_status == 2 )
+        {
+            msleep( 5000000 );
+            i_status = 0;
+        }
+        else
+            msleep( 500000 );
     }
     return NULL;
 }
@@ -216,7 +224,7 @@ static int AddDevice( services_discovery_t *p_sd,
     }
     else
     {
-        msg_Warn( p_sd, "No device found, after all" );
+        msg_Info( p_sd, "The device seems to be mounted, unmount it first" );
         return VLC_EGENERIC;
     }
 }



More information about the vlc-commits mailing list