Commit 4489a048 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

access: rename access_t.psz_access to psz_name

parent 3e01621d
......@@ -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) */
......
......@@ -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;
}
......
......@@ -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))
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 ) )
......
......@@ -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 */
......
......@@ -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 ) )
......
......@@ -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;
}
......
......@@ -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" );
......
......@@ -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
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment