]> git.sesse.net Git - vlc/blobdiff - modules/access/mtp.c
Move intf_EJect() out of core
[vlc] / modules / access / mtp.c
index 16a17df97f783086ac7ee4a540996f7c2e80883e..eb7e80a09bd4071e66211b2aaf58d6756a11e546 100644 (file)
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
-#define CACHING_TEXT N_("Caching value in ms")
-#define CACHING_LONGTEXT N_( \
-    "Caching value for files. This " \
-    "value should be set in milliseconds." )
-
 vlc_module_begin()
     set_description( N_("MTP input") )
     set_shortname( N_("MTP") )
@@ -107,9 +102,6 @@ static int Open( vlc_object_t *p_this )
     int i_numrawdevices;
     int i_ret;
 
-    /* Update default_pts to a suitable value for file access */
-    var_Create( p_access, "file-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
-
     if( sscanf( p_access->psz_location, "%"SCNu32":%"SCNu8":%"SCNu16":%d",
                 &i_bus, &i_dev, &i_product_id, &i_track_id ) != 4 )
         return VLC_EGENERIC;
@@ -272,7 +264,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
         case ACCESS_GET_PTS_DELAY:
             pi_64 = ( int64_t* )va_arg( args, int64_t * );
-            *pi_64 = var_GetInteger( p_access, "file-caching" ) * INT64_C( 1000 );
+            *pi_64 = INT64_C(1000)
+                   * var_InheritInteger( p_access, "file-caching" );
             break;
 
         /* */