modules: transform vlc_tick_t value to milliseconds with MS_FROM_VLC_TICK

This commit is contained in:
Steve Lhomme 2018-05-07 16:57:45 +02:00
parent f5de48d977
commit edc5babc16
5 changed files with 7 additions and 7 deletions

View File

@ -1128,7 +1128,7 @@ cea708_t * CEA708_Decoder_New( decoder_t *p_dec )
static void CEA708_Output( cea708_t *p_cea708 )
{
Debug(printf("@%ld ms\n", p_cea708->i_clock / 1000));
Debug(printf("@%ld ms\n", MS_FROM_VLC_TICK(p_cea708->i_clock)));
subpicture_t *p_spu = CEA708_BuildSubtitle( p_cea708 );
if( p_spu )
decoder_QueueSub( p_cea708->p_dec, p_spu );

View File

@ -357,8 +357,8 @@ static void ParseMetaInfo( decoder_t *p_dec, block_t *p_spu )
p_sys->i_duration = FROM_SCALE_NZ( (p[1]<<16) + (p[2]<<8) + p[3] );
#ifdef DEBUG_CVDSUB
msg_Dbg( p_dec, "subtitle display duration %lu secs",
(long unsigned int)(p_sys->i_duration / 90000) );
msg_Dbg( p_dec, "subtitle display duration %lu ms",
MS_FROM_VLC_TICK(p_sys->i_duration) );
#endif
break;

View File

@ -398,7 +398,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
if( p_sys->p_track )
{
ass_process_chunk( p_sys->p_track, p_spu_sys->p_subs_data, p_spu_sys->i_subs_len,
p_block->i_pts / 1000, p_block->i_length / 1000 );
MS_FROM_VLC_TICK( p_block->i_pts ), MS_FROM_VLC_TICK( p_block->i_length ) );
}
vlc_mutex_unlock( &p_sys->lock );
@ -441,7 +441,7 @@ static int SubpictureValidate( subpicture_t *p_subpic,
const vlc_tick_t i_stream_date = p_spusys->i_pts + (i_ts - p_subpic->i_start);
int i_changed;
ASS_Image *p_img = ass_render_frame( p_sys->p_renderer, p_sys->p_track,
i_stream_date/1000, &i_changed );
MS_FROM_VLC_TICK( i_stream_date ), &i_changed );
if( !i_changed && !b_fmt_src && !b_fmt_dst &&
(p_img != NULL) == (p_subpic->p_region != NULL) )

View File

@ -1746,7 +1746,7 @@ static bool ReadWin32( intf_thread_t *p_intf, unsigned char *p_buffer, int *pi_s
/* On Win32, select() only works on socket descriptors */
while( WaitForSingleObjectEx( p_intf->p_sys->hConsoleIn,
INTF_IDLE_SLEEP/1000, TRUE ) == WAIT_OBJECT_0 )
MS_FROM_VLC_TICK(INTF_IDLE_SLEEP), TRUE ) == WAIT_OBJECT_0 )
{
// Prefer to fail early when there's not enough space to store a 4 bytes
// UTF8 character. The function will be immediatly called again and we won't

View File

@ -153,7 +153,7 @@ static void DisplayStat(vout_display_t *vd, picture_t *picture, subpicture_t *su
vlc_tick_t date;
memcpy(&date, p->p_pixels, sizeof(date));
msg_Dbg(vd, "VOUT got %"PRIu64" ms offset",
(vlc_tick_now() - date) / 1000 );
MS_FROM_VLC_TICK(vlc_tick_now() - date));
}
picture_Release(picture);
}