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

input: always pass meta data through demux (refs #8456)

parent d2cd2e5d
......@@ -878,7 +878,7 @@ static int ReadICYMeta( access_t *p_access )
p_sys->psz_icy_title = EnsureUTF8( psz_tmp );
if( !p_sys->psz_icy_title )
free( psz_tmp );
p_access->info.i_update |= INPUT_UPDATE_META;
//p_access->info.i_update |= INPUT_UPDATE_META; FIXME
msg_Dbg( p_access, "New Title=%s", p_sys->psz_icy_title );
}
......
......@@ -530,6 +530,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
return VLC_EGENERIC;
case DEMUX_GET_META:
return stream_Control( p_demux->s, STREAM_GET_META, args );
case DEMUX_GET_FPS:
default:
return VLC_EGENERIC;
......
......@@ -1189,6 +1189,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
}
case DEMUX_GET_META:
return stream_Control( p_demux->s, STREAM_GET_META, args );
case DEMUX_CAN_RECORD:
pb_bool = (bool*)va_arg( args, bool * );
*pb_bool = true;
......
......@@ -307,9 +307,11 @@ int demux_vaControlHelper( stream_t *s,
}
return VLC_EGENERIC;
case DEMUX_GET_META:
return stream_Control( s, STREAM_GET_META, args );
case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
case DEMUX_HAS_UNSUPPORTED_META:
case DEMUX_SET_NEXT_DEMUX_TIME:
case DEMUX_GET_TITLE_INFO:
......
......@@ -76,7 +76,6 @@ static bool ControlIsSeekRequest( int i_type );
static bool Control( input_thread_t *, int, vlc_value_t );
static int UpdateTitleSeekpointFromAccess( input_thread_t * );
static void UpdateGenericFromAccess( input_thread_t * );
static int UpdateTitleSeekpointFromDemux( input_thread_t * );
static void UpdateGenericFromDemux( input_thread_t * );
......@@ -584,7 +583,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_d
i_ret = UpdateTitleSeekpointFromAccess( p_input );
*pb_changed = true;
}
UpdateGenericFromAccess( p_input );
}
}
......@@ -2026,9 +2024,6 @@ static bool Control( input_thread_t *p_input,
p_meta = vlc_meta_New();
if( p_meta )
{
if( slave->p_stream != NULL )
stream_Control( slave->p_stream,
STREAM_GET_META, p_meta );
demux_Control( slave->p_demux, DEMUX_GET_META, p_meta );
InputUpdateMeta( p_input, p_meta );
}
......@@ -2275,23 +2270,6 @@ static int UpdateTitleSeekpointFromAccess( input_thread_t *p_input )
p_access->info.i_seekpoint );
return 1;
}
static void UpdateGenericFromAccess( input_thread_t *p_input )
{
stream_t *p_stream = p_input->p->input.p_stream;
access_t *p_access = p_input->p->input.p_access;
if( p_access->info.i_update & INPUT_UPDATE_META )
{
/* TODO maybe multi - access ? */
vlc_meta_t *p_meta = vlc_meta_New();
if( p_meta )
{
stream_Control( p_stream, STREAM_GET_META, p_meta );
InputUpdateMeta( p_input, p_meta );
}
p_access->info.i_update &= ~INPUT_UPDATE_META;
}
}
/*****************************************************************************
* InputSourceNew:
......@@ -2666,11 +2644,6 @@ static void InputSourceMeta( input_thread_t *p_input,
bool has_meta = false;
/* Read access meta */
if( p_stream != NULL
&& !stream_Control( p_stream, STREAM_GET_META, p_meta ) )
has_meta = true;
/* Read demux meta */
if( !demux_Control( p_demux, DEMUX_GET_META, p_meta ) )
has_meta = true;
......
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