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

s/psz_name/psz_path/ for consistency

parent 890a4fb7
......@@ -75,7 +75,7 @@ struct sout_access_out_t
/** Local counter reset each time it is transferred to stats */
int64_t i_sent_bytes;
char *psz_name;
char *psz_path;
sout_access_out_sys_t *p_sys;
int (*pf_seek)( sout_access_out_t *, off_t );
int (*pf_read)( sout_access_out_t *, block_t * );
......@@ -86,7 +86,7 @@ struct sout_access_out_t
sout_instance_t *p_sout;
};
VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( sout_instance_t *, char *psz_access, char *psz_name ) );
VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( sout_instance_t *, const char *psz_access, const char *psz_name ) );
VLC_EXPORT( void, sout_AccessOutDelete, ( sout_access_out_t * ) );
VLC_EXPORT( int, sout_AccessOutSeek, ( sout_access_out_t *, off_t ) );
VLC_EXPORT( int, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) );
......
......@@ -367,7 +367,7 @@ static int OutOpen( vlc_object_t *p_this )
/* Init p_access */
p_sys->fd_data = -1;
if( parseURL( &p_sys->url, p_access->psz_name ) )
if( parseURL( &p_sys->url, p_access->psz_path ) )
goto exit_error;
if( Connect( p_this, p_sys ) )
......
......@@ -105,7 +105,7 @@ static int Open( vlc_object_t *p_this )
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
if( !p_access->psz_name )
if( !p_access->psz_path )
{
msg_Err( p_access, "no file name specified" );
return VLC_EGENERIC;
......@@ -121,7 +121,7 @@ static int Open( vlc_object_t *p_this )
var_Get( p_access, SOUT_CFG_PREFIX "append", &val );
i_flags |= val.b_bool ? O_APPEND : O_TRUNC;
if( !strcmp( p_access->psz_name, "-" ) )
if( !strcmp( p_access->psz_path, "-" ) )
{
#if defined(WIN32)
setmode (STDOUT_FILENO, O_BINARY);
......@@ -132,7 +132,7 @@ static int Open( vlc_object_t *p_this )
else
{
int fd;
char *psz_tmp = str_format( p_access, p_access->psz_name );
char *psz_tmp = str_format( p_access, p_access->psz_path );
path_sanitize( psz_tmp );
fd = utf8_open( psz_tmp, i_flags, 0666 );
......@@ -140,7 +140,7 @@ static int Open( vlc_object_t *p_this )
if( fd == -1 )
{
msg_Err( p_access, "cannot open `%s' (%s)", p_access->psz_name,
msg_Err( p_access, "cannot open `%s' (%s)", p_access->psz_path,
strerror( errno ) );
free( p_access->p_sys );
return( VLC_EGENERIC );
......@@ -152,7 +152,7 @@ static int Open( vlc_object_t *p_this )
p_access->pf_read = Read;
p_access->pf_seek = Seek;
msg_Dbg( p_access, "file access output opened (`%s')", p_access->psz_name );
msg_Dbg( p_access, "file access output opened (`%s')", p_access->psz_path );
/* Update pace control flag */
if( p_access->psz_access && !strcmp( p_access->psz_access, "stream" ) )
......@@ -168,7 +168,7 @@ static void Close( vlc_object_t * p_this )
{
sout_access_out_t *p_access = (sout_access_out_t*)p_this;
if( strcmp( p_access->psz_name, "-" ) )
if( strcmp( p_access->psz_path, "-" ) )
{
if( p_access->p_sys->i_handle )
{
......@@ -189,7 +189,7 @@ static void Close( vlc_object_t * p_this )
*****************************************************************************/
static int Read( sout_access_out_t *p_access, block_t *p_buffer )
{
if( strcmp( p_access->psz_name, "-" ) )
if( strcmp( p_access->psz_path, "-" ) )
{
return read( p_access->p_sys->i_handle, p_buffer->p_buffer,
p_buffer->i_buffer );
......@@ -225,7 +225,7 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
*****************************************************************************/
static int Seek( sout_access_out_t *p_access, off_t i_pos )
{
if( strcmp( p_access->psz_name, "-" ) )
if( strcmp( p_access->psz_path, "-" ) )
{
#if defined( WIN32 ) && !defined( UNDER_CE )
return( _lseeki64( p_access->p_sys->i_handle, i_pos, SEEK_SET ) );
......
......@@ -178,8 +178,8 @@ static int Open( vlc_object_t *p_this )
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
/* p_access->psz_name = "hostname:port/filename" */
psz_bind_addr = psz_parser = strdup( p_access->psz_name );
/* p_access->psz_path = "hostname:port/filename" */
psz_bind_addr = psz_parser = strdup( p_access->psz_path );
i_bind_port = 0;
psz_file_name = NULL;
......
......@@ -225,7 +225,7 @@ static int Open( vlc_object_t *p_this )
if (p_sys->b_rtpts)
cscov += RTP_HEADER_LENGTH;
psz_parser = strdup( p_access->psz_name );
psz_parser = strdup( p_access->psz_path );
psz_dst_addr = psz_parser;
i_dst_port = 0;
......
......@@ -89,7 +89,7 @@ int E_(OpenMux)( vlc_object_t *p_this )
/* Find the requested muxer */
file_oformat =
guess_format(NULL, p_mux->p_access->psz_name, NULL);
guess_format(NULL, p_mux->p_access->psz_path, NULL);
if (!file_oformat)
{
msg_Err( p_mux, "unable for find a suitable output format" );
......
......@@ -513,7 +513,7 @@ static int Open( vlc_object_t *p_this )
p_grab->p_sout = p_sout;
p_grab->psz_access = strdup( "grab" );
p_grab->p_cfg = NULL;
p_grab->psz_name = strdup( "" );
p_grab->psz_path = strdup( "" );
p_grab->p_sys = (sout_access_out_sys_t*)p_stream;
p_grab->pf_seek = NULL;
p_grab->pf_write = AccessOutGrabberWrite;
......
......@@ -355,7 +355,6 @@ static int Open( vlc_object_t *p_this )
#if 0
p_session->psz_uri = strdup( url.psz_host );
p_session->i_port = url.i_port;
p_session->psz_sdp = NULL;
p_session->i_payload = 33;
p_session->b_rtp = strstr( psz_access, "rtp") ? 1 : 0;
#endif
......
......@@ -275,7 +275,7 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
* sout_AccessOutNew: allocate a new access out
*****************************************************************************/
sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout,
char *psz_access, char *psz_name )
const char *psz_access, const char *psz_name )
{
sout_access_out_t *p_access;
char *psz_next;
......@@ -293,7 +293,7 @@ sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout,
{
free( psz_next );
}
p_access->psz_name = strdup( psz_name ? psz_name : "" );
p_access->psz_path = strdup( psz_name ? psz_name : "" );
p_access->p_sout = p_sout;
p_access->p_sys = NULL;
p_access->pf_seek = NULL;
......@@ -313,7 +313,7 @@ sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout,
if( !p_access->p_module )
{
free( p_access->psz_access );
free( p_access->psz_name );
free( p_access->psz_path );
vlc_object_detach( p_access );
vlc_object_destroy( p_access );
return( NULL );
......@@ -335,7 +335,7 @@ void sout_AccessOutDelete( sout_access_out_t *p_access )
config_ChainDestroy( p_access->p_cfg );
free( p_access->psz_name );
free( p_access->psz_path );
vlc_object_destroy( p_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