[vlc-commits] demux: ts: add eit debug timeshift
Francois Cartegnie
git at videolan.org
Sun Feb 28 21:26:57 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 26 21:13:43 2016 +0100| [30f6b14ca14d10d9ec75e956f434c4ba095b79c7] | committer: Francois Cartegnie
demux: ts: add eit debug timeshift
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30f6b14ca14d10d9ec75e956f434c4ba095b79c7
---
modules/demux/mpeg/ts_psi_eit.c | 13 +++++++++++++
modules/demux/mpeg/ts_psi_eit.h | 2 ++
2 files changed, 15 insertions(+)
diff --git a/modules/demux/mpeg/ts_psi_eit.c b/modules/demux/mpeg/ts_psi_eit.c
index a611bb9..0ebe9b2 100644
--- a/modules/demux/mpeg/ts_psi_eit.c
+++ b/modules/demux/mpeg/ts_psi_eit.c
@@ -50,6 +50,18 @@
#include <time.h>
#include <assert.h>
+#ifndef PSI_DEBUG_EIT
+ #define PSI_DEBUG_TIMESHIFT(t)
+#else
+ static time_t i_eit_debug_offset = 0;
+ #define PSI_DEBUG_TIMESHIFT(t) \
+ do {\
+ if( i_eit_debug_offset == 0 )\
+ i_eit_debug_offset = time(NULL) - t;\
+ t = t + i_eit_debug_offset;\
+ } while(0);
+#endif
+
static char *EITConvertToUTF8( demux_t *p_demux,
const unsigned char *psz_instring,
size_t i_length,
@@ -322,6 +334,7 @@ static void EITCallBack( demux_t *p_demux,
int i_min_age = 0;
i_start = EITConvertStartTime( p_evt->i_start_time );
+ PSI_DEBUG_TIMESHIFT(i_start);
i_duration = EITConvertDuration( p_evt->i_duration );
if( p_sys->arib.e_mode == ARIBMODE_ENABLED )
diff --git a/modules/demux/mpeg/ts_psi_eit.h b/modules/demux/mpeg/ts_psi_eit.h
index 726eb88..88f2886 100644
--- a/modules/demux/mpeg/ts_psi_eit.h
+++ b/modules/demux/mpeg/ts_psi_eit.h
@@ -19,6 +19,8 @@
#ifndef VLC_TS_PSI_EIT_H
#define VLC_TS_PSI_EIT_H
+//#define PSI_DEBUG_EIT
+
bool AttachDvbpsiNewEITTableHandler( dvbpsi_t *p_handle, demux_t * p_demux );
#endif
More information about the vlc-commits
mailing list