[vlc-commits] access: rename access_t.psz_access to psz_name

Rémi Denis-Courmont git at videolan.org
Thu Jul 21 21:30:16 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 18 20:04:33 2016 +0300| [4489a0487e68cdd1e3103039ec9b31d2503354a8] | committer: Rémi Denis-Courmont

access: rename access_t.psz_access to psz_name

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

 include/vlc_access.h        |    3 +--
 modules/access/avio.c       |    6 +++---
 modules/access/directory.c  |    2 +-
 modules/access/dtv/access.c |    2 +-
 modules/access/dvb/access.c |    2 +-
 modules/access/file.c       |    4 ++--
 modules/access/ftp.c        |    2 +-
 modules/access/http.c       |    4 ++--
 modules/access/mms/mms.c    |    6 +++---
 modules/access/mms/mmstu.c  |    4 ++--
 modules/access/vcd/vcd.c    |    4 ++--
 modules/access/vdr.c        |    2 +-
 src/input/access.c          |   12 ++++++------
 13 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/include/vlc_access.h b/include/vlc_access.h
index 34950a4..869f997 100644
--- a/include/vlc_access.h
+++ b/include/vlc_access.h
@@ -42,8 +42,7 @@ struct access_t
     /* Module properties */
     module_t    *p_module;
 
-
-    char        *psz_access; /**< Access name */
+    char        *psz_name; /**< Access name */
     char        *psz_url; /**< Full URL or MRL */
     const char  *psz_location; /**< Location (URL with the scheme stripped) */
     char        *psz_filepath; /**< Local file path (if applicable) */
diff --git a/modules/access/avio.c b/modules/access/avio.c
index a05cc71..9693395 100644
--- a/modules/access/avio.c
+++ b/modules/access/avio.c
@@ -134,9 +134,9 @@ int OpenAvio(vlc_object_t *object)
      * - url (only a subset of available protocols).
      */
     char *url;
-    if (!strcmp(access->psz_access, "avio"))
+    if (!strcmp(access->psz_name, "avio"))
         url = strdup(access->psz_location);
-    else if (asprintf(&url, "%s://%s", access->psz_access,
+    else if (asprintf(&url, "%s://%s", access->psz_name,
                       access->psz_location) < 0)
         url = NULL;
 
@@ -389,7 +389,7 @@ static int OutControl(sout_access_out_t *p_access, int i_query, va_list args)
     switch (i_query) {
     case ACCESS_OUT_CONTROLS_PACE: {
         bool *pb = va_arg(args, bool *);
-        //*pb = strcmp(p_access->psz_access, "stream");
+        //*pb = strcmp(p_access->psz_name, "stream");
         *pb = false;
         break;
     }
diff --git a/modules/access/directory.c b/modules/access/directory.c
index 683de55..6d4e105 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -57,7 +57,7 @@ int DirInit (access_t *access, DIR *dir)
     if (unlikely(sys == NULL))
         goto error;
 
-    if (!strcmp(access->psz_access, "fd"))
+    if (!strcmp(access->psz_name, "fd"))
     {
         if (unlikely(asprintf(&sys->base_uri, "fd://%s",
                               access->psz_location) == -1))
diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index c52fb0a..4623ad3 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -464,7 +464,7 @@ static int Open (vlc_object_t *obj)
     uint64_t freq = var_InheritFrequency (obj);
     if (freq != 0)
     {
-        dtv_delivery_t d = GuessSystem (access->psz_access, dev);
+        dtv_delivery_t d = GuessSystem (access->psz_name, dev);
         if(d != DTV_DELIVERY_NONE)
             sys->pf_setup = dtv_get_delivery_tuner_setup(d);
 
diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c
index 28e06df..99077ff 100644
--- a/modules/access/dvb/access.c
+++ b/modules/access/dvb/access.c
@@ -155,7 +155,7 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC; /* let the DTV plugin do the work */
 
     /* Getting frontend info */
-    if( FrontendOpen( p_this, &p_sys->dvb, p_access->psz_access ) )
+    if( FrontendOpen( p_this, &p_sys->dvb, p_access->psz_name ) )
     {
         free( p_sys );
         return VLC_EGENERIC;
diff --git a/modules/access/file.c b/modules/access/file.c
index 8823ea1..eede055 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -143,7 +143,7 @@ int FileOpen( vlc_object_t *p_this )
     /* Open file */
     int fd = -1;
 
-    if (!strcasecmp (p_access->psz_access, "fd"))
+    if (!strcasecmp (p_access->psz_name, "fd"))
     {
         char *end;
         int oldfd = strtol (p_access->psz_location, &end, 10);
@@ -242,7 +242,7 @@ int FileOpen( vlc_object_t *p_this )
     else
     {
         p_access->pf_seek = NoSeek;
-        p_sys->b_pace_control = strcasecmp (p_access->psz_access, "stream");
+        p_sys->b_pace_control = strcasecmp (p_access->psz_name, "stream");
     }
 
     return VLC_SUCCESS;
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 91be656..25b5d42 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -653,7 +653,7 @@ static int InOpen( vlc_object_t *p_this )
     p_sys->offset = 0;
     p_sys->size = UINT64_MAX;
 
-    if( readTLSMode( p_this, p_sys, p_access->psz_access ) )
+    if( readTLSMode( p_this, p_sys, p_access->psz_name ) )
         goto exit_error;
 
     if( parseURL( &p_sys->url, p_access->psz_location, p_sys->tlsmode ) )
diff --git a/modules/access/http.c b/modules/access/http.c
index 04246e8..02c8668 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -716,9 +716,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
 
             if( p_sys->b_icecast && p_sys->psz_mime == NULL )
                 *type = strdup( "audio/mpeg" );
-            else if( !strcasecmp( p_access->psz_access, "itpc" ) )
+            else if( !strcasecmp( p_access->psz_name, "itpc" ) )
                 *type = strdup( "application/rss+xml" );
-            else if( !strcasecmp( p_access->psz_access, "unsv" ) &&
+            else if( !strcasecmp( p_access->psz_name, "unsv" ) &&
                 p_sys->psz_mime != NULL &&
                 !strcasecmp( p_sys->psz_mime, "misc/ultravox" ) )
                 /* Grrrr! detect ultravox server and force NSV demuxer */
diff --git a/modules/access/mms/mms.c b/modules/access/mms/mms.c
index a6a0179..7330c39 100644
--- a/modules/access/mms/mms.c
+++ b/modules/access/mms/mms.c
@@ -100,11 +100,11 @@ static int Open( vlc_object_t *p_this )
     access_t *p_access = (access_t*)p_this;
 
     /* use specified method */
-    if( !strncmp( p_access->psz_access, "mmsu", 4 ) )
+    if( !strncmp( p_access->psz_name, "mmsu", 4 ) )
         return  MMSTUOpen ( p_access );
-    else if( !strncmp( p_access->psz_access, "mmst", 4 ) )
+    else if( !strncmp( p_access->psz_name, "mmst", 4 ) )
         return  MMSTUOpen ( p_access );
-    else if( !strncmp( p_access->psz_access, "mmsh", 4 ) )
+    else if( !strncmp( p_access->psz_name, "mmsh", 4 ) )
         return  MMSHOpen ( p_access );
 
     if( MMSTUOpen ( p_access ) )
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index f1ff695..c413d5f 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -122,11 +122,11 @@ int  MMSTUOpen( access_t *p_access )
     /* *** connect to this server *** */
     /* look at  requested protocol (udp/tcp) */
     i_proto = MMS_PROTO_AUTO;
-    if( !strncmp( p_access->psz_access, "mmsu", 4 ) )
+    if( !strncmp( p_access->psz_name, "mmsu", 4 ) )
     {
         i_proto = MMS_PROTO_UDP;
     }
-    else if( !strncmp( p_access->psz_access, "mmst", 4 ) )
+    else if( !strncmp( p_access->psz_name, "mmst", 4 ) )
     {
         i_proto = MMS_PROTO_TCP;
     }
diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c
index e93641a..11f8fa6 100644
--- a/modules/access/vcd/vcd.c
+++ b/modules/access/vcd/vcd.c
@@ -118,8 +118,8 @@ static int Open( vlc_object_t *p_this )
         free( psz_dup );
 
         /* Only when selected */
-        if( strcmp( p_access->psz_access, "vcd" ) &&
-            strcmp( p_access->psz_access, "svcd" ) )
+        if( strcmp( p_access->psz_name, "vcd" ) &&
+            strcmp( p_access->psz_name, "svcd" ) )
             return VLC_EGENERIC;
 
         psz_dup = var_CreateGetString( p_access, "vcd" );
diff --git a/modules/access/vdr.c b/modules/access/vdr.c
index 9f0e3eb..6a28a81 100644
--- a/modules/access/vdr.c
+++ b/modules/access/vdr.c
@@ -166,7 +166,7 @@ static int Open( vlc_object_t *p_this )
     /* Some tests can be skipped if this module was explicitly requested.
      * That way, the user can play "corrupt" recordings if necessary
      * and we can avoid false positives in the general case. */
-    bool b_strict = strcmp( p_access->psz_access, "vdr" );
+    bool b_strict = strcmp( p_access->psz_name, "vdr" );
 
     /* Do a quick test based on the directory name to see if this
      * directory might contain a VDR recording. We can be reasonably
diff --git a/src/input/access.c b/src/input/access.c
index 72f5857..569136a 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -71,7 +71,7 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
         return NULL;
 
     access->p_input = input;
-    access->psz_access = NULL;
+    access->psz_name = NULL;
     access->psz_url = strdup(mrl);
     access->psz_filepath = NULL;
     access->pf_read = NULL;
@@ -95,8 +95,8 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
         if (p == NULL)
             goto error;
 
-        access->psz_access = strndup(url, p - url);
-        if (unlikely(access->psz_access == NULL))
+        access->psz_name = strndup(url, p - url);
+        if (unlikely(access->psz_name == NULL))
             goto error;
 
         access->psz_location = p + 3;
@@ -104,7 +104,7 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
         if (access->psz_filepath != NULL)
             msg_Dbg(access, " (path: %s)", access->psz_filepath);
 
-        access->p_module = module_need(access, "access", access->psz_access,
+        access->p_module = module_need(access, "access", access->psz_name,
                                        true);
         if (access->p_module != NULL) /* success */
         {
@@ -136,7 +136,7 @@ error:
         free(redirv[--redirc]);
     free(access->psz_filepath);
     free(access->psz_url);
-    free(access->psz_access);
+    free(access->psz_name);
     vlc_object_release(access);
     return NULL;
 }
@@ -152,7 +152,7 @@ void vlc_access_Delete(access_t *access)
 
     free(access->psz_filepath);
     free(access->psz_url);
-    free(access->psz_access);
+    free(access->psz_name);
     vlc_object_release(access);
 }
 



More information about the vlc-commits mailing list