Commit ff618fd5 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: ts: add defines for SI pids

parent dcacb806
......@@ -426,24 +426,24 @@ static int Open( vlc_object_t *p_this )
if( p_sys->b_dvb_meta )
{
if( !PIDSetup( p_demux, TYPE_SDT, GetPID(p_sys, 0x11), NULL ) ||
!PIDSetup( p_demux, TYPE_EIT, GetPID(p_sys, 0x12), NULL ) ||
!PIDSetup( p_demux, TYPE_TDT, GetPID(p_sys, 0x14), NULL ) )
if( !PIDSetup( p_demux, TYPE_SDT, GetPID(p_sys, TS_PID_SDT), NULL ) ||
!PIDSetup( p_demux, TYPE_EIT, GetPID(p_sys, TS_PID_EIT), NULL ) ||
!PIDSetup( p_demux, TYPE_TDT, GetPID(p_sys, TS_PID_TDT), NULL ) )
{
PIDRelease( p_demux, GetPID(p_sys, 0x11) );
PIDRelease( p_demux, GetPID(p_sys, 0x12) );
PIDRelease( p_demux, GetPID(p_sys, 0x14) );
PIDRelease( p_demux, GetPID(p_sys, TS_PID_SDT) );
PIDRelease( p_demux, GetPID(p_sys, TS_PID_EIT) );
PIDRelease( p_demux, GetPID(p_sys, TS_PID_TDT) );
p_sys->b_dvb_meta = false;
}
else
{
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, 0x11));
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, 0x12));
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, 0x14));
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, TS_PID_SDT));
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, TS_PID_EIT));
VLC_DVBPSI_DEMUX_TABLE_INIT(p_demux, GetPID(p_sys, TS_PID_TDT));
if( p_sys->b_access_control &&
( SetPIDFilter( p_sys, GetPID(p_sys, 0x11), true ) ||
SetPIDFilter( p_sys, GetPID(p_sys, 0x14), true ) ||
SetPIDFilter( p_sys, GetPID(p_sys, 0x12), true ) )
( SetPIDFilter( p_sys, GetPID(p_sys, TS_PID_SDT), true ) ||
SetPIDFilter( p_sys, GetPID(p_sys, TS_PID_TDT), true ) ||
SetPIDFilter( p_sys, GetPID(p_sys, TS_PID_EIT), true ) )
)
p_sys->b_access_control = false;
}
......
......@@ -30,6 +30,8 @@ typedef struct csa_t csa_t;
#define TS_USER_PMT_NUMBER (0)
#define TS_PSI_PAT_PID 0x00
typedef enum arib_modes_e
{
ARIBMODE_AUTO = -1,
......
/*****************************************************************************
* ts_psi_eit.c : TS demuxer EIT handling
* ts_psi_eit.c : TS demuxer SI handling
*****************************************************************************
* Copyright (C) 2014-2016 - VideoLAN Authors
*
......@@ -351,11 +351,11 @@ static void EITCallBack( demux_t *p_demux,
i_start += timezone; // FIXME: what about DST?
i_tot_time += timezone;
if( p_evt->i_running_status == TS_PSI_RUNSTATUS_UNDEFINED &&
if( p_evt->i_running_status == TS_SI_RUNSTATUS_UNDEFINED &&
(i_start - 5 < i_tot_time &&
i_tot_time < i_start + i_duration + 5) )
{
p_evt->i_running_status = TS_PSI_RUNSTATUS_RUNNING;
p_evt->i_running_status = TS_SI_RUNSTATUS_RUNNING;
msg_Dbg( p_demux, " EIT running status undefined -> running" );
}
}
......@@ -478,7 +478,7 @@ static void EITCallBack( demux_t *p_demux,
*psz_extra ? psz_extra : NULL, i_min_age );
/* Update "now playing" field */
if( p_evt->i_running_status == TS_PSI_RUNSTATUS_RUNNING && i_start > 0 && psz_name && psz_text )
if( p_evt->i_running_status == TS_SI_RUNSTATUS_RUNNING && i_start > 0 && psz_name && psz_text )
vlc_epg_SetCurrent( p_epg, i_start );
free( psz_name );
......@@ -559,7 +559,7 @@ static void PSINewTableCallBack( dvbpsi_t *h, uint8_t i_table_id,
msg_Err( p_demux, "PSINewTableCallback: failed attaching EITCallback" );
}
else if( GetPID(p_sys, 0x11)->u.p_psi->i_version != -1 &&
(i_table_id == TS_PSI_TDT_TABLE_ID || i_table_id == TS_PSI_TOT_TABLE_ID) )
(i_table_id == TS_SI_TDT_TABLE_ID || i_table_id == TS_SI_TOT_TABLE_ID) )
{
msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)",
i_table_id, i_table_id, i_extension, i_extension );
......
/*****************************************************************************
* ts_psi_eit.h : TS demuxer EIT handling
* ts_psi_eit.h : TS demuxer SI handling
*****************************************************************************
* Copyright (C) 2014-2016 - VideoLAN Authors
*
......@@ -21,14 +21,18 @@
//#define PSI_DEBUG_EIT
#define TS_PSI_TDT_TABLE_ID 0x70
#define TS_PSI_TOT_TABLE_ID 0x73
#define TS_SI_SDT_PID 0x11
#define TS_SI_EIT_PID 0x12
#define TS_SI_TDT_PID 0x14
#define TS_PSI_RUNSTATUS_UNDEFINED 0x00
#define TS_PSI_RUNSTATUS_STOPPED 0x01
#define TS_PSI_RUNSTATUS_STARTING 0x02
#define TS_PSI_RUNSTATUS_PAUSING 0x03
#define TS_PSI_RUNSTATUS_RUNNING 0x04
#define TS_SI_TDT_TABLE_ID 0x70
#define TS_SI_TOT_TABLE_ID 0x73
#define TS_SI_RUNSTATUS_UNDEFINED 0x00
#define TS_SI_RUNSTATUS_STOPPED 0x01
#define TS_SI_RUNSTATUS_STARTING 0x02
#define TS_SI_RUNSTATUS_PAUSING 0x03
#define TS_SI_RUNSTATUS_RUNNING 0x04
bool ts_attach_PSINewTableCallBack( dvbpsi_t *p_handle, void * );
......
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