[vlc-commits] demux: rename psz_file to psz_filepath (refs #18504)
Rémi Denis-Courmont
git at videolan.org
Sat Dec 2 22:26:38 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 2 21:52:01 2017 +0200| [9e1f8a9e708b57ab4c38003ed910256aa0de6d1c] | committer: Rémi Denis-Courmont
demux: rename psz_file to psz_filepath (refs #18504)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e1f8a9e708b57ab4c38003ed910256aa0de6d1c
---
include/vlc_demux.h | 6 +++---
modules/access/bluray.c | 8 ++++----
modules/access/cdda.c | 2 +-
modules/access/dcp/dcp.cpp | 4 ++--
modules/access/dvdnav.c | 4 ++--
modules/access/dvdread.c | 4 ++--
modules/demux/avformat/demux.c | 14 +++++++-------
modules/demux/mkv/mkv.cpp | 8 ++++----
modules/demux/mod.c | 2 +-
modules/demux/rawvid.c | 4 ++--
modules/demux/subtitle.c | 2 +-
src/input/demux.c | 14 +++++++-------
12 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index f359f547fa..1390257b1f 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -51,7 +51,7 @@ struct demux_t
char *psz_access;
char *psz_demux;
char *psz_location;
- char *psz_file;
+ char *psz_filepath;
union {
/**
@@ -395,8 +395,8 @@ static inline void demux_UpdateTitleFromStream( demux_t *demux )
VLC_USED
static inline bool demux_IsPathExtension( demux_t *p_demux, const char *psz_extension )
{
- const char *name = (p_demux->psz_file != NULL) ? p_demux->psz_file
- : p_demux->psz_location;
+ const char *name = (p_demux->psz_filepath != NULL) ? p_demux->psz_filepath
+ : p_demux->psz_location;
const char *psz_ext = strrchr ( name, '.' );
if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
return false;
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index cb1986fa98..a209dc0434 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -643,11 +643,11 @@ static int blurayOpen(vlc_object_t *object)
}
} else if (!forced) {
- if (!p_demux->psz_file) {
+ if (!p_demux->psz_filepath) {
return VLC_EGENERIC;
}
- if (probeFile(p_demux->psz_file) != VLC_SUCCESS) {
+ if (probeFile(p_demux->psz_filepath) != VLC_SUCCESS) {
return VLC_EGENERIC;
}
}
@@ -689,12 +689,12 @@ static int blurayOpen(vlc_object_t *object)
} else
#endif
{
- if (!p_demux->psz_file) {
+ if (!p_demux->psz_filepath) {
/* no path provided (bluray://). use default DVD device. */
p_sys->psz_bd_path = var_InheritString(object, "dvd");
} else {
/* store current bd path */
- p_sys->psz_bd_path = strdup(p_demux->psz_file);
+ p_sys->psz_bd_path = strdup(p_demux->psz_filepath);
}
/* If we're passed a block device, try to convert it to the mount point. */
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index e52594d30d..b13bd6de54 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -217,7 +217,7 @@ static int DemuxOpen(vlc_object_t *obj)
demux_t *demux = (demux_t *)obj;
unsigned track;
- vcddev_t *dev = DiscOpen(obj, demux->psz_location, demux->psz_file,
+ vcddev_t *dev = DiscOpen(obj, demux->psz_location, demux->psz_filepath,
&track);
if (dev == NULL)
return VLC_EGENERIC;
diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index b7773d3c2c..32822dda27 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -304,7 +304,7 @@ static int Open( vlc_object_t *obj )
es_format_t video_format, audio_format;
int retval;
- if( !p_demux->psz_file )
+ if( !p_demux->psz_filepath )
return VLC_EGENERIC;
p_sys = new ( nothrow ) demux_sys_t();
@@ -932,7 +932,7 @@ int dcpInit ( demux_t *p_demux )
demux_sys_t *p_sys = p_demux->p_sys;
dcp_t *p_dcp = p_sys->p_dcp;
- p_dcp->path = p_demux->psz_file;
+ p_dcp->path = p_demux->psz_filepath;
/* Add a '/' in end of path if needed */
if ( *(p_dcp->path).rbegin() != '/')
p_dcp->path.append( "/" );
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 6a4cc4f215..469d2a7125 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -347,7 +347,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )
if( !strncmp(p_demux->psz_access, "dvd", 3) )
forced = true;
- if( !p_demux->psz_file || !*p_demux->psz_file )
+ if( !p_demux->psz_filepath || !*p_demux->psz_filepath )
{
/* Only when selected */
if( !forced )
@@ -356,7 +356,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this )
psz_file = var_InheritString( p_this, "dvd" );
}
else
- psz_file = strdup( p_demux->psz_file );
+ psz_file = strdup( p_demux->psz_filepath );
#if defined( _WIN32 ) || defined( __OS2__ )
if( psz_file != NULL )
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 0f8d7a1059..1a2d0f7e65 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -166,7 +166,7 @@ static int Open( vlc_object_t *p_this )
char *psz_file;
ifo_handle_t *p_vmg_file;
- if( !p_demux->psz_file || !*p_demux->psz_file )
+ if( !p_demux->psz_filepath || !*p_demux->psz_filepath )
{
/* Only when selected */
if( !*p_demux->psz_access )
@@ -175,7 +175,7 @@ static int Open( vlc_object_t *p_this )
psz_file = var_InheritString( p_this, "dvd" );
}
else
- psz_file = strdup( p_demux->psz_file );
+ psz_file = strdup( p_demux->psz_filepath );
#if defined( _WIN32 ) || defined( __OS2__ )
if( psz_file != NULL )
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 5aca8a9b8b..5872ffb888 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -175,8 +175,8 @@ int avformat_OpenDemux( vlc_object_t *p_this )
memcpy( pd.buf, peek, pd.buf_size );
memset( pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE );
- if( p_demux->psz_file )
- psz_url = strdup( p_demux->psz_file );
+ if( p_demux->psz_filepath )
+ psz_url = strdup( p_demux->psz_filepath );
else
{
if( asprintf( &psz_url, "%s://%s", p_demux->psz_access,
@@ -243,22 +243,22 @@ int avformat_OpenDemux( vlc_object_t *p_this )
{
int i_len;
- if( !p_demux->psz_file )
+ if( !p_demux->psz_filepath )
{
free( psz_url );
return VLC_EGENERIC;
}
- i_len = strlen( p_demux->psz_file );
+ i_len = strlen( p_demux->psz_filepath );
if( i_len < 4 )
{
free( psz_url );
return VLC_EGENERIC;
}
- if( strcasecmp( &p_demux->psz_file[i_len - 4], ".str" ) &&
- strcasecmp( &p_demux->psz_file[i_len - 4], ".xai" ) &&
- strcasecmp( &p_demux->psz_file[i_len - 3], ".xa" ) )
+ if( strcasecmp( &p_demux->psz_filepath[i_len - 4], ".str" ) &&
+ strcasecmp( &p_demux->psz_filepath[i_len - 4], ".xai" ) &&
+ strcasecmp( &p_demux->psz_filepath[i_len - 3], ".xa" ) )
{
free( psz_url );
return VLC_EGENERIC;
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 4068c3b0d8..1e668b6cc3 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -157,11 +157,11 @@ static int Open( vlc_object_t * p_this )
{
msg_Dbg( p_demux, "Preloading local dir" );
/* get the files from the same dir from the same family (based on p_demux->psz_path) */
- if ( p_demux->psz_file && !strcmp( p_demux->psz_access, "file" ) )
+ if ( p_demux->psz_filepath && !strcmp( p_demux->psz_access, "file" ) )
{
// assume it's a regular file
// get the directory path
- s_path = p_demux->psz_file;
+ s_path = p_demux->psz_filepath;
if (s_path.at(s_path.length() - 1) == DIR_SEP_CHAR)
{
s_path = s_path.substr(0,s_path.length()-1);
@@ -186,9 +186,9 @@ static int Open( vlc_object_t * p_this )
s_filename = s_path + DIR_SEP_CHAR + psz_file;
#if defined(_WIN32) || defined(__OS2__)
- if (!strcasecmp(s_filename.c_str(), p_demux->psz_file))
+ if (!strcasecmp(s_filename.c_str(), p_demux->psz_filepath))
#else
- if (!s_filename.compare(p_demux->psz_file))
+ if (!s_filename.compare(p_demux->psz_filepath))
#endif
{
continue; // don't reuse the original opened file
diff --git a/modules/demux/mod.c b/modules/demux/mod.c
index 368a63ccd2..46614e5a82 100644
--- a/modules/demux/mod.c
+++ b/modules/demux/mod.c
@@ -143,7 +143,7 @@ static int Open( vlc_object_t *p_this )
/* We accept file based on extension match */
if( !p_demux->obj.force )
{
- const char *psz_ext = p_demux->psz_file ? strrchr( p_demux->psz_file, '.' )
+ const char *psz_ext = p_demux->psz_filepath ? strrchr( p_demux->psz_filepath, '.' )
: NULL;
if( psz_ext )
psz_ext++;
diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index 5abe796feb..60886ae6de 100644
--- a/modules/demux/rawvid.c
+++ b/modules/demux/rawvid.c
@@ -149,10 +149,10 @@ static int Open( vlc_object_t * p_this )
if( !p_demux->obj.force )
{
/* guess preset based on file extension */
- if( !p_demux->psz_file )
+ if( !p_demux->psz_filepath )
return VLC_EGENERIC;
- const char *psz_ext = strrchr( p_demux->psz_file, '.' );
+ const char *psz_ext = strrchr( p_demux->psz_filepath, '.' );
if( !psz_ext )
return VLC_EGENERIC;
psz_ext++;
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index b6599c8269..b1f912e9e8 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -707,7 +707,7 @@ static int Open ( vlc_object_t *p_this )
es_format_Init( &fmt, SPU_ES, VLC_CODEC_SUBT );
/* Stupid language detection in the filename */
- char * psz_language = get_language_from_filename( p_demux->psz_file );
+ char * psz_language = get_language_from_filename( p_demux->psz_filepath );
if( psz_language )
{
diff --git a/src/input/demux.c b/src/input/demux.c
index 838ebe8591..ed87df5ba4 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -221,7 +221,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
p_demux->psz_access = strdup( psz_access );
p_demux->psz_demux = strdup( psz_demux );
p_demux->psz_location = strdup( psz_location );
- p_demux->psz_file = get_path( psz_location ); /* parse URL */
+ p_demux->psz_filepath = get_path( psz_location ); /* parse URL */
if( unlikely(p_demux->psz_access == NULL
|| p_demux->psz_demux == NULL
@@ -232,7 +232,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
msg_Dbg( p_obj, "creating demux: access='%s' demux='%s' "
"location='%s' file='%s'",
p_demux->psz_access, p_demux->psz_demux,
- p_demux->psz_location, p_demux->psz_file );
+ p_demux->psz_location, p_demux->psz_filepath );
p_demux->s = s;
p_demux->out = out;
@@ -250,9 +250,9 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
{
const char *psz_module = NULL;
- if( !strcmp( p_demux->psz_demux, "any" ) && p_demux->psz_file )
+ if( !strcmp( p_demux->psz_demux, "any" ) && p_demux->psz_filepath )
{
- char const* psz_ext = strrchr( p_demux->psz_file, '.' );
+ char const* psz_ext = strrchr( p_demux->psz_filepath, '.' );
if( psz_ext )
psz_module = DemuxNameFromExtension( psz_ext + 1, b_preparsing );
@@ -275,7 +275,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
return p_demux;
error:
- free( p_demux->psz_file );
+ free( p_demux->psz_filepath );
free( p_demux->psz_location );
free( p_demux->psz_demux );
free( p_demux->psz_access );
@@ -293,7 +293,7 @@ void demux_Delete( demux_t *p_demux )
module_unneed( p_demux, p_demux->p_module );
priv->destroy(p_demux);
- free( p_demux->psz_file );
+ free( p_demux->psz_filepath );
free( p_demux->psz_location );
free( p_demux->psz_demux );
free( p_demux->psz_access );
@@ -588,7 +588,7 @@ static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
p_demux->psz_access = NULL;
p_demux->psz_demux = NULL;
p_demux->psz_location = NULL;
- p_demux->psz_file = NULL;
+ p_demux->psz_filepath = NULL;
p_demux->out = NULL;
priv->destroy = demux_DestroyDemuxFilter;
p_demux->p_module =
More information about the vlc-commits
mailing list