From ded62a069f457ae919fae30b60d920a8ac3c92b4 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 2 Jul 2018 15:52:19 +0200 Subject: [PATCH] rename VLC_TS_0 to VLC_TICK_0 --- include/vlc_config.h | 2 +- modules/access/cdda.c | 2 +- modules/access/decklink.cpp | 6 ++--- modules/access/dshow/dshow.cpp | 2 +- modules/access/jack.c | 2 +- modules/access/live555.cpp | 8 +++--- modules/access/qtsound.m | 2 +- modules/access/timecode.c | 4 +-- modules/codec/avcodec/encoder.c | 4 +-- modules/codec/dmo/dmo.c | 2 +- modules/codec/schroedinger.c | 8 +++--- modules/codec/stl.c | 4 +-- modules/codec/textst.c | 4 +-- modules/codec/ttml/substtml.c | 8 +++--- modules/codec/webvtt/subsvtt.c | 2 +- modules/demux/adaptive/PlaylistManager.cpp | 4 +-- modules/demux/adaptive/Streams.cpp | 8 +++--- .../demux/adaptive/playlist/SegmentList.cpp | 4 +-- modules/demux/adaptive/plumbing/Demuxer.cpp | 2 +- modules/demux/aiff.c | 4 +-- modules/demux/asf/asf.c | 10 +++---- modules/demux/asf/asfpacket.c | 4 +-- modules/demux/au.c | 4 +-- modules/demux/avformat/demux.c | 6 ++--- modules/demux/avi/avi.c | 12 ++++----- modules/demux/caf.c | 2 +- modules/demux/cdg.c | 8 +++--- modules/demux/flac.c | 4 +-- modules/demux/gme.c | 2 +- modules/demux/hls/playlist/Parser.cpp | 2 +- modules/demux/image.c | 12 ++++----- modules/demux/mjpeg.c | 2 +- modules/demux/mkv/demux.hpp | 2 +- modules/demux/mkv/matroska_segment.cpp | 4 +-- modules/demux/mkv/mkv.cpp | 4 +-- modules/demux/mkv/virtual_segment.cpp | 12 ++++----- modules/demux/mod.c | 8 +++--- modules/demux/mp4/heif.c | 2 +- modules/demux/mp4/mp4.c | 26 +++++++++---------- modules/demux/mpc.c | 2 +- modules/demux/mpeg/es.c | 8 +++--- modules/demux/mpeg/h26x.c | 4 +-- modules/demux/mpeg/mpeg4_iod.c | 2 +- modules/demux/mpeg/mpgv.c | 2 +- modules/demux/mpeg/ps.c | 4 +-- modules/demux/mpeg/timestamps.h | 4 +-- modules/demux/mpeg/ts.c | 4 +-- modules/demux/mpeg/ts_scte.c | 2 +- modules/demux/nsv.c | 10 +++---- modules/demux/nuv.c | 10 +++---- modules/demux/ogg.c | 18 ++++++------- modules/demux/ogg_granule.c | 2 +- modules/demux/oggseek.c | 4 +-- modules/demux/pva.c | 6 ++--- modules/demux/rawaud.c | 2 +- modules/demux/rawdv.c | 4 +-- modules/demux/rawvid.c | 2 +- modules/demux/real.c | 6 ++--- modules/demux/sid.cpp | 2 +- modules/demux/smf.c | 10 +++---- modules/demux/stl.c | 6 ++--- modules/demux/subtitle.c | 12 ++++----- modules/demux/tta.c | 2 +- modules/demux/ttml.c | 8 +++--- modules/demux/ty.c | 8 +++--- modules/demux/vc1.c | 10 +++---- modules/demux/vobsub.c | 2 +- modules/demux/voc.c | 4 +-- modules/demux/wav.c | 2 +- modules/demux/webvtt.c | 12 ++++----- modules/demux/xa.c | 2 +- modules/misc/stats.c | 2 +- modules/packetizer/flac.h | 4 +-- modules/packetizer/mpegvideo.c | 2 +- modules/visualization/goom.c | 2 +- 75 files changed, 197 insertions(+), 197 deletions(-) diff --git a/include/vlc_config.h b/include/vlc_config.h index 823a0c2a5f..3a6f8fad67 100644 --- a/include/vlc_config.h +++ b/include/vlc_config.h @@ -41,7 +41,7 @@ /* All timestamp below or equal to this define are invalid/unset * XXX the numerical value is 0 because of historical reason and will change.*/ #define VLC_TICK_INVALID INT64_C(0) -#define VLC_TS_0 INT64_C(1) +#define VLC_TICK_0 INT64_C(1) #define CLOCK_FREQ INT64_C(1000000) diff --git a/modules/access/cdda.c b/modules/access/cdda.c index f906ca7b2e..73e0ca7a75 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -254,7 +254,7 @@ static int DemuxOpen(vlc_object_t *obj, vcddev_t *dev, unsigned track) sys->es = es_out_Add(demux->out, &fmt); date_Init(&sys->pts, 44100, 1); - date_Set(&sys->pts, VLC_TS_0); + date_Set(&sys->pts, VLC_TICK_0); sys->position = 0; demux->pf_demux = Demux; diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp index eb5369eea2..1650351183 100644 --- a/modules/access/decklink.cpp +++ b/modules/access/decklink.cpp @@ -332,7 +332,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame BMDTimeValue stream_time, frame_duration; videoFrame->GetStreamTime(&stream_time, &frame_duration, CLOCK_FREQ); video_frame->i_flags = BLOCK_FLAG_TYPE_I | sys->dominance_flags; - video_frame->i_pts = video_frame->i_dts = VLC_TS_0 + stream_time; + video_frame->i_pts = video_frame->i_dts = VLC_TICK_0 + stream_time; if (sys->video_fmt.i_codec == VLC_CODEC_I422_10L) { v210_convert((uint16_t*)video_frame->p_buffer, frame_bytes, width, height); @@ -347,7 +347,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame block_t *cc = vanc_to_cc(demux_, dec, width * 2); if (!cc) continue; - cc->i_pts = cc->i_dts = VLC_TS_0 + stream_time; + cc->i_pts = cc->i_dts = VLC_TICK_0 + stream_time; if (!sys->cc_es) { es_format_t fmt; @@ -399,7 +399,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame BMDTimeValue packet_time; audioFrame->GetPacketTime(&packet_time, CLOCK_FREQ); - audio_frame->i_pts = audio_frame->i_dts = VLC_TS_0 + packet_time; + audio_frame->i_pts = audio_frame->i_dts = VLC_TICK_0 + packet_time; vlc_mutex_lock(&sys->pts_lock); if (audio_frame->i_pts > sys->last_pts) diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index 21e89bfa47..4c569847c9 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -1890,7 +1890,7 @@ static int Demux( demux_t *p_demux ) if( i_pts != VLC_TICK_INVALID ) { i_pts += 5; i_pts /= 10; /* 100-ns to µs conversion */ - i_pts += VLC_TS_0; + i_pts += VLC_TICK_0; } #if 0 msg_Dbg( p_demux, "Read() stream: %i, size: %i, PTS: %" PRId64, diff --git a/modules/access/jack.c b/modules/access/jack.c index 782b85488d..0e19ef0b36 100644 --- a/modules/access/jack.c +++ b/modules/access/jack.c @@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this ) p_sys->p_es_audio = es_out_Add( p_demux->out, &fmt ); date_Init( &p_sys->pts, fmt.audio.i_rate, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); return VLC_SUCCESS; } diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp index 5441ee8add..f34a39913e 100644 --- a/modules/access/live555.cpp +++ b/modules/access/live555.cpp @@ -1454,7 +1454,7 @@ static int Demux( demux_t *p_demux ) tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY; } if( p_sys->i_pcr != VLC_TICK_INVALID ) - es_out_SetPCR( p_demux->out, VLC_TS_0 + + es_out_SetPCR( p_demux->out, VLC_TICK_0 + __MAX(0, p_sys->i_pcr - PCR_OFF) ); } else if( p_sys->i_pcr == VLC_TICK_INVALID || @@ -1462,7 +1462,7 @@ static int Demux( demux_t *p_demux ) { p_sys->i_pcr = __MAX(0, i_minpcr - PCR_OFF); if( p_sys->i_pcr != VLC_TICK_INVALID ) - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr ); } } @@ -2122,7 +2122,7 @@ static void StreamRead( void *p_private, unsigned int i_size, break; default: if( i_pts != tk->i_lastpts ) - p_block->i_pts = VLC_TS_0 + i_pts; + p_block->i_pts = VLC_TICK_0 + i_pts; /*FIXME: for h264 you should check that packetization-mode=1 in sdp-file */ switch( tk->fmt.i_codec ) { @@ -2133,7 +2133,7 @@ static void StreamRead( void *p_private, unsigned int i_size, p_block->i_dts = VLC_TICK_INVALID; break; default: - p_block->i_dts = VLC_TS_0 + i_pts; + p_block->i_dts = VLC_TICK_0 + i_pts; break; } diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m index 442bcc72c1..08102bc593 100644 --- a/modules/access/qtsound.m +++ b/modules/access/qtsound.m @@ -97,7 +97,7 @@ vlc_module_end () p_qtsound = p_demux; currentAudioBuffer = nil; date_Init(&date, 44100, 1); - date_Set(&date, VLC_TS_0); + date_Set(&date, VLC_TICK_0); currentPts = 0; previousPts = 0; } diff --git a/modules/access/timecode.c b/modules/access/timecode.c index 0373bd82fa..47505b5270 100644 --- a/modules/access/timecode.c +++ b/modules/access/timecode.c @@ -65,7 +65,7 @@ static int DemuxOnce (demux_t *demux, bool master) lldiv_t d; unsigned h, m, s, f; - d = lldiv (pts - VLC_TS_0, CLOCK_FREQ); + d = lldiv (pts - VLC_TICK_0, CLOCK_FREQ); f = d.rem * sys->date.i_divider_num / sys->date.i_divider_den / CLOCK_FREQ; d = lldiv (d.quot, 60); s = d.rem; @@ -187,7 +187,7 @@ static int Open (vlc_object_t *obj) } date_Init (&sys->date, num, den); - date_Set (&sys->date, VLC_TS_0); + date_Set (&sys->date, VLC_TICK_0); sys->next_time = VLC_TICK_INVALID; demux->p_sys = sys; diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c index e7525ed0ea..893146f6f0 100644 --- a/modules/codec/avcodec/encoder.c +++ b/modules/codec/avcodec/encoder.c @@ -1268,7 +1268,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns if( likely( date_Get( &p_sys->buffer_date ) != VLC_TICK_INVALID) ) { /* Convert to AV timing */ - p_sys->frame->pts = date_Get( &p_sys->buffer_date ) - VLC_TS_0; + p_sys->frame->pts = date_Get( &p_sys->buffer_date ) - VLC_TICK_0; p_sys->frame->pts = p_sys->frame->pts * p_sys->p_context->time_base.den / CLOCK_FREQ / p_sys->p_context->time_base.num; date_Increment( &p_sys->buffer_date, p_sys->frame->nb_samples ); @@ -1396,7 +1396,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf ) if( likely(date_Get( &p_sys->buffer_date ) != VLC_TICK_INVALID) ) { /* Convert to AV timing */ - p_sys->frame->pts = date_Get( &p_sys->buffer_date ) - VLC_TS_0; + p_sys->frame->pts = date_Get( &p_sys->buffer_date ) - VLC_TICK_0; p_sys->frame->pts = p_sys->frame->pts * p_sys->p_context->time_base.den / CLOCK_FREQ / p_sys->p_context->time_base.num; } diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c index 98c4feb6ad..6921e5bca6 100644 --- a/modules/codec/dmo/dmo.c +++ b/modules/codec/dmo/dmo.c @@ -597,7 +597,7 @@ static int DecOpen( decoder_t *p_dec ) date_Init( &p_sys->end_date, p_dec->fmt_in.audio.i_rate, 1 ); else date_Init( &p_sys->end_date, 25 /* FIXME */, 1 ); - date_Set( &p_sys->end_date, VLC_TS_0 ); + date_Set( &p_sys->end_date, VLC_TICK_0 ); free( p_vih ); free( p_wf ); diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c index 5b90940fbf..4bdf07c843 100644 --- a/modules/codec/schroedinger.c +++ b/modules/codec/schroedinger.c @@ -1456,16 +1456,16 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pic ) } date_Init( &date, p_enc->fmt_in.video.i_frame_rate * 2, p_enc->fmt_in.video.i_frame_rate_base ); - date_Set( &date, VLC_TS_0 ); + date_Set( &date, VLC_TICK_0 ); /* FIXME - Unlike dirac-research codec Schro doesn't have a function that returns the delay in pics yet. * Use a default of 1 */ date_Increment( &date, 2 /* 2 fields, 1 frame */ ); - p_sys->i_pts_offset = date_Get( &date ) - VLC_TS_0; + p_sys->i_pts_offset = date_Get( &date ) - VLC_TICK_0; if( schro_encoder_setting_get_double( p_sys->p_schro, "interlaced_coding" ) > 0.0 ) { - date_Set( &date, VLC_TS_0 ); + date_Set( &date, VLC_TICK_0 ); date_Increment( &date, 1 /* field */ ); - p_sys->i_field_duration = date_Get( &date ) - VLC_TS_0; + p_sys->i_field_duration = date_Get( &date ) - VLC_TICK_0; } schro_video_format_set_std_signal_range( p_sys->p_format, SCHRO_SIGNAL_RANGE_8BIT_VIDEO ); diff --git a/modules/codec/stl.c b/modules/codec/stl.c index 56e9d96bb2..1c27a7130b 100644 --- a/modules/codec/stl.c +++ b/modules/codec/stl.c @@ -415,8 +415,8 @@ static int Decode(decoder_t *p_dec, block_t *p_block) if(p_group->i_end && p_group->i_start >= p_block->i_dts) { - p_sub->i_start = VLC_TS_0 + p_group->i_start; - p_sub->i_stop = VLC_TS_0 + p_group->i_end; + p_sub->i_start = VLC_TICK_0 + p_group->i_start; + p_sub->i_stop = VLC_TICK_0 + p_group->i_end; } else { diff --git a/modules/codec/textst.c b/modules/codec/textst.c index 10ac940726..0799bce488 100644 --- a/modules/codec/textst.c +++ b/modules/codec/textst.c @@ -237,8 +237,8 @@ static int Decode(decoder_t *p_dec, block_t *p_block) { p_sub->i_start = ((int64_t) (p_block->p_buffer[3] & 0x01) << 32) | GetDWBE(&p_block->p_buffer[4]); p_sub->i_stop = ((int64_t) (p_block->p_buffer[8] & 0x01) << 32) | GetDWBE(&p_block->p_buffer[9]); - p_sub->i_start = VLC_TS_0 + p_sub->i_start * 100 / 9; - p_sub->i_stop = VLC_TS_0 + p_sub->i_stop * 100 / 9; + p_sub->i_start = VLC_TICK_0 + p_sub->i_start * 100 / 9; + p_sub->i_stop = VLC_TICK_0 + p_sub->i_stop * 100 / 9; if (p_sub->i_start < p_block->i_dts) { p_sub->i_stop += p_block->i_dts - p_sub->i_start; diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c index cf9a01a019..b66a3df5e0 100644 --- a/modules/codec/ttml/substtml.c +++ b/modules/codec/ttml/substtml.c @@ -1252,10 +1252,10 @@ static int ParseBlock( decoder_t *p_dec, const block_t *p_block ) for( size_t i=0; i+1 < i_timings_count; i++ ) { /* We Only support absolute timings (2) */ - if( tt_time_Convert( &p_timings_array[i] ) + VLC_TS_0 < p_block->i_dts ) + if( tt_time_Convert( &p_timings_array[i] ) + VLC_TICK_0 < p_block->i_dts ) continue; - if( tt_time_Convert( &p_timings_array[i] ) + VLC_TS_0 > p_block->i_dts + p_block->i_length ) + if( tt_time_Convert( &p_timings_array[i] ) + VLC_TICK_0 > p_block->i_dts + p_block->i_length ) break; bool b_bitmap_regions = false; @@ -1276,8 +1276,8 @@ static int ParseBlock( decoder_t *p_dec, const block_t *p_block ) if( p_regions && p_spu ) { - p_spu->i_start = VLC_TS_0 + tt_time_Convert( &p_timings_array[i] ); - p_spu->i_stop = VLC_TS_0 + tt_time_Convert( &p_timings_array[i+1] ) - 1; + p_spu->i_start = VLC_TICK_0 + tt_time_Convert( &p_timings_array[i] ); + p_spu->i_stop = VLC_TICK_0 + tt_time_Convert( &p_timings_array[i+1] ) - 1; p_spu->b_ephemer = true; p_spu->b_absolute = true; diff --git a/modules/codec/webvtt/subsvtt.c b/modules/codec/webvtt/subsvtt.c index 706e8f5fde..3ef73068f1 100644 --- a/modules/codec/webvtt/subsvtt.c +++ b/modules/codec/webvtt/subsvtt.c @@ -2061,7 +2061,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block ) decoder_sys_t *p_sys = p_dec->p_sys; - vlc_tick_t i_start = p_block->i_pts - VLC_TS_0; + vlc_tick_t i_start = p_block->i_pts - VLC_TICK_0; vlc_tick_t i_stop = i_start + p_block->i_length; if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY ) diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp index 41d565ddb6..19a6e99d79 100644 --- a/modules/demux/adaptive/PlaylistManager.cpp +++ b/modules/demux/adaptive/PlaylistManager.cpp @@ -275,7 +275,7 @@ AbstractStream::status PlaylistManager::dequeue(vlc_tick_t i_floor, vlc_tick_t * i_return = i_ret; if( i_pcr > i_floor ) - *pi_nzbarrier = std::min( *pi_nzbarrier, i_pcr - VLC_TS_0 ); + *pi_nzbarrier = std::min( *pi_nzbarrier, i_pcr - VLC_TICK_0 ); } return i_return; @@ -479,7 +479,7 @@ int PlaylistManager::doDemux(vlc_tick_t increment) if( demux.i_nzpcr != VLC_TICK_INVALID && i_nzbarrier != demux.i_nzpcr ) { demux.i_nzpcr = i_nzbarrier; - vlc_tick_t pcr = VLC_TS_0 + std::max(INT64_C(0), demux.i_nzpcr - CLOCK_FREQ / 10); + vlc_tick_t pcr = VLC_TICK_0 + std::max(INT64_C(0), demux.i_nzpcr - CLOCK_FREQ / 10); es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, 0, pcr); } vlc_mutex_unlock(&demux.lock); diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp index eadf4c3817..202bf41033 100644 --- a/modules/demux/adaptive/Streams.cpp +++ b/modules/demux/adaptive/Streams.cpp @@ -419,7 +419,7 @@ AbstractStream::status AbstractStream::dequeue(vlc_tick_t nz_deadline, vlc_tick_ description.c_str(), commandsqueue->getPCR(), commandsqueue->getFirstDTS(), nz_deadline)); - *pi_pcr = commandsqueue->Process(p_realdemux->out, VLC_TS_0 + nz_deadline); + *pi_pcr = commandsqueue->Process(p_realdemux->out, VLC_TICK_0 + nz_deadline); if(!commandsqueue->isEmpty()) return AbstractStream::status_demuxed; @@ -440,9 +440,9 @@ AbstractStream::status AbstractStream::dequeue(vlc_tick_t nz_deadline, vlc_tick_ description.c_str(), commandsqueue->getPCR(), commandsqueue->getFirstDTS(), nz_deadline, commandsqueue->getBufferingLevel())); - if(nz_deadline + VLC_TS_0 <= commandsqueue->getBufferingLevel()) /* demuxed */ + if(nz_deadline + VLC_TICK_0 <= commandsqueue->getBufferingLevel()) /* demuxed */ { - *pi_pcr = commandsqueue->Process( p_realdemux->out, VLC_TS_0 + nz_deadline ); + *pi_pcr = commandsqueue->Process( p_realdemux->out, VLC_TICK_0 + nz_deadline ); return AbstractStream::status_demuxed; } @@ -533,7 +533,7 @@ bool AbstractStream::setPosition(vlc_tick_t time, bool tryonly) else commandsqueue->Abort( true ); es_out_Control(p_realdemux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, - VLC_TS_0 + time); + VLC_TICK_0 + time); } return ret; } diff --git a/modules/demux/adaptive/playlist/SegmentList.cpp b/modules/demux/adaptive/playlist/SegmentList.cpp index fe926084fc..b359ff7753 100644 --- a/modules/demux/adaptive/playlist/SegmentList.cpp +++ b/modules/demux/adaptive/playlist/SegmentList.cpp @@ -178,7 +178,7 @@ bool SegmentList::getPlaybackTimeDurationBySegmentNumber(uint64_t number, if(!found) return false; - *time = VLC_TS_0 + timescale.ToTime(seg_start); - *dur = VLC_TS_0 + timescale.ToTime(seg_dura); + *time = VLC_TICK_0 + timescale.ToTime(seg_start); + *dur = VLC_TICK_0 + timescale.ToTime(seg_dura); return true; } diff --git a/modules/demux/adaptive/plumbing/Demuxer.cpp b/modules/demux/adaptive/plumbing/Demuxer.cpp index 8f39852a1b..54fdca1743 100644 --- a/modules/demux/adaptive/plumbing/Demuxer.cpp +++ b/modules/demux/adaptive/plumbing/Demuxer.cpp @@ -240,7 +240,7 @@ bool SlaveDemuxer::create() int SlaveDemuxer::demux(vlc_tick_t nz_deadline) { /* Always call with increment or buffering will get slow stuck */ - vlc_tick_t i_next_demux_time = VLC_TS_0 + nz_deadline + CLOCK_FREQ / 4; + vlc_tick_t i_next_demux_time = VLC_TICK_0 + nz_deadline + CLOCK_FREQ / 4; if( demux_Control(p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_next_demux_time ) != VLC_SUCCESS ) { b_eof = true; diff --git a/modules/demux/aiff.c b/modules/demux/aiff.c index d028d4b421..1af1a937e3 100644 --- a/modules/demux/aiff.c +++ b/modules/demux/aiff.c @@ -235,7 +235,7 @@ static int Demux( demux_t *p_demux ) } /* Set PCR */ - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time); /* we will read 100ms at once */ i_read = p_sys->i_ssnd_fsize * ( p_sys->fmt.audio.i_rate / 10 ); @@ -249,7 +249,7 @@ static int Demux( demux_t *p_demux ) } p_block->i_dts = - p_block->i_pts = VLC_TS_0 + p_sys->i_time; + p_block->i_pts = VLC_TICK_0 + p_sys->i_time; p_sys->i_time += CLOCK_FREQ * p_block->i_buffer / diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index 80312bbfc7..71fc6dc927 100644 --- a/modules/demux/asf/asf.c +++ b/modules/demux/asf/asf.c @@ -248,9 +248,9 @@ static int Demux( demux_t *p_demux ) bool b_data = Block_Dequeue( p_demux, p_sys->i_time + CHUNK ); p_sys->i_time += CHUNK; - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); #ifdef ASF_DEBUG - msg_Dbg( p_demux, "Demux Loop Setting PCR to %"PRId64, VLC_TS_0 + p_sys->i_time ); + msg_Dbg( p_demux, "Demux Loop Setting PCR to %"PRId64, VLC_TICK_0 + p_sys->i_time ); #endif if ( !b_data && p_sys->b_eos ) { @@ -380,7 +380,7 @@ static int SeekIndex( demux_t *p_demux, vlc_tick_t i_date, float f_pos ) if ( vlc_stream_Seek( p_demux->s, i_offset + p_sys->i_data_begin ) == VLC_SUCCESS ) { - es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_date ); + es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_date ); return VLC_SUCCESS; } else return VLC_EGENERIC; @@ -689,9 +689,9 @@ static bool Block_Dequeue( demux_t *p_demux, vlc_tick_t i_nexttime ) if( p_sys->i_time == VLC_TICK_INVALID ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); #ifdef ASF_DEBUG - msg_Dbg( p_demux, " dequeue setting PCR to %"PRId64, VLC_TS_0 + p_sys->i_time ); + msg_Dbg( p_demux, " dequeue setting PCR to %"PRId64, VLC_TICK_0 + p_sys->i_time ); #endif } diff --git a/modules/demux/asf/asfpacket.c b/modules/demux/asf/asfpacket.c index 752bd672d6..68cb1cbf86 100644 --- a/modules/demux/asf/asfpacket.c +++ b/modules/demux/asf/asfpacket.c @@ -93,8 +93,8 @@ static int DemuxSubPayload( asf_packet_sys_t *p_packetsys, return -1; } - p_frag->i_pts = (b_ignore_pts) ? VLC_TICK_INVALID : VLC_TS_0 + i_pts; - p_frag->i_dts = VLC_TS_0 + i_dts; + p_frag->i_pts = (b_ignore_pts) ? VLC_TICK_INVALID : VLC_TICK_0 + i_pts; + p_frag->i_dts = VLC_TICK_0 + i_dts; if ( b_keyframe ) p_frag->i_flags |= BLOCK_FLAG_TYPE_I; diff --git a/modules/demux/au.c b/modules/demux/au.c index 9431bf747f..7a5af13679 100644 --- a/modules/demux/au.c +++ b/modules/demux/au.c @@ -309,7 +309,7 @@ static int Demux( demux_t *p_demux ) block_t *p_block; /* set PCR */ - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); p_block = vlc_stream_Block( p_demux->s, p_sys->i_frame_size ); if( p_block == NULL ) @@ -319,7 +319,7 @@ static int Demux( demux_t *p_demux ) } p_block->i_dts = - p_block->i_pts = VLC_TS_0 + p_sys->i_time; + p_block->i_pts = VLC_TICK_0 + p_sys->i_time; es_out_Send( p_demux->out, p_sys->es, p_block ); p_sys->i_time += p_sys->i_frame_length; diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 364acae9d4..f24729557b 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -828,7 +828,7 @@ static int Demux( demux_t *p_demux ) p_frame->i_dts = q.quot * CLOCK_FREQ * p_stream->time_base.num + q.rem * CLOCK_FREQ * p_stream->time_base.num / - p_stream->time_base.den - i_start_time + VLC_TS_0; + p_stream->time_base.den - i_start_time + VLC_TICK_0; } if( pkt.pts == (int64_t)AV_NOPTS_VALUE ) @@ -839,7 +839,7 @@ static int Demux( demux_t *p_demux ) p_frame->i_pts = q.quot * CLOCK_FREQ * p_stream->time_base.num + q.rem * CLOCK_FREQ * p_stream->time_base.num / - p_stream->time_base.den - i_start_time + VLC_TS_0; + p_stream->time_base.den - i_start_time + VLC_TICK_0; } if( pkt.duration > 0 && p_frame->i_length <= 0 ) p_frame->i_length = pkt.duration * CLOCK_FREQ * @@ -948,7 +948,7 @@ static void ResetTime( demux_t *p_demux, int64_t i_time ) } if( t == VLC_TICK_INVALID ) - t = VLC_TS_0; + t = VLC_TICK_0; } p_sys->i_pcr = t; diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index fa96204fc0..8eabe1c718 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -1061,7 +1061,7 @@ static int Demux_Seekable( demux_t *p_demux ) } /* wait for the good time */ - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); p_sys->i_time += p_sys->i_read_increment; /* init toread */ @@ -1274,7 +1274,7 @@ static int Demux_Seekable( demux_t *p_demux ) continue; } - p_frame->i_pts = VLC_TS_0 + AVI_GetPTS( tk ); + p_frame->i_pts = VLC_TICK_0 + AVI_GetPTS( tk ); if( tk->idx.p_entry[tk->i_idxposc].i_flags&AVIIF_KEYFRAME ) { p_frame->i_flags = BLOCK_FLAG_TYPE_I; @@ -1364,7 +1364,7 @@ static int Demux_UnSeekable( demux_t *p_demux ) unsigned int i_stream; unsigned int i_packet; - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); /* *** find master stream for data packet skipping algo *** */ /* *** -> first video, if any, or first audio ES *** */ @@ -1464,7 +1464,7 @@ static int Demux_UnSeekable( demux_t *p_demux ) { return VLC_DEMUXER_EGENERIC; } - p_frame->i_pts = VLC_TS_0 + AVI_GetPTS( p_stream ); + p_frame->i_pts = VLC_TICK_0 + AVI_GetPTS( p_stream ); if( avi_pk.i_cat != VIDEO_ES ) p_frame->i_dts = p_frame->i_pts; @@ -1644,9 +1644,9 @@ static int Seek( demux_t *p_demux, vlc_tick_t i_date, double f_ratio, bool b_acc } } p_sys->i_time = i_start; - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time ); if( b_accurate ) - es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_date ); + es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_date ); msg_Dbg( p_demux, "seek: %"PRId64" seconds", p_sys->i_time /CLOCK_FREQ ); return VLC_SUCCESS; diff --git a/modules/demux/caf.c b/modules/demux/caf.c index b249a6a782..441763896a 100644 --- a/modules/demux/caf.c +++ b/modules/demux/caf.c @@ -335,7 +335,7 @@ static inline vlc_tick_t FrameSpanGetTime( frame_span_t *span, uint32_t i_sample if( !i_sample_rate ) return VLC_TICK_INVALID; - return ( span->i_samples * CLOCK_FREQ ) / i_sample_rate + VLC_TS_0; + return ( span->i_samples * CLOCK_FREQ ) / i_sample_rate + VLC_TICK_0; } /* SetSpanWithSample returns the span from the beginning of the file up to and diff --git a/modules/demux/cdg.c b/modules/demux/cdg.c index c45832c3e5..92315af875 100644 --- a/modules/demux/cdg.c +++ b/modules/demux/cdg.c @@ -100,7 +100,7 @@ static int Open( vlc_object_t * p_this ) /* There is CDG_FRAME_RATE frames per second */ date_Init( &p_sys->pts, CDG_FRAME_RATE, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); p_demux->pf_demux = Demux; p_demux->pf_control = Control; @@ -132,12 +132,12 @@ static int Demux( demux_t *p_demux ) i_date = vlc_stream_Tell( p_demux->s ) / CDG_FRAME_SIZE * i_delta; if( i_date >= date_Get( &p_sys->pts ) + i_delta ) { - p_block->i_dts = p_block->i_pts = VLC_TS_0 + i_date; - date_Set( &p_sys->pts, VLC_TS_0 + i_date ); + p_block->i_dts = p_block->i_pts = VLC_TICK_0 + i_date; + date_Set( &p_sys->pts, VLC_TICK_0 + i_date ); } else { - p_block->i_dts = VLC_TS_0 + i_date; + p_block->i_dts = VLC_TICK_0 + i_date; p_block->i_pts = date_Get( &p_sys->pts ); } diff --git a/modules/demux/flac.c b/modules/demux/flac.c index 83405a4fb3..1866da6c8d 100644 --- a/modules/demux/flac.c +++ b/modules/demux/flac.c @@ -372,7 +372,7 @@ static int Demux( demux_t *p_demux ) p_sys->p_current_block->i_flags = p_sys->i_next_block_flags; p_sys->i_next_block_flags = 0; p_sys->p_current_block->i_pts = - p_sys->p_current_block->i_dts = p_sys->b_start ? VLC_TS_0 : VLC_TICK_INVALID; + p_sys->p_current_block->i_dts = p_sys->b_start ? VLC_TICK_0 : VLC_TICK_INVALID; } while( (p_block_out = GetPacketizedBlock( p_sys->p_packetizer, @@ -389,7 +389,7 @@ static int Demux( demux_t *p_demux ) /* set PCR */ if( unlikely(p_sys->i_pts == VLC_TICK_INVALID) ) - es_out_SetPCR( p_demux->out, __MAX(p_block_out->i_dts - 1, VLC_TS_0) ); + es_out_SetPCR( p_demux->out, __MAX(p_block_out->i_dts - 1, VLC_TICK_0) ); p_sys->i_pts = p_block_out->i_dts; diff --git a/modules/demux/gme.c b/modules/demux/gme.c index 52adad0196..1b5bb22cb7 100644 --- a/modules/demux/gme.c +++ b/modules/demux/gme.c @@ -130,7 +130,7 @@ static int Open (vlc_object_t *obj) sys->es = es_out_Add (demux->out, &fmt); date_Init (&sys->pts, RATE, 1); - date_Set(&sys->pts, VLC_TS_0); + date_Set(&sys->pts, VLC_TICK_0); /* Titles */ unsigned n = gme_track_count (sys->emu); diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp index 000d700a20..4d84c34f9b 100644 --- a/modules/demux/hls/playlist/Parser.cpp +++ b/modules/demux/hls/playlist/Parser.cpp @@ -301,7 +301,7 @@ void M3U8Parser::parseSegments(vlc_object_t *, Representation *rep, const std::l case SingleValueTag::EXTXPROGRAMDATETIME: rep->b_consistent = false; - absReferenceTime = VLC_TS_0 + + absReferenceTime = VLC_TICK_0 + UTCTime(static_cast(tag)->getValue().value).mtime(); break; diff --git a/modules/demux/image.c b/modules/demux/image.c index a70e1aa6c8..ddc9901117 100644 --- a/modules/demux/image.c +++ b/modules/demux/image.c @@ -209,7 +209,7 @@ static int Demux(demux_t *demux) for (;;) { const vlc_tick_t pts = sys->pts_offset + date_Get(&sys->pts); - if (sys->duration >= 0 && pts >= VLC_TS_0 + sys->pts_offset + sys->duration) + if (sys->duration >= 0 && pts >= VLC_TICK_0 + sys->pts_offset + sys->duration) return VLC_DEMUXER_EOF; if (pts >= deadline) @@ -220,7 +220,7 @@ static int Demux(demux_t *demux) return VLC_DEMUXER_EGENERIC; data->i_dts = - data->i_pts = VLC_TS_0 + pts; + data->i_pts = VLC_TICK_0 + pts; es_out_SetPCR(demux->out, data->i_pts); if(sys->es) es_out_Send(demux->out, sys->es, data); @@ -263,13 +263,13 @@ static int Control(demux_t *demux, int query, va_list args) if (sys->duration < 0 || sys->is_realtime) return VLC_EGENERIC; int64_t time = va_arg(args, int64_t); - date_Set(&sys->pts, VLC_CLIP(time - sys->pts_offset, VLC_TS_0, sys->duration)); + date_Set(&sys->pts, VLC_CLIP(time - sys->pts_offset, VLC_TICK_0, sys->duration)); return VLC_SUCCESS; } case DEMUX_SET_NEXT_DEMUX_TIME: { - vlc_tick_t pts_next = VLC_TS_0 + va_arg(args, vlc_tick_t); + vlc_tick_t pts_next = VLC_TICK_0 + va_arg(args, vlc_tick_t); if (sys->pts_next == VLC_TICK_INVALID) - sys->pts_offset = pts_next - VLC_TS_0; + sys->pts_offset = pts_next - VLC_TICK_0; sys->pts_next = pts_next; return VLC_SUCCESS; } @@ -736,7 +736,7 @@ static int Open(vlc_object_t *object) sys->pts_offset = sys->is_realtime ? vlc_tick_now() : 0; sys->pts_next = VLC_TICK_INVALID; date_Init(&sys->pts, fmt.video.i_frame_rate, fmt.video.i_frame_rate_base); - date_Set(&sys->pts, VLC_TS_0); + date_Set(&sys->pts, VLC_TICK_0); es_format_Clean(&fmt); diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c index cbc5a1609d..7e6e029dc4 100644 --- a/modules/demux/mjpeg.c +++ b/modules/demux/mjpeg.c @@ -306,7 +306,7 @@ static int Open( vlc_object_t * p_this ) p_demux->p_sys = p_sys; p_sys->p_es = NULL; - p_sys->i_time = VLC_TS_0; + p_sys->i_time = VLC_TICK_0; p_sys->i_level = 0; p_sys->psz_separator = NULL; diff --git a/modules/demux/mkv/demux.hpp b/modules/demux/mkv/demux.hpp index fd3094f300..12a6d61e5d 100644 --- a/modules/demux/mkv/demux.hpp +++ b/modules/demux/mkv/demux.hpp @@ -335,7 +335,7 @@ public: ,b_fastseekable(false) ,i_pts(VLC_TICK_INVALID) ,i_pcr(VLC_TICK_INVALID) - ,i_start_pts(VLC_TS_0) + ,i_start_pts(VLC_TICK_0) ,i_mk_chapter_time(0) ,meta(NULL) ,i_current_title(0) diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp index a037a4449b..6ab71ab343 100644 --- a/modules/demux/mkv/matroska_segment.cpp +++ b/modules/demux/mkv/matroska_segment.cpp @@ -875,9 +875,9 @@ bool matroska_segment_c::Seek( demux_t &demuxer, vlc_tick_t i_absolute_mk_date, // propogate seek information // sys.i_pcr = VLC_TICK_INVALID; - sys.i_pts = VLC_TS_0 + i_mk_seek_time + i_mk_time_offset; + sys.i_pts = VLC_TICK_0 + i_mk_seek_time + i_mk_time_offset; if (b_accurate) - sys.i_start_pts = VLC_TS_0 + i_absolute_mk_date; + sys.i_start_pts = VLC_TICK_0 + i_absolute_mk_date; else sys.i_start_pts = sys.i_pts; diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp index cb12be6336..8b7dd1d561 100644 --- a/modules/demux/mkv/mkv.cpp +++ b/modules/demux/mkv/mkv.cpp @@ -730,7 +730,7 @@ static int Demux( demux_t *p_demux) { /* TODO handle successive chapters with the same user_start_time/user_end_time */ - p_sys->i_pts = p_chap->i_mk_virtual_stop_time + VLC_TS_0; + p_sys->i_pts = p_chap->i_mk_virtual_stop_time + VLC_TICK_0; p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content return 1; @@ -805,7 +805,7 @@ static int Demux( demux_t *p_demux) /* set pts */ { - p_sys->i_pts = p_sys->i_mk_chapter_time + VLC_TS_0; + p_sys->i_pts = p_sys->i_mk_chapter_time + VLC_TICK_0; if( simpleblock != NULL ) p_sys->i_pts += simpleblock->GlobalTimecode() / INT64_C( 1000 ); else p_sys->i_pts += block->GlobalTimecode() / INT64_C( 1000 ); diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp index 10edc29bf2..86e58c767b 100644 --- a/modules/demux/mkv/virtual_segment.cpp +++ b/modules/demux/mkv/virtual_segment.cpp @@ -433,16 +433,16 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux ) if ( sys.i_pts != VLC_TICK_INVALID ) { - if ( p_current_vchapter != NULL && p_current_vchapter->ContainsTimestamp( sys.i_pts - VLC_TS_0 )) + if ( p_current_vchapter != NULL && p_current_vchapter->ContainsTimestamp( sys.i_pts - VLC_TICK_0 )) p_cur_vchapter = p_current_vchapter; else if (p_cur_vedition != NULL) - p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TS_0 ); + p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TICK_0 ); } /* we have moved to a new chapter */ if ( p_cur_vchapter != NULL && p_current_vchapter != p_cur_vchapter ) { - msg_Dbg( &demux, "New Chapter %" PRId64 " uid=%" PRIu64, sys.i_pts - VLC_TS_0, + msg_Dbg( &demux, "New Chapter %" PRId64 " uid=%" PRIu64, sys.i_pts - VLC_TICK_0, p_cur_vchapter->p_chapter ? p_cur_vchapter->p_chapter->i_uid : 0 ); if ( p_cur_vedition->b_ordered ) { @@ -461,8 +461,8 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux ) Seek( demux, p_cur_vchapter->i_mk_virtual_start_time, p_cur_vchapter ); return true; } - sys.i_start_pts = p_cur_vchapter->i_mk_virtual_start_time + VLC_TS_0; - sys.i_mk_chapter_time = p_cur_vchapter->i_mk_virtual_start_time - p_cur_vchapter->segment.i_mk_start_time - ( ( p_cur_vchapter->p_chapter )? p_cur_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TS_0 */; + sys.i_start_pts = p_cur_vchapter->i_mk_virtual_start_time + VLC_TICK_0; + sys.i_mk_chapter_time = p_cur_vchapter->i_mk_virtual_start_time - p_cur_vchapter->segment.i_mk_start_time - ( ( p_cur_vchapter->p_chapter )? p_cur_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TICK_0 */; } } @@ -524,7 +524,7 @@ bool virtual_segment_c::Seek( demux_t & demuxer, vlc_tick_t i_mk_date, { vlc_tick_t i_mk_time_offset = p_vchapter->i_mk_virtual_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 ); if (CurrentEdition()->b_ordered) - p_sys->i_mk_chapter_time = p_vchapter->i_mk_virtual_start_time - p_vchapter->segment.i_mk_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TS_0 */; + p_sys->i_mk_chapter_time = p_vchapter->i_mk_virtual_start_time - p_vchapter->segment.i_mk_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TICK_0 */; if ( p_vchapter->p_chapter && p_vchapter->i_seekpoint_num > 0 ) { p_sys->i_updates |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT; diff --git a/modules/demux/mod.c b/modules/demux/mod.c index 5f685094ad..1956a1aa29 100644 --- a/modules/demux/mod.c +++ b/modules/demux/mod.c @@ -217,7 +217,7 @@ static int Open( vlc_object_t *p_this ) /* init time */ date_Init( &p_sys->pts, settings.mFrequency, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); p_sys->i_length = ModPlug_GetLength( p_sys->f ) * INT64_C(1000); msg_Dbg( p_demux, "MOD loaded name=%s length=%"PRId64"ms", @@ -304,7 +304,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) pf = va_arg( args, double* ); if( p_sys->i_length > 0 ) { - double current = date_Get( &p_sys->pts ) - VLC_TS_0; + double current = date_Get( &p_sys->pts ) - VLC_TICK_0; double length = p_sys->i_length; *pf = current / length; return VLC_SUCCESS; @@ -318,7 +318,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) if( i64 >= 0 && i64 <= p_sys->i_length ) { ModPlug_Seek( p_sys->f, i64 / 1000 ); - date_Set( &p_sys->pts, VLC_TS_0 + i64 ); + date_Set( &p_sys->pts, VLC_TICK_0 + i64 ); return VLC_SUCCESS; } @@ -340,7 +340,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) if( i64 >= 0 && i64 <= p_sys->i_length ) { ModPlug_Seek( p_sys->f, i64 / 1000 ); - date_Set( &p_sys->pts, VLC_TS_0 + i64 ); + date_Set( &p_sys->pts, VLC_TICK_0 + i64 ); return VLC_SUCCESS; } diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c index 3ce949918a..4f7ef59fc8 100644 --- a/modules/demux/mp4/heif.c +++ b/modules/demux/mp4/heif.c @@ -414,7 +414,7 @@ static int DemuxHEIF( demux_t *p_demux ) if( p_sys->i_pcr == VLC_TICK_INVALID ) { - p_sys->i_pcr = VLC_TS_0; + p_sys->i_pcr = VLC_TICK_0; es_out_SetPCR( p_demux->out, p_sys->i_pcr ); } diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index e3bfe8d563..f31d7942e1 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -1307,12 +1307,12 @@ static int DemuxTrack( demux_t *p_demux, mp4_track_t *tk, uint64_t i_readpos, /* !important! Ensure clock is set before sending data */ if( p_sys->i_pcr == VLC_TICK_INVALID ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_current_nzdts ); - p_sys->i_pcr = VLC_TS_0 + i_current_nzdts; + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_current_nzdts ); + p_sys->i_pcr = VLC_TICK_0 + i_current_nzdts; } /* dts */ - p_block->i_dts = VLC_TS_0 + i_current_nzdts; + p_block->i_dts = VLC_TICK_0 + i_current_nzdts; /* pts */ if( MP4_TrackGetPTSDelta( p_demux, tk, &i_delta ) ) p_block->i_pts = p_block->i_dts + i_delta; @@ -1457,7 +1457,7 @@ static int DemuxMoov( demux_t *p_demux ) p_sys->i_nztime += DEMUX_INCREMENT; if( p_sys->i_pcr != VLC_TICK_INVALID ) { - p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime; + p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime; es_out_SetPCR( p_demux->out, p_sys->i_pcr ); } @@ -1845,7 +1845,7 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat MP4ASF_ResetFrames( p_sys ); /* And set next display time in that trun/fragment */ if( b_iframesync && b_accurate ) - es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_nztime ); + es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_nztime ); return VLC_SUCCESS; } @@ -4423,17 +4423,17 @@ static int FragDemuxTrack( demux_t *p_demux, mp4_track_t *p_track, #if 0 msg_Dbg( p_demux, "tk(%i)=%"PRId64" mv=%"PRId64" pos=%"PRIu64, p_track->i_track_ID, - VLC_TS_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ), - VLC_TS_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ), + VLC_TICK_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ), + VLC_TICK_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ), p_track->context.i_trun_sample_pos ); #endif if ( p_track->p_es ) { - p_block->i_dts = VLC_TS_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ); + p_block->i_dts = VLC_TICK_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ); if( p_track->fmt.i_cat == VIDEO_ES && !( p_trun->i_flags & MP4_TRUN_SAMPLE_TIME_OFFSET ) ) p_block->i_pts = VLC_TICK_INVALID; else - p_block->i_pts = VLC_TS_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ); + p_block->i_pts = VLC_TICK_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ); p_block->i_length = MP4_rescale( dur, p_track->i_timescale, CLOCK_FREQ ); MP4_Block_Send( p_demux, p_track, p_block ); } @@ -4464,7 +4464,7 @@ static int DemuxMoof( demux_t *p_demux ) /* !important! Ensure clock is set before sending data */ if( p_sys->i_pcr == VLC_TICK_INVALID ) - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_nztime ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_nztime ); /* demux up to increment amount of data on every track, or just set pcr if empty data */ for( ;; ) @@ -4531,7 +4531,7 @@ static int DemuxMoof( demux_t *p_demux ) if( i_status != VLC_DEMUXER_EOS ) { p_sys->i_nztime += DEMUX_INCREMENT; - p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime; + p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime; es_out_SetPCR( p_demux->out, p_sys->i_pcr ); } else @@ -4550,7 +4550,7 @@ static int DemuxMoof( demux_t *p_demux ) if( i_segment_end != INT64_MAX ) { p_sys->i_nztime = i_segment_end; - p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime; + p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime; es_out_SetPCR( p_demux->out, p_sys->i_pcr ); } } @@ -5077,7 +5077,7 @@ end: i_demux_end = i_track_end; } if( i_demux_end != INT64_MIN ) - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_demux_end ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_demux_end ); } return i_status; diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c index bbe18d9e58..b665ea078a 100644 --- a/modules/demux/mpc.c +++ b/modules/demux/mpc.c @@ -293,7 +293,7 @@ static int Demux( demux_t *p_demux ) /* */ p_data->i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * p_sys->info.channels; p_data->i_dts = p_data->i_pts = - VLC_TS_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq; + VLC_TICK_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq; es_out_SetPCR( p_demux->out, p_data->i_dts ); diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c index 500febcc50..892ac00d05 100644 --- a/modules/demux/mpeg/es.c +++ b/modules/demux/mpeg/es.c @@ -331,13 +331,13 @@ static int Demux( demux_t *p_demux ) { if( p_block_out->i_pts == VLC_TICK_INVALID && p_block_out->i_dts == VLC_TICK_INVALID ) - p_block_out->i_dts = VLC_TS_0 + p_sys->i_pts + CLOCK_FREQ / p_sys->f_fps; + p_block_out->i_dts = VLC_TICK_0 + p_sys->i_pts + CLOCK_FREQ / p_sys->f_fps; if( p_block_out->i_dts != VLC_TICK_INVALID ) - p_sys->i_pts = p_block_out->i_dts - VLC_TS_0; + p_sys->i_pts = p_block_out->i_dts - VLC_TICK_0; } else { - p_sys->i_pts = p_block_out->i_pts - VLC_TS_0; + p_sys->i_pts = p_block_out->i_pts - VLC_TICK_0; } if( p_block_out->i_pts != VLC_TICK_INVALID ) @@ -505,7 +505,7 @@ static bool Parse( demux_t *p_demux, block_t **pp_output ) swab( p_block_in->p_buffer, p_block_in->p_buffer, p_block_in->i_buffer ); } - p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start || p_sys->b_initial_sync_failed ? VLC_TS_0 : VLC_TICK_INVALID; + p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start || p_sys->b_initial_sync_failed ? VLC_TICK_0 : VLC_TICK_INVALID; } p_sys->b_initial_sync_failed = p_sys->b_start; /* Only try to resync once */ diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c index 7234f205f5..7229b95a30 100644 --- a/modules/demux/mpeg/h26x.c +++ b/modules/demux/mpeg/h26x.c @@ -350,7 +350,7 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module, } else date_Init( &p_sys->dts, 25000, 1000 ); - date_Set( &p_sys->dts, VLC_TS_0 ); + date_Set( &p_sys->dts, VLC_TICK_0 ); /* Load the mpegvideo packetizer */ es_format_Init( &fmt, VIDEO_ES, i_codec ); @@ -470,7 +470,7 @@ static int Demux( demux_t *p_demux) p_sys->frame_rate_den = 1000; } date_Init( &p_sys->dts, 2 * p_sys->frame_rate_num, p_sys->frame_rate_den ); - date_Set( &p_sys->dts, VLC_TS_0 ); + date_Set( &p_sys->dts, VLC_TICK_0 ); msg_Dbg( p_demux, "using %.2f fps", (double) p_sys->frame_rate_num / p_sys->frame_rate_den ); } diff --git a/modules/demux/mpeg/mpeg4_iod.c b/modules/demux/mpeg/mpeg4_iod.c index cc24218ed0..1b209b4918 100644 --- a/modules/demux/mpeg/mpeg4_iod.c +++ b/modules/demux/mpeg/mpeg4_iod.c @@ -602,7 +602,7 @@ sl_header_data DecodeSLHeader( unsigned i_data, const uint8_t *p_data, i_read |= bs_read( &s, i_bits ); } if( sl->i_timestamp_resolution ) - *(timestamps[i].p_t) = VLC_TS_0 + CLOCK_FREQ * i_read / sl->i_timestamp_resolution; + *(timestamps[i].p_t) = VLC_TICK_0 + CLOCK_FREQ * i_read / sl->i_timestamp_resolution; } bs_read( &s, sl->i_AU_length ); diff --git a/modules/demux/mpeg/mpgv.c b/modules/demux/mpeg/mpgv.c index b5d4456d02..1ab835048d 100644 --- a/modules/demux/mpeg/mpgv.c +++ b/modules/demux/mpeg/mpgv.c @@ -158,7 +158,7 @@ static int Demux( demux_t *p_demux ) if( p_block_in ) { p_block_in->i_pts = - p_block_in->i_dts = ( p_sys->b_start ) ? VLC_TS_0 : VLC_TICK_INVALID; + p_block_in->i_dts = ( p_sys->b_start ) ? VLC_TICK_0 : VLC_TICK_INVALID; } while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer, diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c index 087945a124..8ddc0b0834 100644 --- a/modules/demux/mpeg/ps.c +++ b/modules/demux/mpeg/ps.c @@ -589,7 +589,7 @@ static int Demux( demux_t *p_demux ) p_sys->i_first_scr = -1; } else - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pack_scr ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pack_scr ); } if( tk->b_configured && tk->es && @@ -630,7 +630,7 @@ static int Demux( demux_t *p_demux ) { /* Teletext may have missing PTS (ETSI EN 300 472 Annexe A) * In this case use the last SCR + 40ms */ - p_pkt->i_pts = VLC_TS_0 + p_sys->i_scr + 40000; + p_pkt->i_pts = VLC_TICK_0 + p_sys->i_scr + 40000; } if( (int64_t)p_pkt->i_pts > p_sys->i_current_pts ) diff --git a/modules/demux/mpeg/timestamps.h b/modules/demux/mpeg/timestamps.h index cf805627df..19dca89227 100644 --- a/modules/demux/mpeg/timestamps.h +++ b/modules/demux/mpeg/timestamps.h @@ -22,8 +22,8 @@ #define FROM_SCALE_NZ(x) ((x) * 100 / 9) #define TO_SCALE_NZ(x) ((x) * 9 / 100) -#define FROM_SCALE(x) (VLC_TS_0 + FROM_SCALE_NZ(x)) -#define TO_SCALE(x) TO_SCALE_NZ((x) - VLC_TS_0) +#define FROM_SCALE(x) (VLC_TICK_0 + FROM_SCALE_NZ(x)) +#define TO_SCALE(x) TO_SCALE_NZ((x) - VLC_TICK_0) typedef int64_t stime_t; diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c index c4d0ec240b..c3a855d293 100644 --- a/modules/demux/mpeg/ts.c +++ b/modules/demux/mpeg/ts.c @@ -1005,7 +1005,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) { ReadyQueuesPostSeek( p_demux ); es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, - FROM_SCALE(p_pmt->pcr.i_first) + i64 - VLC_TS_0 ); + FROM_SCALE(p_pmt->pcr.i_first) + i64 - VLC_TICK_0 ); return VLC_SUCCESS; } break; @@ -1978,7 +1978,7 @@ static int SeekToTime( demux_t *p_demux, const ts_pmt_t *p_pmt, stime_t i_scaled stime_t i_diff = i_scaledtime - TimeStampWrapAround( p_pmt->pcr.i_first, i_pcr ); if ( i_diff < 0 ) i_tail_pos = (i_splitpos >= p_sys->i_packet_size) ? i_splitpos - p_sys->i_packet_size : 0; - else if( i_diff < TO_SCALE(VLC_TS_0 + CLOCK_FREQ / 2) ) // 500ms + else if( i_diff < TO_SCALE(VLC_TICK_0 + CLOCK_FREQ / 2) ) // 500ms b_found = true; else i_head_pos = i_pos; diff --git a/modules/demux/mpeg/ts_scte.c b/modules/demux/mpeg/ts_scte.c index 3a07787c22..4c39239fa0 100644 --- a/modules/demux/mpeg/ts_scte.c +++ b/modules/demux/mpeg/ts_scte.c @@ -111,7 +111,7 @@ void SCTE27_Section_Callback( demux_t *p_demux, } - p_content->i_dts = p_content->i_pts = VLC_TS_0 + i_date * 100 / 9; + p_content->i_dts = p_content->i_pts = VLC_TICK_0 + i_date * 100 / 9; //PCRFixHandle( p_demux, p_pmt, p_content ); if( p_pes->p_es->id ) diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c index f07fb183db..5ce4653840 100644 --- a/modules/demux/nsv.c +++ b/modules/demux/nsv.c @@ -207,7 +207,7 @@ static int Demux( demux_t *p_demux ) } /* Set PCR */ - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr ); /* Read video */ i_size = ( header[0] >> 4 ) | ( header[1] << 4 ) | ( header[2] << 12 ); @@ -257,8 +257,8 @@ static int Demux( demux_t *p_demux ) } /* Skip the first part (it is the language name) */ - p_frame->i_pts = VLC_TS_0 + p_sys->i_pcr; - p_frame->i_dts = VLC_TS_0 + p_sys->i_pcr + 4 * CLOCK_FREQ; + p_frame->i_pts = VLC_TICK_0 + p_sys->i_pcr; + p_frame->i_dts = VLC_TICK_0 + p_sys->i_pcr + 4 * CLOCK_FREQ; if( p_sys->p_sub ) es_out_Send( p_demux->out, p_sys->p_sub, p_frame ); @@ -281,7 +281,7 @@ static int Demux( demux_t *p_demux ) /* msg_Dbg( p_demux, "frame video size=%d", i_size ); */ if( i_size > 0 && ( p_frame = vlc_stream_Block( p_demux->s, i_size ) ) ) { - p_frame->i_dts = VLC_TS_0 + p_sys->i_pcr; + p_frame->i_dts = VLC_TICK_0 + p_sys->i_pcr; if( p_sys->p_video ) es_out_Send( p_demux->out, p_sys->p_video, p_frame ); @@ -318,7 +318,7 @@ static int Demux( demux_t *p_demux ) if( ( p_frame = vlc_stream_Block( p_demux->s, i_size ) ) ) { p_frame->i_dts = - p_frame->i_pts = VLC_TS_0 + p_sys->i_pcr; + p_frame->i_pts = VLC_TICK_0 + p_sys->i_pcr; if( p_sys->p_audio ) es_out_Send( p_demux->out, p_sys->p_audio, p_frame ); diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c index d069a2a230..87701f1eb1 100644 --- a/modules/demux/nuv.c +++ b/modules/demux/nuv.c @@ -388,20 +388,20 @@ static int Demux( demux_t *p_demux ) if( ( p_data = vlc_stream_Block( p_demux->s, fh.i_length ) ) == NULL ) return VLC_DEMUXER_EOF; - p_data->i_dts = VLC_TS_0 + (int64_t)fh.i_timecode * 1000; + p_data->i_dts = VLC_TICK_0 + (int64_t)fh.i_timecode * 1000; p_data->i_pts = (fh.i_type == 'V') ? VLC_TICK_INVALID : p_data->i_dts; /* only add keyframes to index */ if( !fh.i_keyframe && !p_sys->b_index ) demux_IndexAppend( &p_sys->idx, - p_data->i_dts - VLC_TS_0, + p_data->i_dts - VLC_TICK_0, vlc_stream_Tell(p_demux->s) - NUV_FH_SIZE ); /* */ - if( p_sys->i_pcr < 0 || p_sys->i_pcr < p_data->i_dts - VLC_TS_0 ) + if( p_sys->i_pcr < 0 || p_sys->i_pcr < p_data->i_dts - VLC_TICK_0 ) { - p_sys->i_pcr = p_data->i_dts - VLC_TS_0; - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr ); + p_sys->i_pcr = p_data->i_dts - VLC_TICK_0; + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr ); } if( fh.i_type == 'A' && p_sys->p_es_audio ) diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c index ea94c4417e..e2a9a23f8a 100644 --- a/modules/demux/ogg.c +++ b/modules/demux/ogg.c @@ -410,7 +410,7 @@ static int Demux( demux_t * p_demux ) if( i_lastdts != VLC_TICK_INVALID ) { - p_sys->i_nzpcr_offset = i_lastdts - VLC_TS_0; + p_sys->i_nzpcr_offset = i_lastdts - VLC_TICK_0; if( likely( !p_sys->b_slave ) ) es_out_SetPCR( p_demux->out, i_lastdts ); } @@ -502,7 +502,7 @@ static int Demux( demux_t * p_demux ) msg_Err( p_demux, "Broken Ogg stream (serialno) mismatch" ); Ogg_ResetStream( p_stream ); if( p_stream->i_pcr != VLC_TICK_INVALID ) - p_sys->i_nzpcr_offset = p_stream->i_pcr - VLC_TS_0; + p_sys->i_nzpcr_offset = p_stream->i_pcr - VLC_TICK_0; ogg_stream_reset_serialno( &p_stream->os, ogg_page_serialno( &p_sys->current_page ) ); } @@ -714,12 +714,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) return VLC_EGENERIC; } vlc_stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b ); - if ( Oggseek_BlindSeektoAbsoluteTime( p_demux, p_stream, VLC_TS_0 + i64, b ) ) + if ( Oggseek_BlindSeektoAbsoluteTime( p_demux, p_stream, VLC_TICK_0 + i64, b ) ) { Ogg_PreparePostSeek( p_sys ); if( acc ) es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, - VLC_TS_0 + i64 ); + VLC_TICK_0 + i64 ); return VLC_SUCCESS; } else @@ -788,11 +788,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) assert( p_sys->i_length > 0 ); i64 = CLOCK_FREQ * p_sys->i_length * f; Ogg_PreparePostSeek( p_sys ); - if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, VLC_TS_0 + i64 ) >= 0 ) + if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, VLC_TICK_0 + i64 ) >= 0 ) { if( acc ) es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, - VLC_TS_0 + i64 ); + VLC_TICK_0 + i64 ); return VLC_SUCCESS; } @@ -859,11 +859,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) } vlc_stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b ); - if ( Oggseek_BlindSeektoAbsoluteTime( p_demux, p_stream, VLC_TS_0 + i64, b ) ) + if ( Oggseek_BlindSeektoAbsoluteTime( p_demux, p_stream, VLC_TICK_0 + i64, b ) ) { Ogg_PreparePostSeek( p_sys ); es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, - VLC_TS_0 + i64 ); + VLC_TICK_0 + i64 ); p_sys->updates |= INPUT_UPDATE_SEEKPOINT; p_sys->cur_seekpoint = i_seekpoint; return VLC_SUCCESS; @@ -3252,7 +3252,7 @@ bool Ogg_GetBoundsUsingSkeletonIndex( logical_stream_t *p_stream, vlc_tick_t i_t i_time == VLC_TICK_INVALID ) return false; - i_time -= VLC_TS_0; + i_time -= VLC_TICK_0; /* Validate range */ if ( i_time < p_stream->p_skel->i_indexfirstnum diff --git a/modules/demux/ogg_granule.c b/modules/demux/ogg_granule.c index bc8cfc0513..d10e91a540 100644 --- a/modules/demux/ogg_granule.c +++ b/modules/demux/ogg_granule.c @@ -169,7 +169,7 @@ vlc_tick_t Ogg_SampleToTime( const logical_stream_t *p_stream, int64_t i_sample, return VLC_TICK_INVALID; date_t d = p_stream->dts; - date_Set(&d, VLC_TS_0); + date_Set(&d, VLC_TICK_0); return date_Increment( &d, i_sample ); } diff --git a/modules/demux/oggseek.c b/modules/demux/oggseek.c index cbb6190ecd..5f0758e3b5 100644 --- a/modules/demux/oggseek.c +++ b/modules/demux/oggseek.c @@ -285,7 +285,7 @@ void Oggseek_ProbeEnd( demux_t *p_demux ) i_length = Ogg_GranuleToTime( p_sys->pp_stream[i], i_granule, !p_sys->pp_stream[i]->b_contiguous, false ); if( i_length > VLC_TICK_INVALID ) - p_sys->i_length = __MAX( p_sys->i_length, (i_length - VLC_TS_0) / 1000000 ); + p_sys->i_length = __MAX( p_sys->i_length, (i_length - VLC_TICK_0) / 1000000 ); break; } } @@ -795,7 +795,7 @@ int Oggseek_BlindSeektoAbsoluteTime( demux_t *p_demux, logical_stream_t *p_strea { /* But only if there's no keyframe/preload requirements */ /* FIXME: add function to get preload time by codec, ex: opus */ - i_lowerpos = VLC_TS_0 + (i_time - VLC_TS_0) * p_sys->i_bitrate / INT64_C(8000000); + i_lowerpos = VLC_TICK_0 + (i_time - VLC_TICK_0) * p_sys->i_bitrate / INT64_C(8000000); b_found = true; } diff --git a/modules/demux/pva.c b/modules/demux/pva.c index de664954dd..cec3189914 100644 --- a/modules/demux/pva.c +++ b/modules/demux/pva.c @@ -233,7 +233,7 @@ static int Demux( demux_t *p_demux ) p_frame->p_buffer += i_skip; p_frame->i_buffer -= i_skip; if( i_pts >= 0 ) - p_frame->i_pts = VLC_TS_0 + i_pts * 100 / 9; + p_frame->i_pts = VLC_TICK_0 + i_pts * 100 / 9; block_ChainAppend( &p_sys->p_es, p_frame ); } break; @@ -450,9 +450,9 @@ static void ParsePES( demux_t *p_demux ) p_pes->p_buffer += i_skip; if( i_dts >= 0 ) - p_pes->i_dts = VLC_TS_0 + i_dts * 100 / 9; + p_pes->i_dts = VLC_TICK_0 + i_dts * 100 / 9; if( i_pts >= 0 ) - p_pes->i_pts = VLC_TS_0 + i_pts * 100 / 9; + p_pes->i_pts = VLC_TICK_0 + i_pts * 100 / 9; /* Set PCR */ if( p_pes->i_pts > 0 ) diff --git a/modules/demux/rawaud.c b/modules/demux/rawaud.c index 6a2b2fbe69..94cacb38a7 100644 --- a/modules/demux/rawaud.c +++ b/modules/demux/rawaud.c @@ -208,7 +208,7 @@ static int Open( vlc_object_t * p_this ) /* initialize timing */ date_Init( &p_sys->pts, p_sys->fmt.audio.i_rate, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); /* calculate 50ms frame size/time */ p_sys->i_frame_samples = __MAX( p_sys->fmt.audio.i_rate / 20, 1 ); diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c index a3425823c8..592a425be2 100644 --- a/modules/demux/rawdv.c +++ b/modules/demux/rawdv.c @@ -263,7 +263,7 @@ static int Demux( demux_t *p_demux ) } /* Call the pace control */ - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr ); p_block = vlc_stream_Block( p_demux->s, p_sys->frame_size ); if( p_block == NULL ) return VLC_DEMUXER_EOF; @@ -275,7 +275,7 @@ static int Demux( demux_t *p_demux ) } p_block->i_dts = - p_block->i_pts = VLC_TS_0 + p_sys->i_pcr; + p_block->i_pts = VLC_TICK_0 + p_sys->i_pcr; if( b_audio ) { diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c index 9dfa9b0d23..3aa2fb86f9 100644 --- a/modules/demux/rawvid.c +++ b/modules/demux/rawvid.c @@ -341,7 +341,7 @@ valid: u_fps_num, u_fps_den, 0); date_Init( &p_sys->pcr, p_sys->fmt_video.video.i_frame_rate, p_sys->fmt_video.video.i_frame_rate_base ); - date_Set( &p_sys->pcr, VLC_TS_0 ); + date_Set( &p_sys->pcr, VLC_TICK_0 ); if( !p_sys->fmt_video.video.i_bits_per_pixel ) { diff --git a/modules/demux/real.c b/modules/demux/real.c index 94f9957f0c..4d748b1b5f 100644 --- a/modules/demux/real.c +++ b/modules/demux/real.c @@ -305,7 +305,7 @@ static int Demux( demux_t *p_demux ) //const int i_version = GetWBE( &header[0] ); const size_t i_size = GetWBE( &header[2] ) - 12; const int i_id = GetWBE( &header[4] ); - const int64_t i_pts = VLC_TS_0 + 1000 * GetDWBE( &header[6] ); + const int64_t i_pts = VLC_TICK_0 + 1000 * GetDWBE( &header[6] ); const int i_flags= header[11]; /* flags 0x02 -> keyframe */ p_sys->i_data_packets++; @@ -442,9 +442,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) { /* it is a rtsp stream , it is specials in access/rtsp/... */ msg_Dbg(p_demux, "Seek in real rtsp stream!"); - p_sys->i_pcr = VLC_TS_0 + INT64_C(1000) * ( p_sys->i_our_duration * f ); + p_sys->i_pcr = VLC_TICK_0 + INT64_C(1000) * ( p_sys->i_our_duration * f ); p_sys->b_seek = true; - return vlc_stream_Seek( p_demux->s, p_sys->i_pcr - VLC_TS_0 ); + return vlc_stream_Seek( p_demux->s, p_sys->i_pcr - VLC_TICK_0 ); } return ControlSeekByte( p_demux, i64 ); diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp index aa87462e94..7c534a476b 100644 --- a/modules/demux/sid.cpp +++ b/modules/demux/sid.cpp @@ -166,7 +166,7 @@ static int Open (vlc_object_t *obj) sys->es = es_out_Add (demux->out, &fmt); date_Init (&sys->pts, fmt.audio.i_rate, 1); - date_Set(&sys->pts, VLC_TS_0); + date_Set(&sys->pts, VLC_TICK_0); sys->tune->selectSong (0); result = (sys->player->load (sys->tune) >=0 ); diff --git a/modules/demux/smf.c b/modules/demux/smf.c index c3a1918228..16327202bb 100644 --- a/modules/demux/smf.c +++ b/modules/demux/smf.c @@ -375,9 +375,9 @@ static int SeekSet0 (demux_t *demux) /* Default SMF tempo is 120BPM, i.e. half a second per quarter note */ date_Init (&sys->pts, sys->ppqn * 2, 1); - date_Set (&sys->pts, VLC_TS_0); + date_Set (&sys->pts, VLC_TICK_0); sys->pulse = 0; - sys->tick = VLC_TS_0; + sys->tick = VLC_TICK_0; for (unsigned i = 0; i < sys->trackc; i++) { @@ -492,7 +492,7 @@ static int Seek (demux_t *demux, vlc_tick_t pts) } sys->pulse = pulse; - sys->tick = ((date_Get (&sys->pts) - VLC_TS_0) / TICK) * TICK + VLC_TS_0; + sys->tick = ((date_Get (&sys->pts) - VLC_TICK_0) / TICK) * TICK + VLC_TICK_0; return VLC_SUCCESS; } @@ -511,7 +511,7 @@ static int Control (demux_t *demux, int i_query, va_list args) case DEMUX_GET_POSITION: if (!sys->duration) return VLC_EGENERIC; - *va_arg (args, double *) = (sys->tick - (double)VLC_TS_0) + *va_arg (args, double *) = (sys->tick - (double)VLC_TICK_0) / sys->duration; break; case DEMUX_SET_POSITION: @@ -520,7 +520,7 @@ static int Control (demux_t *demux, int i_query, va_list args) *va_arg (args, int64_t *) = sys->duration; break; case DEMUX_GET_TIME: - *va_arg (args, int64_t *) = sys->tick - VLC_TS_0; + *va_arg (args, int64_t *) = sys->tick - VLC_TICK_0; break; case DEMUX_SET_TIME: return Seek (demux, va_arg (args, int64_t)); diff --git a/modules/demux/stl.c b/modules/demux/stl.c index a8d5377cd8..4b7d35dde9 100644 --- a/modules/demux/stl.c +++ b/modules/demux/stl.c @@ -190,7 +190,7 @@ static int Demux(demux_t *demux) if (!sys->b_slave && sys->b_first_time) { - es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier); + es_out_SetPCR(demux->out, VLC_TICK_0 + i_barrier); sys->b_first_time = false; } @@ -204,7 +204,7 @@ static int Demux(demux_t *demux) if (b && b->i_buffer == 128) { b->i_dts = - b->i_pts = VLC_TS_0 + s->start; + b->i_pts = VLC_TICK_0 + s->start; if (s->stop > s->start) b->i_length = s->stop - s->start; es_out_Send(demux->out, sys->es, b); @@ -220,7 +220,7 @@ static int Demux(demux_t *demux) if (!sys->b_slave) { - es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier); + es_out_SetPCR(demux->out, VLC_TICK_0 + i_barrier); sys->next_date += CLOCK_FREQ / 8; } diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c index 1d0c692106..08f6e54f17 100644 --- a/modules/demux/subtitle.c +++ b/modules/demux/subtitle.c @@ -815,14 +815,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) f = va_arg( args, double ); if( p_sys->subtitles.i_count && p_sys->i_length ) { - i64 = VLC_TS_0 + f * p_sys->i_length; + i64 = VLC_TICK_0 + f * p_sys->i_length; return demux_Control( p_demux, DEMUX_SET_TIME, i64 ); } break; case DEMUX_SET_NEXT_DEMUX_TIME: p_sys->b_slave = true; - p_sys->i_next_demux_date = va_arg( args, vlc_tick_t ) - VLC_TS_0; + p_sys->i_next_demux_date = va_arg( args, vlc_tick_t ) - VLC_TICK_0; return VLC_SUCCESS; case DEMUX_CAN_PAUSE: @@ -862,7 +862,7 @@ static int Demux( demux_t *p_demux ) if ( !p_sys->b_slave && p_sys->b_first_time ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier ); p_sys->b_first_time = false; } @@ -872,7 +872,7 @@ static int Demux( demux_t *p_demux ) if( p_block ) { p_block->i_dts = - p_block->i_pts = VLC_TS_0 + p_subtitle->i_start; + p_block->i_pts = VLC_TICK_0 + p_subtitle->i_start; if( p_subtitle->i_stop >= 0 && p_subtitle->i_stop >= p_subtitle->i_start ) p_block->i_length = p_subtitle->i_stop - p_subtitle->i_start; @@ -885,7 +885,7 @@ static int Demux( demux_t *p_demux ) if ( !p_sys->b_slave ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier ); p_sys->i_next_demux_date += CLOCK_FREQ / 8; } @@ -2439,7 +2439,7 @@ static int ParseSCC( vlc_object_t *p_obj, subs_properties_t *p_props, /* convert to frame # at 29.97 */ i_frames = i_frames * framerates[3].rate.num / framerates[3].rate.den + f; } - p_subtitle->i_start = VLC_TS_0 + i_frames * CLOCK_FREQ * + p_subtitle->i_start = VLC_TICK_0 + i_frames * CLOCK_FREQ * p_rate->rate.den / p_rate->rate.num; p_subtitle->i_stop = -1; diff --git a/modules/demux/tta.c b/modules/demux/tta.c index 81474d5b86..278952e5cb 100644 --- a/modules/demux/tta.c +++ b/modules/demux/tta.c @@ -208,7 +208,7 @@ static int Demux( demux_t *p_demux ) p_sys->pi_seektable[p_sys->i_currentframe] ); if( p_data == NULL ) return VLC_DEMUXER_EOF; - p_data->i_dts = p_data->i_pts = VLC_TS_0 + CLOCK_FREQ * p_sys->i_currentframe * TTA_FRAMETIME; + p_data->i_dts = p_data->i_pts = VLC_TICK_0 + CLOCK_FREQ * p_sys->i_currentframe * TTA_FRAMETIME; p_sys->i_currentframe++; diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c index 557db4e1e1..dbbc11e818 100644 --- a/modules/demux/ttml.c +++ b/modules/demux/ttml.c @@ -224,7 +224,7 @@ static int Control( demux_t* p_demux, int i_query, va_list args ) i64 = va_arg( args, int64_t ); if( p_sys->times.i_count ) { - tt_time_t t = tt_time_Create( i64 - VLC_TS_0 ); + tt_time_t t = tt_time_Create( i64 - VLC_TICK_0 ); size_t i_index = tt_timings_FindLowerIndex( p_sys->times.p_array, p_sys->times.i_count, t, &b ); p_sys->times.i_current = i_index; @@ -355,7 +355,7 @@ static int Demux( demux_t* p_demux ) if ( !p_sys->b_slave && p_sys->b_first_time ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_playbacktime ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_playbacktime ); p_sys->b_first_time = false; } @@ -373,7 +373,7 @@ static int Demux( demux_t* p_demux ) if( p_block ) { p_block->i_dts = - p_block->i_pts = VLC_TS_0 + i_playbacktime; + p_block->i_pts = VLC_TICK_0 + i_playbacktime; p_block->i_length = i_playbackendtime - i_playbacktime; es_out_Send( p_demux->out, p_sys->p_es, p_block ); @@ -385,7 +385,7 @@ static int Demux( demux_t* p_demux ) if ( !p_sys->b_slave ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_next_demux_time ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_next_demux_time ); p_sys->i_next_demux_time += CLOCK_FREQ / 8; } diff --git a/modules/demux/ty.c b/modules/demux/ty.c index 2ee6dd5a7f..4bff6d548e 100644 --- a/modules/demux/ty.c +++ b/modules/demux/ty.c @@ -633,7 +633,7 @@ static int check_sync_pes( demux_t *p_demux, block_t *p_block, return -1; /* partial PES, no audio data */ } /* full PES header present, extract PTS */ - p_sys->lastAudioPTS = VLC_TS_0 + get_pts( &p_block->p_buffer[ offset + + p_sys->lastAudioPTS = VLC_TICK_0 + get_pts( &p_block->p_buffer[ offset + p_sys->i_Pts_Offset ] ); if (p_sys->firstAudioPTS < 0) p_sys->firstAudioPTS = p_sys->lastAudioPTS; @@ -696,7 +696,7 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl { //msg_Dbg(p_demux, "Video PES hdr in pkt type 0x%02x at offset %d", //subrec_type, esOffset1); - p_sys->lastVideoPTS = VLC_TS_0 + get_pts( + p_sys->lastVideoPTS = VLC_TICK_0 + get_pts( &p_block_in->p_buffer[ esOffset1 + VIDEO_PTS_OFFSET ] ); /*msg_Dbg(p_demux, "Video rec %d PTS %"PRId64, p_sys->i_cur_rec, p_sys->lastVideoPTS );*/ @@ -873,7 +873,7 @@ static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl } else { - p_sys->lastAudioPTS = VLC_TS_0 + get_pts( + p_sys->lastAudioPTS = VLC_TICK_0 + get_pts( &p_sys->pes_buffer[ esOffset1 + p_sys->i_Pts_Offset ] ); p_block_in->i_pts = p_sys->lastAudioPTS; } @@ -912,7 +912,7 @@ static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl /* ================================================ */ if ( ( esOffset1 == 0 ) && ( l_rec_size == 16 ) ) { - p_sys->lastAudioPTS = VLC_TS_0 + get_pts( &p_block_in->p_buffer[ + p_sys->lastAudioPTS = VLC_TICK_0 + get_pts( &p_block_in->p_buffer[ SA_PTS_OFFSET ] ); if (p_sys->firstAudioPTS < 0) p_sys->firstAudioPTS = p_sys->lastAudioPTS; diff --git a/modules/demux/vc1.c b/modules/demux/vc1.c index c2bce58fab..8a5d1d5084 100644 --- a/modules/demux/vc1.c +++ b/modules/demux/vc1.c @@ -151,8 +151,8 @@ static int Demux( demux_t *p_demux) else { /* */ - p_block_in->i_dts = VLC_TS_0; - p_block_in->i_pts = VLC_TS_0; + p_block_in->i_dts = VLC_TICK_0; + p_block_in->i_pts = VLC_TICK_0; } while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer, @@ -170,9 +170,9 @@ static int Demux( demux_t *p_demux) p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out); } - es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_dts ); - p_block_out->i_dts = VLC_TS_0 + p_sys->i_dts; - p_block_out->i_pts = VLC_TS_0 + p_sys->i_dts; + es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_dts ); + p_block_out->i_dts = VLC_TICK_0 + p_sys->i_dts; + p_block_out->i_pts = VLC_TICK_0 + p_sys->i_dts; es_out_Send( p_demux->out, p_sys->p_es, p_block_out ); diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c index 7c077d60b5..7cf12c15b8 100644 --- a/modules/demux/vobsub.c +++ b/modules/demux/vobsub.c @@ -413,7 +413,7 @@ static int Demux( demux_t *p_demux ) p_block->i_buffer = i_read; /* pts */ - p_block->i_pts = VLC_TS_0 + tk.p_subtitles[tk.i_current_subtitle].i_start; + p_block->i_pts = VLC_TICK_0 + tk.p_subtitles[tk.i_current_subtitle].i_start; /* demux this block */ DemuxVobSub( p_demux, p_block ); diff --git a/modules/demux/voc.c b/modules/demux/voc.c index 9bb9e12927..5ea3771c57 100644 --- a/modules/demux/voc.c +++ b/modules/demux/voc.c @@ -117,7 +117,7 @@ static int Open( vlc_object_t * p_this ) p_sys->p_es = NULL; date_Init( &p_sys->pts, 1, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); es_format_Init( &p_sys->fmt, AUDIO_ES, 0 ); p_demux->pf_demux = Demux; @@ -515,7 +515,7 @@ static int Demux( demux_t *p_demux ) p_sys->i_silence_countdown -= i_read_frames; } - p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts ); + p_block->i_dts = p_block->i_pts = VLC_TICK_0 + date_Get( &p_sys->pts ); p_block->i_nb_samples = i_read_frames * p_sys->fmt.audio.i_frame_length; date_Increment( &p_sys->pts, p_block->i_nb_samples ); es_out_SetPCR( p_demux->out, p_block->i_pts ); diff --git a/modules/demux/wav.c b/modules/demux/wav.c index 789bac08b5..af1ae4beb0 100644 --- a/modules/demux/wav.c +++ b/modules/demux/wav.c @@ -428,7 +428,7 @@ static int Open( vlc_object_t * p_this ) goto error; date_Init( &p_sys->pts, p_sys->fmt.audio.i_rate, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); return VLC_SUCCESS; diff --git a/modules/demux/webvtt.c b/modules/demux/webvtt.c index 5792acb300..862f18b0dc 100644 --- a/modules/demux/webvtt.c +++ b/modules/demux/webvtt.c @@ -271,16 +271,16 @@ static void StreamParserCueDoneHandler( void *priv, webvtt_cue_t *p_cue ) { if ( p_sys->b_first_time ) { - es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TS_0 ); + es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TICK_0 ); p_sys->b_first_time = false; } p_sys->i_next_demux_time = p_cue->i_start; p_block->i_dts = - p_block->i_pts = VLC_TS_0 + p_cue->i_start; + p_block->i_pts = VLC_TICK_0 + p_cue->i_start; if( p_cue->i_stop >= 0 && p_cue->i_stop >= p_cue->i_start ) p_block->i_length = p_cue->i_stop - p_cue->i_start; es_out_Send( p_demux->out, p_sys->es, p_block ); - es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TS_0 ); + es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TICK_0 ); } } webvtt_cue_Clean( p_cue ); @@ -483,7 +483,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) case DEMUX_SET_NEXT_DEMUX_TIME: p_sys->b_slave = true; - p_sys->i_next_demux_time = va_arg( args, vlc_tick_t ) - VLC_TS_0; + p_sys->i_next_demux_time = va_arg( args, vlc_tick_t ) - VLC_TICK_0; return VLC_SUCCESS; case DEMUX_CAN_PAUSE: @@ -555,7 +555,7 @@ static int Demux( demux_t *p_demux ) if( p_block ) { p_block->i_length = i_end_time - i_start_time; - p_block->i_dts = p_block->i_pts = VLC_TS_0 + i_start_time; + p_block->i_dts = p_block->i_pts = VLC_TICK_0 + i_start_time; if( p_sys->i_next_block_flags ) { @@ -582,7 +582,7 @@ static int Demux( demux_t *p_demux ) if ( !p_sys->b_slave ) { - es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier ); + es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier ); p_sys->i_next_demux_time += CLOCK_FREQ; } diff --git a/modules/demux/xa.c b/modules/demux/xa.c index 85e960b0d8..d025fa43a7 100644 --- a/modules/demux/xa.c +++ b/modules/demux/xa.c @@ -146,7 +146,7 @@ static int Open( vlc_object_t * p_this ) return VLC_ENOMEM; date_Init( &p_sys->pts, fmt.audio.i_rate, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); p_demux->pf_demux = Demux; p_demux->pf_control = Control; diff --git a/modules/misc/stats.c b/modules/misc/stats.c index f27a9552f8..892311c338 100644 --- a/modules/misc/stats.c +++ b/modules/misc/stats.c @@ -189,7 +189,7 @@ static int OpenDemux ( vlc_object_t *p_this ) return VLC_ENOMEM; date_Init( &p_sys->pts, 1, 1 ); - date_Set( &p_sys->pts, VLC_TS_0 ); + date_Set( &p_sys->pts, VLC_TICK_0 ); es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_FOURCC('s','t','a','t') ); p_sys->fmt.video.i_width = 720; diff --git a/modules/packetizer/flac.h b/modules/packetizer/flac.h index f64e4313d5..71a637d648 100644 --- a/modules/packetizer/flac.h +++ b/modules/packetizer/flac.h @@ -260,9 +260,9 @@ static inline int FLAC_ParseSyncInfo(const uint8_t *p_buf, /* Compute from frame absolute time */ if ( (p_buf[1] & 0x01) == 0 ) /* Fixed blocksize stream / Frames */ - h->i_pts = VLC_TS_0 + CLOCK_FREQ * blocksize * i_fsnumber / samplerate; + h->i_pts = VLC_TICK_0 + CLOCK_FREQ * blocksize * i_fsnumber / samplerate; else /* Variable blocksize stream / Samples */ - h->i_pts = VLC_TS_0 + CLOCK_FREQ * i_fsnumber / samplerate; + h->i_pts = VLC_TICK_0 + CLOCK_FREQ * i_fsnumber / samplerate; h->i_bits_per_sample = bits_per_sample; h->i_rate = samplerate; diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c index 869374b798..dc3741af82 100644 --- a/modules/packetizer/mpegvideo.c +++ b/modules/packetizer/mpegvideo.c @@ -533,7 +533,7 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag ) { if( date_Get( &p_sys->dts ) == VLC_TICK_INVALID ) { - date_Set( &p_sys->dts, VLC_TS_0 ); + date_Set( &p_sys->dts, VLC_TICK_0 ); } } } diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c index d42b474c54..59d247a778 100644 --- a/modules/visualization/goom.c +++ b/modules/visualization/goom.c @@ -154,7 +154,7 @@ static int Open( vlc_object_t *p_this ) p_thread->i_blocks = 0; date_Init( &p_thread->date, p_filter->fmt_in.audio.i_rate, 1 ); - date_Set( &p_thread->date, VLC_TS_0 ); + date_Set( &p_thread->date, VLC_TICK_0 ); p_thread->i_channels = aout_FormatNbChannels( &p_filter->fmt_in.audio ); if( vlc_clone( &p_thread->thread,