+ }
+ else if( i_ret < 0 )
+ {
+ input_ChangeState( p_input, ERROR_S );
+ }
+
+ if( i_ret > 0 && p_input->p->i_slave > 0 )
+ {
+ SlaveDemux( p_input );
+ }
+}
+
+/**
+ * MainLoopInterface
+ * It update the variables used by the interfaces
+ */
+static void MainLoopInterface( input_thread_t *p_input )
+{
+ vlc_value_t val;
+ double f_pos;
+ int64_t i_time, i_length;
+
+ /* update input status variables */
+ if( !demux_Control( p_input->p->input.p_demux,
+ DEMUX_GET_POSITION, &f_pos ) )
+ {
+ val.f_float = (float)f_pos;
+ var_Change( p_input, "position", VLC_VAR_SETVALUE, &val, NULL );
+ }
+ if( !demux_Control( p_input->p->input.p_demux,
+ DEMUX_GET_TIME, &i_time ) )
+ {
+ p_input->i_time = i_time;
+ val.i_time = i_time;
+ var_Change( p_input, "time", VLC_VAR_SETVALUE, &val, NULL );
+ }
+ if( !demux_Control( p_input->p->input.p_demux,
+ DEMUX_GET_LENGTH, &i_length ) )
+ {
+ vlc_value_t old_val;
+ var_Get( p_input, "length", &old_val );
+ val.i_time = i_length;
+ var_Change( p_input, "length", VLC_VAR_SETVALUE, &val, NULL );
+
+ if( old_val.i_time != val.i_time )