vlc | branch: master | Steve Lhomme <[email protected]> | Tue Jul 3 07:53:38 2018 +0200| [0a2428559d11e38f4d8bef40d47c158b47ac1f8d] | committer: Steve Lhomme
modules: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS() > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a2428559d11e38f4d8bef40d47c158b47ac1f8d --- modules/access/live555.cpp | 2 +- modules/demux/adaptive/PlaylistManager.cpp | 8 ++++---- modules/demux/asf/asf.c | 2 +- modules/demux/mp4/mp4.c | 2 +- modules/demux/sid.cpp | 2 +- modules/demux/smf.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp index f34a39913e..0786853e65 100644 --- a/modules/access/live555.cpp +++ b/modules/access/live555.cpp @@ -285,7 +285,7 @@ static unsigned char* parseVorbisConfigStr( char const* configStr, static char *passwordLessURL( vlc_url_t *url ); -#define PCR_OBS (CLOCK_FREQ / 4) +#define PCR_OBS VLC_TICK_FROM_MS(250) #define PCR_OFF PCR_OBS /***************************************************************************** diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp index 19a6e99d79..84974552fa 100644 --- a/modules/demux/adaptive/PlaylistManager.cpp +++ b/modules/demux/adaptive/PlaylistManager.cpp @@ -405,7 +405,7 @@ bool PlaylistManager::reactivateStream(AbstractStream *stream) return stream->reactivate(getResumeTime()); } -#define DEMUX_INCREMENT (CLOCK_FREQ / 20) +#define DEMUX_INCREMENT VLC_TICK_FROM_MS(50) int PlaylistManager::demux_callback(demux_t *p_demux) { PlaylistManager *manager = reinterpret_cast<PlaylistManager *>(p_demux->p_sys); @@ -649,13 +649,13 @@ void PlaylistManager::Run() { vlc_tick_t i_deadline = vlc_tick_now(); if(i_return == AbstractStream::buffering_ongoing) - i_deadline += (CLOCK_FREQ / 100); + i_deadline += VLC_TICK_FROM_MS(10); else if(i_return == AbstractStream::buffering_full) - i_deadline += (CLOCK_FREQ / 10); + i_deadline += VLC_TICK_FROM_MS(100); else if(i_return == AbstractStream::buffering_end) i_deadline += (CLOCK_FREQ); else /*if(i_return == AbstractStream::buffering_suspended)*/ - i_deadline += (CLOCK_FREQ / 4); + i_deadline += VLC_TICK_FROM_MS(250); vlc_mutex_lock(&demux.lock); vlc_cond_signal(&demux.cond); diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index 71fc6dc927..280c3cbd54 100644 --- a/modules/demux/asf/asf.c +++ b/modules/demux/asf/asf.c @@ -186,7 +186,7 @@ static int Open( vlc_object_t * p_this ) /***************************************************************************** * Demux: read packet and send them to decoders *****************************************************************************/ -#define CHUNK (CLOCK_FREQ / 10) +#define CHUNK VLC_TICK_FROM_MS(100) static int Demux( demux_t *p_demux ) { demux_sys_t *p_sys = p_demux->p_sys; diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index e4f562a8ad..5cd94c4bb0 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -143,7 +143,7 @@ typedef struct mp4_fragments_index_t *p_fragsindex; } demux_sys_t; -#define DEMUX_INCREMENT (CLOCK_FREQ / 4) /* How far the pcr will go, each round */ +#define DEMUX_INCREMENT VLC_TICK_FROM_MS(250) /* How far the pcr will go, each round */ #define DEMUX_TRACK_MAX_PRELOAD VLC_TICK_FROM_SEC(15) /* maximum preloading, to deal with interleaving */ #define VLC_DEMUXER_EOS (VLC_DEMUXER_EGENERIC - 1) diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp index 7c534a476b..61e11f965c 100644 --- a/modules/demux/sid.cpp +++ b/modules/demux/sid.cpp @@ -241,7 +241,7 @@ static int Control (demux_t *demux, int query, va_list args) { case DEMUX_GET_TIME : { int64_t *v = va_arg (args, int64_t*); - *v = sys->player->time() * sys->player->timebase() * (CLOCK_FREQ / 100); + *v = sys->player->time() * sys->player->timebase() * VLC_TICK_FROM_MS(10); return VLC_SUCCESS; } diff --git a/modules/demux/smf.c b/modules/demux/smf.c index 16327202bb..58cb75b446 100644 --- a/modules/demux/smf.c +++ b/modules/demux/smf.c @@ -431,7 +431,7 @@ static int ReadEvents (demux_t *demux, uint64_t *restrict pulse, return 0; } -#define TICK (CLOCK_FREQ / 100) +#define TICK VLC_TICK_FROM_MS(10) /***************************************************************************** * Demux: read chunks and send them to the synthesizer _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
