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

demux: remove demux_sys_t.info

parent be3414d0
......@@ -81,13 +81,6 @@ struct demux_t
int (*pf_demux) ( demux_t * ); /* demux one frame only */
int (*pf_control)( demux_t *, int i_query, va_list args);
/* Demux has to maintain them uptodate
* when it is responsible of seekpoint/title */
struct
{
unsigned int i_update; /* Demux sets them on change,
Input removes them once take into account*/
} info;
void *p_sys;
/* Weak link to parent input */
......@@ -99,7 +92,7 @@ struct demux_t
#define VLC_DEMUXER_EGENERIC -1
#define VLC_DEMUXER_SUCCESS 1
/* demux_t.info.i_update field */
/* DEMUX_TEST_AND_CLEAR flags */
#define INPUT_UPDATE_TITLE 0x0010
#define INPUT_UPDATE_SEEKPOINT 0x0020
#define INPUT_UPDATE_META 0x0040
......@@ -207,9 +200,6 @@ enum demux_query_e
* The unsigned* argument is set with the flags needed to be checked,
* on return it contains the values that were reset during the call
*
* This can can fail, in which case flags from demux_t.info.i_update
* are read/reset
*
* arg1= unsigned * */
DEMUX_TEST_AND_CLEAR_FLAGS, /* arg1= unsigned* can fail */
......
......@@ -49,11 +49,7 @@ static int Control(demux_t *demux, int query, va_list args)
unsigned *restrict pf = va_arg(args, unsigned *);
if (demux_Control(demux->p_next, DEMUX_TEST_AND_CLEAR_FLAGS, pf))
{
unsigned update = demux->info.i_update & *pf;
demux->info.i_update &= ~*pf;
*pf = update;
}
*pf = 0;
*pf &= ~(INPUT_UPDATE_TITLE|INPUT_UPDATE_SEEKPOINT|
INPUT_UPDATE_TITLE_LIST);
break;
......
......@@ -97,7 +97,6 @@ struct demux_sys_t
{
demux_Control( p_demux->p_next, DEMUX_SET_TITLE,
i_longest_title );
p_demux->info.i_update = p_demux->p_next->info.i_update;
}
}
}
......
......@@ -243,7 +243,6 @@ demux_t *demux_NewAdvanced( vlc_object_t *p_obj, input_thread_t *p_parent_input,
p_demux->pf_demux = NULL;
p_demux->pf_control = NULL;
p_demux->p_sys = NULL;
p_demux->info.i_update = 0;
priv->destroy = s ? demux_DestroyDemux : demux_DestroyAccessDemux;
if( s != NULL )
......@@ -493,11 +492,8 @@ unsigned demux_TestAndClearFlags( demux_t *p_demux, unsigned flags )
{
unsigned update = flags;
if ( demux_Control( p_demux, DEMUX_TEST_AND_CLEAR_FLAGS, &update ) == VLC_SUCCESS )
return update;
update = p_demux->info.i_update & flags;
p_demux->info.i_update &= ~flags;
if (demux_Control( p_demux, DEMUX_TEST_AND_CLEAR_FLAGS, &update))
return 0;
return update;
}
......
......@@ -219,11 +219,9 @@ static es_out_t *test_es_out_create(vlc_object_t *parent)
static unsigned demux_test_and_clear_flags(demux_t *demux, unsigned flags)
{
unsigned update;
if (demux_Control(demux, DEMUX_TEST_AND_CLEAR_FLAGS, &update) == VLC_SUCCESS)
return update;
unsigned ret = demux->info.i_update & flags;
demux->info.i_update &= ~flags;
return ret;
if (demux_Control(demux, DEMUX_TEST_AND_CLEAR_FLAGS, &update))
return 0;
return update;
}
static void demux_get_title_list(demux_t *demux)
......
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