From d6d7bb61acda563271016b0a7a157e60a515a972 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Tue, 20 Feb 2007 13:44:23 +0000 Subject: [PATCH] Treat all live555 versions before LIVEMEDIA_LIBRARY_VERSION_INT 1171929600 as if playStartTime() and playEndTime() didn't exist. Now only handle unpatched current versions of live library. --- modules/demux/live555.cpp | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index be92b5e439..418a6bfb0b 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -848,13 +848,21 @@ static int SessionsSetup( demux_t *p_demux ) delete iter; if( p_sys->i_track <= 0 ) i_return = VLC_EGENERIC; +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the starttime if possible */ p_sys->i_npt_start = (int64_t)( p_sys->ms->playStartTime() * (double)1000000.0 ); +#else + p_sys->i_npt_start = (int64_t) = -1; +#endif if( p_sys->i_npt_start < 0 ) p_sys->i_npt_start = -1; +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the duration if possible */ p_sys->i_npt_length = (int64_t)( p_sys->ms->playEndTime() * (double)1000000.0 ); +#else + p_sys->i_npt_length = (int64_t) -1; +#endif if( p_sys->i_npt_length < 0 ) p_sys->i_npt_length = -1; @@ -908,8 +916,12 @@ static int Play( demux_t *p_demux ) } #endif +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the starttime if possible */ p_sys->i_npt_start = (int64_t)( p_sys->ms->playStartTime() * (double)1000000.0 ); +#else + p_sys->i_npt_start = (int64_t) -1; +#endif if( p_sys->i_npt_start < 0 ) { p_sys->i_npt_start = -1; @@ -918,8 +930,12 @@ static int Play( demux_t *p_demux ) else p_sys->i_npt = p_sys->i_npt_start; +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the duration if possible */ p_sys->i_npt_length = (int64_t)( p_sys->ms->playEndTime() * (double)1000000.0 ); +#else + p_sys->i_npt_length = -1; +#endif if( p_sys->i_npt_length < 0 ) p_sys->i_npt_length = -1; @@ -1115,8 +1131,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) msg_Dbg( p_demux, "set pos startseq: %u", p_sys->track[i]->i_start_seq ); } #endif +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the starttime if possible */ p_sys->i_npt_start = (int64_t)( p_sys->ms->playStartTime() * (double)1000000.0 ); +#else + p_sys->i_npt_start = (int64_t) -1; +#endif if( p_sys->i_npt_start < 0 ) { p_sys->i_npt_start = -1; @@ -1125,8 +1145,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) else p_sys->i_npt = p_sys->i_npt_start; +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the duration if possible */ p_sys->i_npt_length = (int64_t)( p_sys->ms->playEndTime() * (double)1000000.0 ); +#else + p_sys->i_npt_lenght = (int64_t) -1; +#endif if( p_sys->i_npt_length < 0 ) p_sys->i_npt_length = -1; @@ -1183,9 +1207,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) msg_Dbg( p_demux, "set pause startseq: %u", p_sys->track[i]->i_start_seq ); } #endif - +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the starttime if possible */ p_sys->i_npt_start = (int64_t)( p_sys->ms->playStartTime() * (double)1000000.0 ); +#else + p_sys->i_npt_start = (int64_t) -1; +#endif if( p_sys->i_npt_start < 0 ) { p_sys->i_npt_start = -1; @@ -1194,8 +1221,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) else p_sys->i_npt = p_sys->i_npt_start; +#if (LIVEMEDIA_LIBRARY_VERSION_INT >= 1171929600) /* Retrieve the duration if possible */ p_sys->i_npt_length = (int64_t)( p_sys->ms->playEndTime() * (double)1000000.0 ); +#else + p_sys->i_npt_lenght = (int64_t) -1; +#endif if( p_sys->i_npt_length < 0 ) p_sys->i_npt_length = -1; -- 2.39.2