From: RĂ©mi Denis-Courmont Date: Sat, 10 Feb 2007 14:53:47 +0000 (+0000) Subject: s/psz_name/psz_path/ for consistency X-Git-Tag: 0.9.0-test0~8663 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=af518b8ae9cd02f3fdf61fbc4d4cfa08d73b7b07;p=vlc s/psz_name/psz_path/ for consistency --- diff --git a/include/vlc_sout.h b/include/vlc_sout.h index 74926ea01d..cb93b43598 100644 --- a/include/vlc_sout.h +++ b/include/vlc_sout.h @@ -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 * ) ); diff --git a/modules/access/ftp.c b/modules/access/ftp.c index 02db0acee8..ff8ae8d9fa 100644 --- a/modules/access/ftp.c +++ b/modules/access/ftp.c @@ -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 ) ) diff --git a/modules/access_output/file.c b/modules/access_output/file.c index 1f07ec4504..6d28236957 100644 --- a/modules/access_output/file.c +++ b/modules/access_output/file.c @@ -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 ) ); diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 9c1c44350f..66099bb356 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -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; diff --git a/modules/access_output/udp.c b/modules/access_output/udp.c index 2d162d814b..3207988f55 100644 --- a/modules/access_output/udp.c +++ b/modules/access_output/udp.c @@ -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; diff --git a/modules/codec/ffmpeg/mux.c b/modules/codec/ffmpeg/mux.c index 9b7d5623a2..9844dfe65c 100644 --- a/modules/codec/ffmpeg/mux.c +++ b/modules/codec/ffmpeg/mux.c @@ -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" ); diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index b4b50ab48d..d97d10d903 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -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; diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c index 2cef71be96..b8b8122397 100644 --- a/modules/stream_out/standard.c +++ b/modules/stream_out/standard.c @@ -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 diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index c878b22ae7..c4532c4a57 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -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 ); }