Commit 8571288d authored by Steve Lhomme's avatar Steve Lhomme Committed by Rémi Denis-Courmont

use mtime_t for ES_OUT_SET_PCR

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent e9b37a02
......@@ -60,8 +60,8 @@ enum es_out_query_e
* XXX: if you want PREROLL just call ES_OUT_SET_NEXT_DISPLAY_TIME and send
* as you would normally do.
*/
ES_OUT_SET_PCR, /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
ES_OUT_SET_GROUP_PCR, /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
ES_OUT_SET_PCR, /* arg1=mtime_t i_pcr(microsecond!) (using default group 0)*/
ES_OUT_SET_GROUP_PCR, /* arg1= int i_group, arg2=mtime_t i_pcr(microsecond!)*/
ES_OUT_RESET_PCR, /* no arg */
/* Try not to use this one as it is a bit hacky */
......@@ -157,7 +157,7 @@ static inline void es_out_Delete( es_out_t *p_out )
p_out->pf_destroy( p_out );
}
static inline int es_out_SetPCR( es_out_t *out, int64_t pcr )
static inline int es_out_SetPCR( es_out_t *out, mtime_t pcr )
{
return es_out_Control( out, ES_OUT_SET_PCR, pcr );
}
......
......@@ -215,7 +215,7 @@ struct demux_sys_t
bool b_real;
/* */
int64_t i_pcr; /* The clock */
mtime_t i_pcr; /* The clock */
bool b_rtcp_sync; /* At least one track received sync */
double f_npt;
double f_npt_length;
......
......@@ -365,7 +365,7 @@ int FakeESOut::esOutControl_Callback(es_out_t *fakees, int i_query, va_list args
i_group = va_arg( args, int );
else
i_group = 0;
int64_t pcr = va_arg( args, int64_t );
mtime_t pcr = va_arg( args, mtime_t );
me->checkTimestampsStart( pcr );
pcr += me->getTimestampOffset();
AbstractCommand *command = me->commandsqueue->factory()->createEsOutControlPCRCommand( i_group, pcr );
......
......@@ -72,7 +72,7 @@ typedef struct
int i_ssnd_fsize;
int64_t i_time;
mtime_t i_time;
} demux_sys_t;
static int Demux ( demux_t *p_demux );
......
......@@ -69,7 +69,7 @@ typedef struct
struct avformat_track_s *tracks;
unsigned i_tracks;
int64_t i_pcr;
mtime_t i_pcr;
unsigned i_ssa_order;
......@@ -855,14 +855,14 @@ static int Demux( demux_t *p_demux )
if( p_frame->i_dts != VLC_TS_INVALID && p_track->p_es != NULL )
p_track->i_pcr = p_frame->i_dts;
int64_t i_ts_max = INT64_MIN;
mtime_t i_ts_max = INT64_MIN;
for( unsigned i = 0; i < p_sys->i_tracks; i++ )
{
if( p_sys->tracks[i].p_es != NULL )
i_ts_max = __MAX( i_ts_max, p_sys->tracks[i].i_pcr );
}
int64_t i_ts_min = INT64_MAX;
mtime_t i_ts_min = INT64_MAX;
for( unsigned i = 0; i < p_sys->i_tracks; i++ )
{
if( p_sys->tracks[i].p_es != NULL &&
......@@ -908,7 +908,7 @@ static void UpdateSeekPoint( demux_t *p_demux, int64_t i_time )
}
}
static void ResetTime( demux_t *p_demux, int64_t i_time )
static void ResetTime( demux_t *p_demux, mtime_t i_time )
{
demux_sys_t *p_sys = p_demux->p_sys;
......
......@@ -82,7 +82,7 @@ typedef struct
vlc_meta_t *p_meta;
int64_t i_pts;
mtime_t i_pts;
struct flac_stream_info stream_info;
bool b_stream_info;
......
......@@ -773,7 +773,7 @@ static int Demux( demux_t *p_demux)
/* update pcr */
{
int64_t i_pcr = VLC_TS_INVALID;
mtime_t i_pcr = VLC_TS_INVALID;
typedef matroska_segment_c::tracks_map_t tracks_map_t;
......
......@@ -66,7 +66,7 @@ typedef struct
es_out_id_t *es;
size_t current;
int64_t next_date;
mtime_t next_date;
bool b_slave;
bool b_first_time;
} demux_sys_t;
......@@ -179,7 +179,7 @@ static int Demux(demux_t *demux)
{
demux_sys_t *sys = demux->p_sys;
int64_t i_barrier = sys->next_date - var_GetInteger(demux->obj.parent, "spu-delay");
mtime_t i_barrier = sys->next_date - var_GetInteger(demux->obj.parent, "spu-delay");
if(i_barrier < 0)
i_barrier = sys->next_date;
......
......@@ -851,7 +851,7 @@ static int Demux( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
int64_t i_barrier = p_sys->i_next_demux_date - var_GetInteger( p_demux->obj.parent, "spu-delay" );
mtime_t i_barrier = p_sys->i_next_demux_date - var_GetInteger( p_demux->obj.parent, "spu-delay" );
if( i_barrier < 0 )
i_barrier = p_sys->i_next_demux_date;
......
......@@ -46,7 +46,7 @@ typedef struct
xml_t* p_xml;
xml_reader_t* p_reader;
es_out_id_t* p_es;
int64_t i_next_demux_time;
mtime_t i_next_demux_time;
bool b_slave;
bool b_first_time;
......@@ -349,9 +349,9 @@ static int Demux( demux_t* p_demux )
while( p_sys->times.i_current + 1 < p_sys->times.i_count &&
tt_time_Convert( &p_sys->times.p_array[p_sys->times.i_current] ) <= p_sys->i_next_demux_time )
{
const int64_t i_playbacktime =
const mtime_t i_playbacktime =
tt_time_Convert( &p_sys->times.p_array[p_sys->times.i_current] );
const int64_t i_playbackendtime =
const mtime_t i_playbackendtime =
tt_time_Convert( &p_sys->times.p_array[p_sys->times.i_current + 1] ) - 1;
if ( !p_sys->b_slave && p_sys->b_first_time )
......
......@@ -533,7 +533,7 @@ static int Demux( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
int64_t i_barrier = p_sys->i_next_demux_time;
mtime_t i_barrier = p_sys->i_next_demux_time;
while( p_sys->index.i_current < p_sys->index.i_count &&
p_sys->index.p_array[p_sys->index.i_current].time <= i_barrier )
......
......@@ -2490,7 +2490,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
if( !p_pgrm )
return VLC_EGENERIC;
i_pcr = va_arg( args, int64_t );
i_pcr = va_arg( args, mtime_t );
if( i_pcr == VLC_TS_INVALID )
{
msg_Err( p_sys->p_input, "Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !" );
......
......@@ -1370,14 +1370,14 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
p_cmd->u.control.u.i_int = (int)va_arg( args, int );
break;
case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_PCR: /* arg1=mtime_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */
p_cmd->u.control.u.i_i64 = (int64_t)va_arg( args, int64_t );
break;
case ES_OUT_SET_GROUP_PCR: /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
case ES_OUT_SET_GROUP_PCR: /* arg1= int i_group, arg2=mtime_t i_pcr(microsecond!)*/
p_cmd->u.control.u.int_i64.i_int = (int)va_arg( args, int );
p_cmd->u.control.u.int_i64.i_i64 = (int64_t)va_arg( args, int64_t );
p_cmd->u.control.u.int_i64.i_i64 = (int64_t)va_arg( args, mtime_t );
break;
case ES_OUT_SET_ES_SCRAMBLED_STATE:
......@@ -1529,11 +1529,11 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
case ES_OUT_DEL_GROUP: /* arg1=int i_group */
return es_out_Control( p_out, i_query, p_cmd->u.control.u.i_int );
case ES_OUT_SET_PCR: /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_PCR: /* arg1=mtime_t i_pcr(microsecond!) (using default group 0)*/
case ES_OUT_SET_NEXT_DISPLAY_TIME: /* arg1=int64_t i_pts(microsecond) */
return es_out_Control( p_out, i_query, p_cmd->u.control.u.i_i64 );
case ES_OUT_SET_GROUP_PCR: /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
case ES_OUT_SET_GROUP_PCR: /* arg1= int i_group, arg2=mtime_t i_pcr(microsecond!)*/
return es_out_Control( p_out, i_query, p_cmd->u.control.u.int_i64.i_int,
p_cmd->u.control.u.int_i64.i_i64 );
......
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