Commit 93acbebb authored by Laurent Aimar's avatar Laurent Aimar

Privatized p_input->i_time.

parent 6a4e86ff
......@@ -413,7 +413,6 @@ struct input_thread_t
int i_state;
bool b_can_pace_control;
int64_t i_time; /* Current time */
/* All other data is input_thread is PRIVATE. You can't access it
* outside of src/input */
......
......@@ -167,7 +167,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->b_eof = false;
p_input->b_can_pace_control = true;
p_input->p->i_start = 0;
p_input->i_time = 0;
p_input->p->i_time = 0;
p_input->p->i_stop = 0;
p_input->p->i_run = 0;
p_input->p->i_title = 0;
......@@ -568,7 +568,7 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
*pb_changed = false;
if( ( p_input->p->i_stop > 0 && p_input->i_time >= p_input->p->i_stop ) ||
if( ( p_input->p->i_stop > 0 && p_input->p->i_time >= p_input->p->i_stop ) ||
( p_input->p->i_run > 0 && *pi_start_mdate+p_input->p->i_run < mdate() ) )
i_ret = 0; /* EOF */
else
......@@ -682,7 +682,7 @@ static void MainLoopInterface( input_thread_t *p_input )
if( demux_Control( p_input->p->input.p_demux,
DEMUX_GET_TIME, &i_time ) )
i_time = 0;
p_input->i_time = i_time;
p_input->p->i_time = i_time;
if( demux_Control( p_input->p->input.p_demux,
DEMUX_GET_LENGTH, &i_length ) )
......
......@@ -87,10 +87,11 @@ struct input_thread_private_t
int i_rate;
bool b_recording;
/* Playtime configuration */
/* Playtime configuration and state */
int64_t i_start; /* :start-time,0 by default */
int64_t i_stop; /* :stop-time, 0 if none */
int64_t i_run; /* :run-time, 0 if none */
int64_t i_time; /* Current time */
/* Title infos FIXME multi-input (not easy) ? */
int i_title;
......
......@@ -870,7 +870,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
if( p_item && p_input )
{
mtime_t i_duration = input_item_GetDuration( p_item );
int64_t i_time = p_input->i_time;
int64_t i_time = var_GetInteger( p_input, "time" );
sprintf( buf, "%02d:%02d:%02d",
(int)( ( i_duration - i_time ) / 3600000000 ),
(int)( ( ( i_duration - i_time ) / 60000000 ) % 60 ),
......@@ -938,10 +938,11 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
case 'T':
if( p_input )
{
int64_t i_time = var_GetInteger( p_input, "time" );
sprintf( buf, "%02d:%02d:%02d",
(int)( p_input->i_time / ( 3600000000 ) ),
(int)( ( p_input->i_time / ( 60000000 ) ) % 60 ),
(int)( ( p_input->i_time / 1000000 ) % 60 ) );
(int)( i_time / ( 3600000000 ) ),
(int)( ( i_time / ( 60000000 ) ) % 60 ),
(int)( ( i_time / 1000000 ) % 60 ) );
}
else
{
......
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