/* 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
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;
}
*/
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)
}
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;
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;
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
/* */
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;
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 ) )
*(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 );
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 );
{
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);
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 );
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) {
}
/* 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' ) )
{
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" );
/* 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 )
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 );
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 );
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 );
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 */
/* 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 )
#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;
}
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 */
{
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;
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" ) )
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]] */
}
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
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;
}
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';
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 );
}
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 );
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 );
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 );
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 )
{
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 );