Commit e607f604 authored by Rafaël Carré's avatar Rafaël Carré

TS Demux: assume dvbpsi/tot.h is present

parent 5274bda1
...@@ -59,12 +59,7 @@ ...@@ -59,12 +59,7 @@
# include <dvbpsi/eit.h> # include <dvbpsi/eit.h>
/* TDT support */ /* TDT support */
#ifdef _DVBPSI_DR_58_H_ # include <dvbpsi/tot.h>
# define TS_USE_TDT 1
# include <dvbpsi/tot.h>
#else
# include <time.h>
#endif
#undef TS_DEBUG #undef TS_DEBUG
...@@ -610,19 +605,16 @@ static int Open( vlc_object_t *p_this ) ...@@ -610,19 +605,16 @@ static int Open( vlc_object_t *p_this )
eit->psi->handle = eit->psi->handle =
dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack, dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
p_demux ); p_demux );
#ifdef TS_USE_TDT
ts_pid_t *tdt = &p_sys->pid[0x14]; ts_pid_t *tdt = &p_sys->pid[0x14];
PIDInit( tdt, true, NULL ); PIDInit( tdt, true, NULL );
tdt->psi->handle = tdt->psi->handle =
dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack, dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
p_demux ); p_demux );
#endif
if( p_sys->b_access_control ) if( p_sys->b_access_control )
{ {
if( SetPIDFilter( p_demux, 0x11, true ) || if( SetPIDFilter( p_demux, 0x11, true ) ||
#ifdef TS_USE_TDT
SetPIDFilter( p_demux, 0x14, true ) || SetPIDFilter( p_demux, 0x14, true ) ||
#endif
SetPIDFilter( p_demux, 0x12, true ) ) SetPIDFilter( p_demux, 0x12, true ) )
p_sys->b_access_control = false; p_sys->b_access_control = false;
} }
...@@ -962,11 +954,7 @@ static int DVBEventInformation( demux_t *p_demux, int64_t *pi_time, int64_t *pi_ ...@@ -962,11 +954,7 @@ static int DVBEventInformation( demux_t *p_demux, int64_t *pi_time, int64_t *pi_
if( p_sys->i_dvb_length > 0 ) if( p_sys->i_dvb_length > 0 )
{ {
#ifdef TS_USE_TDT
const int64_t t = mdate() + p_sys->i_tdt_delta; const int64_t t = mdate() + p_sys->i_tdt_delta;
#else
const int64_t t = CLOCK_FREQ * time ( NULL );
#endif
if( p_sys->i_dvb_start <= t && t < p_sys->i_dvb_start + p_sys->i_dvb_length ) if( p_sys->i_dvb_start <= t && t < p_sys->i_dvb_start + p_sys->i_dvb_length )
{ {
...@@ -2944,7 +2932,6 @@ static int EITConvertDuration( uint32_t i_duration ) ...@@ -2944,7 +2932,6 @@ static int EITConvertDuration( uint32_t i_duration )
} }
#undef CVT_FROM_BCD #undef CVT_FROM_BCD
#ifdef TS_USE_TDT
static void TDTCallBack( demux_t *p_demux, dvbpsi_tot_t *p_tdt ) static void TDTCallBack( demux_t *p_demux, dvbpsi_tot_t *p_tdt )
{ {
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
...@@ -2953,7 +2940,6 @@ static void TDTCallBack( demux_t *p_demux, dvbpsi_tot_t *p_tdt ) ...@@ -2953,7 +2940,6 @@ static void TDTCallBack( demux_t *p_demux, dvbpsi_tot_t *p_tdt )
- mdate(); - mdate();
dvbpsi_DeleteTOT(p_tdt); dvbpsi_DeleteTOT(p_tdt);
} }
#endif
static void EITCallBack( demux_t *p_demux, static void EITCallBack( demux_t *p_demux,
...@@ -3141,7 +3127,6 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h, ...@@ -3141,7 +3127,6 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h,
(dvbpsi_eit_callback)EITCallBackSchedule; (dvbpsi_eit_callback)EITCallBackSchedule;
dvbpsi_AttachEIT( h, i_table_id, i_extension, cb, p_demux ); dvbpsi_AttachEIT( h, i_table_id, i_extension, cb, p_demux );
} }
#ifdef TS_USE_TDT
else if( p_demux->p_sys->pid[0x11].psi->i_sdt_version != -1 && else if( p_demux->p_sys->pid[0x11].psi->i_sdt_version != -1 &&
i_table_id == 0x70 ) /* TDT */ i_table_id == 0x70 ) /* TDT */
{ {
...@@ -3150,8 +3135,6 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h, ...@@ -3150,8 +3135,6 @@ static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h,
dvbpsi_AttachTOT( h, i_table_id, i_extension, dvbpsi_AttachTOT( h, i_table_id, i_extension,
(dvbpsi_tot_callback)TDTCallBack, p_demux); (dvbpsi_tot_callback)TDTCallBack, p_demux);
} }
#endif
} }
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment