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

demux: rename psz_demux to psz_name (refs #18504)

parent 8f6ff46b
......@@ -48,7 +48,7 @@ struct demux_t
module_t *p_module;
/* eg informative but needed (we can have access+demux) */
char *psz_demux;
char *psz_name;
char *psz_url;
const char *psz_location;
char *psz_filepath;
......@@ -412,7 +412,7 @@ static inline bool demux_IsContentType(demux_t *demux, const char *type)
VLC_USED
static inline bool demux_IsForced( demux_t *p_demux, const char *psz_name )
{
if( !p_demux->psz_demux || strcmp( p_demux->psz_demux, psz_name ) )
if( p_demux->psz_name == NULL || strcmp( p_demux->psz_name, psz_name ) )
return false;
return true;
}
......
......@@ -455,8 +455,7 @@ static int DemuxOpen ( vlc_object_t *p_this )
dvdnav_t *p_dvdnav = NULL;
bool forced = false, b_seekable = false;
if( p_demux->psz_demux != NULL
&& !strncmp(p_demux->psz_demux, "dvd", 3) )
if( p_demux->psz_name != NULL && !strncmp(p_demux->psz_name, "dvd", 3) )
forced = true;
/* StreamProbeDVD need FASTSEEK, but if dvd is forced, we don't probe thus
......
......@@ -162,16 +162,16 @@ static int Open (vlc_object_t *obj)
demux_t *demux = (demux_t *)obj;
int tp; /* transport protocol */
if (!strcasecmp(demux->psz_demux, "dccp"))
if (!strcasecmp(demux->psz_name, "dccp"))
tp = IPPROTO_DCCP;
else
if (!strcasecmp(demux->psz_demux, "rtptcp"))
if (!strcasecmp(demux->psz_name, "rtptcp"))
tp = IPPROTO_TCP;
else
if (!strcasecmp(demux->psz_demux, "rtp"))
if (!strcasecmp(demux->psz_name, "rtp"))
tp = IPPROTO_UDP;
else
if (!strcasecmp(demux->psz_demux, "udplite"))
if (!strcasecmp(demux->psz_name, "udplite"))
tp = IPPROTO_UDPLITE;
else
return VLC_EGENERIC;
......@@ -637,7 +637,7 @@ static void mpv_decode (demux_t *demux, void *data, block_t *block)
*/
static void *ts_init (demux_t *demux)
{
char const* name = demux->psz_demux;
char const* name = demux->psz_name;
if (*name == '\0' || !strcasecmp(name, "any"))
name = NULL;
......
......@@ -161,7 +161,7 @@ static int Open (vlc_object_t *obj)
p_sys->conn = conn;
/* Find configured screen */
if (!strcasecmp(demux->psz_demux, "screen"))
if (!strcasecmp(demux->psz_name, "screen"))
{
const xcb_setup_t *setup = xcb_get_setup (conn);
const xcb_screen_t *scr = NULL;
......@@ -184,7 +184,7 @@ static int Open (vlc_object_t *obj)
}
else
/* Determine capture window */
if (!strcasecmp(demux->psz_demux, "window"))
if (!strcasecmp(demux->psz_name, "window"))
{
char *end;
unsigned long ul = strtoul (demux->psz_location, &end, 0);
......
......@@ -177,7 +177,7 @@ static int OpenDemux ( vlc_object_t *p_this )
p_demux->p_sys = NULL;
/* Only when selected */
if( *p_demux->psz_demux == '\0' )
if( *p_demux->psz_name == '\0' )
return VLC_EGENERIC;
msg_Dbg( p_demux, "Init Stat demux" );
......
......@@ -220,8 +220,8 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
size_t schemelen = strlen(psz_access);
p_demux->p_input = p_parent_input;
p_demux->psz_demux = strdup( psz_demux );
if (unlikely(p_demux->psz_demux == NULL))
p_demux->psz_name = strdup( psz_demux );
if (unlikely(p_demux->psz_name == NULL))
goto error;
if (unlikely(asprintf(&p_demux->psz_url, "%s://%s", psz_access,
......@@ -233,7 +233,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
if( !b_preparsing )
msg_Dbg( p_obj, "creating demux: access='%s' demux='%s' "
"location='%s' file='%s'", psz_access, p_demux->psz_demux,
"location='%s' file='%s'", psz_access, psz_demux,
p_demux->psz_location, p_demux->psz_filepath );
p_demux->s = s;
......@@ -252,7 +252,7 @@ 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_filepath )
if( !strcmp( p_demux->psz_name, "any" ) && p_demux->psz_filepath )
{
char const* psz_ext = strrchr( p_demux->psz_filepath, '.' );
......@@ -261,10 +261,10 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
}
if( psz_module == NULL )
psz_module = p_demux->psz_demux;
psz_module = p_demux->psz_name;
p_demux->p_module = vlc_module_load(p_demux, "demux", psz_module,
!strcmp(psz_module, p_demux->psz_demux), demux_Probe, p_demux);
!strcmp(psz_module, p_demux->psz_name), demux_Probe, p_demux);
}
else
{
......@@ -281,7 +281,7 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
return p_demux;
error:
free( p_demux->psz_demux );
free( p_demux->psz_name );
vlc_object_release( p_demux );
return NULL;
}
......@@ -298,7 +298,7 @@ void demux_Delete( demux_t *p_demux )
priv->destroy(p_demux);
free( p_demux->psz_filepath );
free( p_demux->psz_url );
free( p_demux->psz_demux );
free( p_demux->psz_name );
vlc_object_release( p_demux );
}
......@@ -587,7 +587,7 @@ static demux_t *demux_FilterNew( demux_t *p_next, const char *p_name )
p_demux->p_next = p_next;
p_demux->p_input = NULL;
p_demux->p_sys = NULL;
p_demux->psz_demux = NULL;
p_demux->psz_name = NULL;
p_demux->psz_url = NULL;
p_demux->psz_location = NULL;
p_demux->psz_filepath = NULL;
......
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