]> git.sesse.net Git - vlc/commitdiff
Rename access_t.psz_path to psz_location
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 10 May 2010 20:30:48 +0000 (23:30 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 10 May 2010 20:31:57 +0000 (23:31 +0300)
26 files changed:
include/vlc_access.h
modules/access/attachment.c
modules/access/avio.c
modules/access/bda/bda.c
modules/access/cdda.c
modules/access/directory.c
modules/access/dvb/access.c
modules/access/ftp.c
modules/access/gnomevfs.c
modules/access/http.c
modules/access/imem.c
modules/access/mms/mmsh.c
modules/access/mms/mmstu.c
modules/access/mtp.c
modules/access/pvr.c
modules/access/rtmp/access.c
modules/access/rtsp/access.c
modules/access/sftp.c
modules/access/smb.c
modules/access/tcp.c
modules/access/udp.c
modules/access/v4l2.c
modules/access/vcdx/access.c
modules/access/zip/zipaccess.c
src/input/access.c
src/input/stream.c

index 554f2f8b494815542bd6c7adeb2e403383a1dffc..103badbb0362acfe2885f4af01634fa7a2bca47e 100644 (file)
@@ -80,7 +80,7 @@ struct access_t
 
     /* Access name (empty if non forced) */
     char        *psz_access;
-    char        *psz_path; /**< Location (URL with the scheme stripped) */
+    char        *psz_location; /**< Location (URL with the scheme stripped) */
     char        *psz_filepath; /**< Local file path (if applicable) */
 
     /* Access can fill this entry to force a demuxer
index d2e043c03ff52eedd9237b2f60e8f18760109146..ac5f3dae5b25ed2042317fe717e25a76d4106d31 100644 (file)
@@ -73,13 +73,14 @@ static int Open(vlc_object_t *object)
         return VLC_EGENERIC;
 
     input_attachment_t *a;
-    if (input_Control(input, INPUT_GET_ATTACHMENT, &a, access->psz_path))
+    if (input_Control(input, INPUT_GET_ATTACHMENT, &a, access->psz_location))
         a = NULL;
 
     vlc_object_release(input);
 
     if (!a) {
-        msg_Err(access, "Failed to find the attachment '%s'", access->psz_path);
+        msg_Err(access, "Failed to find the attachment '%s'",
+                access->psz_location);
         return VLC_EGENERIC;
     }
 
index 2063f086e802f85147ff10f1bf6b6568aef8e66f..639e2c20b74ad9aafd03ebe7c7d05205f5876cb8 100644 (file)
@@ -84,8 +84,9 @@ int OpenAvio(vlc_object_t *object)
      */
     char *url;
     if (!strcmp(access->psz_access, "avio"))
-        url = strdup(access->psz_path);
-    else if (asprintf(&url, "%s://%s", access->psz_access, access->psz_path) < 0)
+        url = strdup(access->psz_location);
+    else if (asprintf(&url, "%s://%s", access->psz_access,
+                      access->psz_location) < 0)
         url = NULL;
 
     if (!url)
index 98cd85abad4afd88ad8a8f27e8ece2ea3692dbb6..5fbe68eafcc64fc49f8fccd0a462ab27ff54d493 100644 (file)
@@ -463,7 +463,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
     }
     for( int i = 0; i < i_param_count; i++ )
         b_used[i] = false;
-    psz_parser = p_access->psz_path;
+    psz_parser = p_access->psz_location;
     if( strlen( psz_parser ) <= 0 )
         return VLC_SUCCESS;
 
index 508a7ba7cd79d3ea36460061a0531758120a7175..43b824b8f5dacdf97fbe0cfd669578f0f612a8fb 100644 (file)
@@ -493,7 +493,7 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
         msg_Dbg( p_access, "track[%d] start=%d", i, p_sys->p_sectors[i] );
 
         /* */
-        if( asprintf( &psz_uri, "cdda://%s", p_access->psz_path ) == -1 )
+        if( asprintf( &psz_uri, "cdda://%s", p_access->psz_location ) == -1 )
             psz_uri = NULL;
         if( asprintf( &psz_opt, "cdda-track=%i", i+1 ) == -1 )
             psz_opt = NULL;
index 782103bdbcb178a63d0cec88311177af82fdefbe..8c4950f491eb629db1552e48207615e0dc990f3e 100644 (file)
@@ -118,7 +118,7 @@ int DirInit (access_t *p_access, DIR *handle)
     char *uri;
     if (!strcmp (p_access->psz_access, "fd"))
     {
-        if (asprintf (&uri, "fd://%s", p_access->psz_path) == -1)
+        if (asprintf (&uri, "fd://%s", p_access->psz_location) == -1)
             uri = NULL;
     }
     else
index 4fa4b431038bc91b018d1efb233c7d9ab52d2a0c..046570941d304955d1f56651b95294129149acbe 100644 (file)
@@ -913,7 +913,7 @@ static void VarInit( access_t *p_access )
 /* */
 static int ParseMRL( access_t *p_access )
 {
-    char *psz_dup = strdup( p_access->psz_path );
+    char *psz_dup = strdup( p_access->psz_location );
     char *psz_parser = psz_dup;
     char *psz_next;
     vlc_value_t         val;
index 0684a3880c527cc51e94ea988b1e8945ce7d5f9a..0dc1de1244617cadf7a76fc79ac1c9e9aa37b63a 100644 (file)
@@ -338,7 +338,7 @@ static int InOpen( vlc_object_t *p_this )
     p_sys->out = false;
     p_sys->directory = false;
 
-    if( parseURL( &p_sys->url, p_access->psz_path ) )
+    if( parseURL( &p_sys->url, p_access->psz_location ) )
         goto exit_error;
 
     if( Connect( p_this, p_sys ) )
index 93852102d2e8d438832e2376debb67bf312ec6ca..d39d54d36e6457ea31915dc3d113948655c8735d 100644 (file)
@@ -121,11 +121,11 @@ static int Open( vlc_object_t *p_this )
                                             *(p_access->psz_access) != '\0')
     {
         asprintf( &psz_name, "%s://%s", p_access->psz_access,
-                                                    p_access->psz_path );
+                  p_access->psz_location );
     }
     else
     {
-        psz_name = strdup( p_access->psz_path );
+        psz_name = strdup( p_access->psz_location );
     }
     psz = ToLocale( psz_name );
     psz_expand_tilde = gnome_vfs_expand_initial_tilde( psz );
index d0a53d7a84af85189bd0e10fa55745a2ef97a1db..9fc2a74b86474784400adcaa76980a04ea651e63 100644 (file)
@@ -320,7 +320,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
     http_auth_Init( &p_sys->proxy_auth );
 
     /* Parse URI - remove spaces */
-    p = psz = strdup( p_access->psz_path );
+    p = psz = strdup( p_access->psz_location );
     while( (p = strchr( p, ' ' )) != NULL )
         *p = '+';
     vlc_UrlParse( &p_sys->url, psz, 0 );
@@ -363,7 +363,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
         {
             char *buf;
             int i;
-            i=asprintf(&buf, "%s://%s", psz_access, p_access->psz_path);
+            i=asprintf(&buf, "%s://%s", psz_access, p_access->psz_location);
             if (i >= 0)
             {
                 msg_Dbg(p_access, "asking libproxy about url '%s'", buf);
@@ -581,8 +581,8 @@ connect:
             msg_Err( p_access, "insecure redirection ignored" );
             goto error;
         }
-        free( p_access->psz_path );
-        p_access->psz_path = strdup( p_sys->psz_location );
+        free( p_access->psz_location );
+        p_access->psz_location = strdup( p_sys->psz_location );
         /* Clean up current Open() run */
         vlc_UrlClean( &p_sys->url );
         http_auth_Reset( &p_sys->auth );
index ab41aade581773f1438dfddf940d64f0327a74b2..c3e17fbd03fd12472bc320e9ee63828463fd407c 100644 (file)
@@ -300,7 +300,7 @@ static int OpenAccess(vlc_object_t *object)
     access_t   *access = (access_t *)object;
     imem_sys_t *sys;
 
-    if (OpenCommon(object, &sys, access->psz_path))
+    if (OpenCommon(object, &sys, access->psz_location))
         return VLC_EGENERIC;
 
     if (var_InheritInteger(object, "imem-cat") != 4) {
index f3d93ae85813dad04b691237fdc101b2953f9c98..9833483df6e0eacbcf1e1d11c9df220349195cad 100644 (file)
@@ -137,7 +137,7 @@ int MMSHOpen( access_t *p_access )
     }
 
     /* open a tcp connection */
-    vlc_UrlParse( &p_sys->url, p_access->psz_path, 0 );
+    vlc_UrlParse( &p_sys->url, p_access->psz_location, 0 );
     if( ( p_sys->url.psz_host == NULL ) ||
         ( *p_sys->url.psz_host == '\0' ) )
     {
index 45e363d2d2bbf00725d206dde07aa626cae93d1c..ce4f5df3d433818ffb334391daa4d5b7ea4a66d2 100644 (file)
@@ -106,7 +106,7 @@ int  MMSTUOpen( access_t *p_access )
     vlc_mutex_init( &p_sys->lock_netwrite );
 
     /* *** Parse URL and get server addr/port and path *** */
-    vlc_UrlParse( &p_sys->url, p_access->psz_path, 0 );
+    vlc_UrlParse( &p_sys->url, p_access->psz_location, 0 );
     if( p_sys->url.psz_host == NULL || *p_sys->url.psz_host == '\0' )
     {
         msg_Err( p_access, "invalid server name" );
index 3d42617326b5699df57b63481a2986dc2faee8c7..1f0e4c50750c43ed65875e90049157aeefd4976d 100644 (file)
@@ -110,8 +110,8 @@ static int Open( vlc_object_t *p_this )
     /* 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_path, "%"SCNu32":%"SCNu8":%"SCNu16":%d", &i_bus,
-                &i_dev, &i_product_id, &i_track_id ) != 4 )
+    if( sscanf( p_access->psz_location, "%"SCNu32":%"SCNu8":%"SCNu16":%d",
+                &i_bus, &i_dev, &i_product_id, &i_track_id ) != 4 )
         return VLC_EGENERIC;
     i_ret = LIBMTP_Detect_Raw_Devices( &p_rawdevices, &i_numrawdevices );
     if( i_ret != 0 || i_numrawdevices <= 0 || !p_rawdevices )
index b7d91e9de0352a778d8e555c9e1d15965d11efef..88a3070c6af6469be94dba7530f327c271ba50d0 100644 (file)
@@ -577,7 +577,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->i_input      = var_CreateGetInteger( p_access, "pvr-channel" );
 
     /* parse command line options */
-    psz_tofree = strdup( p_access->psz_path );
+    psz_tofree = strdup( p_access->psz_location );
     if( !psz_tofree )
     {
         free( p_sys->psz_radiodev );
index 2c556f68e34b7228e3682b43d0ede7111114e3af..c7f5ed7bacefe949ef67ed37c178351b676b1be4 100644 (file)
@@ -106,7 +106,7 @@ static int Open( vlc_object_t *p_this )
     vlc_object_attach( p_sys->p_thread, p_access );
 
     /* Parse URI - remove spaces */
-    p = psz = strdup( p_access->psz_path );
+    p = psz = strdup( p_access->psz_location );
     while( (p = strchr( p, ' ' )) != NULL )
         *p = '+';
     vlc_UrlParse( &p_sys->p_thread->url, psz, 0 );
index bf2dd762913f50898edf804179b5d2c221137209..c5dcc1460d6cce8573ad95a59cdc3f2ba6761066 100644 (file)
@@ -193,7 +193,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_rtsp->pf_read_line = RtspReadLine;
     p_sys->p_rtsp->pf_write = RtspWrite;
 
-    i_result = rtsp_connect( p_sys->p_rtsp, p_access->psz_path, 0 );
+    i_result = rtsp_connect( p_sys->p_rtsp, p_access->psz_location, 0 );
     if( i_result )
     {
         msg_Dbg( p_access, "could not connect to: %s", p_access->psz_path );
index 01795e015cce53f2ce6a75270395ba713b115fda..ed75dece53954a4d24c10738b55341100492272a 100644 (file)
@@ -109,13 +109,13 @@ static int Open( vlc_object_t* p_this )
     int i_ret;
     vlc_url_t url;
 
-    if( !p_access->psz_path )
+    if( !p_access->psz_location )
         return VLC_EGENERIC;
 
     STANDARD_BLOCK_ACCESS_INIT;
 
     /* Parse the URL */
-    char* path = p_access->psz_path;
+    const char* path = p_access->psz_location;
     vlc_UrlParse( &url, path, 0 );
 
     /* Check for some parameters */
index d2648a478f59889a3c1a8ca073b0421fa8c2174c..f35a8801d531775aa659bdfa9a1452adf7e8143f 100644 (file)
@@ -138,25 +138,25 @@ static int Open( vlc_object_t *p_this )
 
     /* Parse input URI
      * [[[domain;]user[:password@]]server[/share[/path[/file]]]] */
-    psz_path = strchr( p_access->psz_path, '/' );
+    psz_path = strchr( p_access->psz_location, '/' );
     if( !psz_path )
     {
-        msg_Err( p_access, "invalid SMB URI: smb://%s", psz_path );
+        msg_Err( p_access, "invalid SMB URI: smb://%s", psz_location );
         return VLC_EGENERIC;
     }
     else
     {
-        char *psz_tmp = strdup( p_access->psz_path );
+        char *psz_tmp = strdup( p_access->psz_location );
         char *psz_parser;
 
-        psz_tmp[ psz_path - p_access->psz_path ] = 0;
-        psz_path = p_access->psz_path;
+        psz_tmp[ psz_path - p_access->psz_location ] = 0;
+        psz_path = p_access->psz_location;
         psz_parser = strchr( psz_tmp, '@' );
         if( psz_parser )
         {
             /* User info is there */
             *psz_parser = 0;
-            psz_path = p_access->psz_path + (psz_parser - psz_tmp) + 1;
+            psz_path = p_access->psz_location + (psz_parser - psz_tmp) + 1;
 
             psz_parser = strchr( psz_tmp, ':' );
             if( psz_parser )
@@ -230,7 +230,8 @@ static int Open( vlc_object_t *p_this )
 #endif
     if( (i_smb = smbc_open( psz_uri, O_RDONLY, 0 )) < 0 )
     {
-        msg_Err( p_access, "open failed for '%s' (%m)", p_access->psz_path );
+        msg_Err( p_access, "open failed for '%s' (%m)",
+                 p_access->psz_location );
         free( psz_uri );
         return VLC_EGENERIC;
     }
index 6c2d50aecacbdedec92cceac1bc2fb0286fe6f6b..3f33b9b1d76820b89b9212d424893f3b868d73b0 100644 (file)
@@ -81,7 +81,7 @@ static int Open( vlc_object_t *p_this )
     access_t     *p_access = (access_t *)p_this;
     access_sys_t *p_sys;
 
-    char         *psz_dup = strdup(p_access->psz_path);
+    char         *psz_dup = strdup(p_access->psz_location);
     char         *psz_parser = psz_dup;
 
     /* Parse server:port */
index 765c2d03eae42cad937c42384dd46247a8007296..cb5068bcf484001599c6d7aecae9e9e1f5acd451 100644 (file)
@@ -90,7 +90,7 @@ static int Open( vlc_object_t *p_this )
 {
     access_t     *p_access = (access_t*)p_this;
 
-    char *psz_name = strdup( p_access->psz_path );
+    char *psz_name = strdup( p_access->psz_location );
     char *psz_parser;
     const char *psz_server_addr, *psz_bind_addr = "";
     int  i_bind_port, i_server_port = 0;
index 9ad9edc1c95e0a48e6e4321c6fdb78fd4ffe92f3..41baaf808db221085a581bfb878c003a44cc6346 100644 (file)
@@ -1131,7 +1131,7 @@ static int AccessOpen( vlc_object_t * p_this )
 
     GetV4L2Params( p_sys, (vlc_object_t *) p_access );
 
-    ParseMRL( p_sys, p_access->psz_path, (vlc_object_t *) p_access );
+    ParseMRL( p_sys, p_access->psz_location, (vlc_object_t *) p_access );
 
 #ifdef HAVE_LIBV4L2
     if( !var_InheritInteger( p_this, CFG_PREFIX "use-libv4l2" ) )
index 91c77616d68c5185a757a3d62b719211d12cd66a..5d0aeff6f1288ed4ac802cd3a5c2c368edcbb0ec 100644 (file)
@@ -563,12 +563,12 @@ VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid,
     if( !p_access->psz_access || !*p_access->psz_access ) return NULL;
 #endif
 
-    if( !p_access->psz_path )
+    if( !p_access->psz_location )
     {
         return NULL;
     }
 
-    psz_parser = psz_source = strdup( p_access->psz_path );
+    psz_parser = psz_source = strdup( p_access->psz_location );
 
     /* Parse input string :
      * [device][@[type][title]] */
@@ -884,7 +884,7 @@ VCDOpen ( vlc_object_t *p_this )
     }
 
     dbg_print( (INPUT_DBG_CALL|INPUT_DBG_EXT), "source: %s: mrl: %s",
-               psz_source, p_access->psz_path );
+               psz_source, p_access->psz_location );
 
     p_vcdplayer->psz_source        = strdup(psz_source);
     p_vcdplayer->i_blocks_per_read = var_InheritInteger( p_this, MODULE_STRING
index 3e4689bb337a83e46f55b7b0abe9a95830a66dc5..f862b0cdd398092c92523b1134b26f99318c1d17 100644 (file)
@@ -105,9 +105,9 @@ int AccessOpen( vlc_object_t *p_this )
 
     char *psz_pathToZip = NULL, *psz_path = NULL, *psz_sep = NULL;
 
-    if( !strstr( p_access->psz_path, ZIP_SEP ) )
+    if( !strstr( p_access->psz_location, ZIP_SEP ) )
     {
-        msg_Dbg( p_access, "path does not contain separator " ZIP_SEP );
+        msg_Dbg( p_access, "location does not contain separator " ZIP_SEP );
         return VLC_EGENERIC;
     }
 
@@ -117,7 +117,7 @@ int AccessOpen( vlc_object_t *p_this )
         return VLC_ENOMEM;
 
     /* Split the MRL */
-    psz_path = strdup( p_access->psz_path );
+    psz_path = strdup( p_access->psz_location );
     psz_sep = strstr( psz_path, ZIP_SEP );
 
     *psz_sep = '\0';
@@ -125,7 +125,7 @@ int AccessOpen( vlc_object_t *p_this )
     if( !psz_pathToZip )
     {
         /* Maybe this was not an encoded string */
-        msg_Dbg( p_access, "this is not an encoded url. Trying file '%s'",
+        msg_Dbg( p_access, "not an encoded URL  Trying file '%s'",
                  psz_path );
         psz_pathToZip = strdup( psz_path );
     }
index 82d27b5a01f20c7d7138a705ef8ec8ecd291e422..e99455b7194795116837cdd6ca23851878b43e50 100644 (file)
@@ -63,7 +63,7 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
     p_access->p_input = p_parent_input;
 
     p_access->psz_access = strdup( psz_access );
-    p_access->psz_path   = strdup( psz_location );
+    p_access->psz_location = strdup( psz_location );
     p_access->psz_filepath = get_path( psz_location );
     p_access->psz_demux  = strdup( psz_demux );
 
@@ -86,7 +86,7 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
     if( p_access->p_module == NULL )
     {
         free( p_access->psz_access );
-        free( p_access->psz_path );
+        free( p_access->psz_location );
         free( p_access->psz_filepath );
         free( p_access->psz_demux );
         vlc_object_release( p_access );
@@ -104,7 +104,7 @@ void access_Delete( access_t *p_access )
     module_unneed( p_access, p_access->p_module );
 
     free( p_access->psz_access );
-    free( p_access->psz_path );
+    free( p_access->psz_location );
     free( p_access->psz_filepath );
     free( p_access->psz_demux );
 
index eedd3a4a4ca4d2ba69c7977992b3088f9b7cd698..f0a90dc1286c09e5587e386aa1222fa53b0db062 100644 (file)
@@ -294,7 +294,7 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
         return NULL;
 
     s->p_input = p_access->p_input;
-    s->psz_path = strdup( p_access->psz_path );
+    s->psz_path = strdup( p_access->psz_location );
     s->p_sys = p_sys = malloc( sizeof( *p_sys ) );
     if( !s->psz_path || !s->p_sys )
     {
@@ -339,7 +339,7 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
             goto error;
 
         p_entry->i_size = p_access->info.i_size;
-        p_entry->psz_path = strdup( p_access->psz_path );
+        p_entry->psz_path = strdup( p_access->psz_location );
         if( !p_entry->psz_path )
         {
             free( p_entry );