vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Feb 29 16:05:59 2016 +0100| [dcacb8066c109f81f245b2a2059cca03a1a7711f] | committer: Francois Cartegnie
demux: ts: pass pid as si new table callback > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcacb8066c109f81f245b2a2059cca03a1a7711f --- modules/demux/mpeg/ts.c | 12 ++++++------ modules/demux/mpeg/ts_psi_eit.c | 10 ++++++---- modules/demux/mpeg/ts_psi_eit.h | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c index 4b8e3e7..e18e5b9 100644 --- a/modules/demux/mpeg/ts.c +++ b/modules/demux/mpeg/ts.c @@ -350,10 +350,10 @@ static int DetectPVRHeadersAndHeaderSize( demux_t *p_demux, unsigned *pi_header_ /***************************************************************************** * Open *****************************************************************************/ -# define VLC_DVBPSI_DEMUX_TABLE_INIT(table,obj) \ +# define VLC_DVBPSI_DEMUX_TABLE_INIT(obj, pid) \ do { \ - if( !AttachDvbpsiNewEITTableHandler( (table)->u.p_psi->handle, obj ) ) \ - msg_Warn( obj, "Can't dvbpsi_AttachDemux on pid %d", (table)->i_pid );\ + if( !ts_attach_PSINewTableCallBack( (pid)->u.p_psi->handle, pid ) ) \ + msg_Warn( obj, "Can't dvbpsi_AttachDemux on pid %d", (pid)->i_pid );\ } while (0) static int Open( vlc_object_t *p_this ) @@ -437,9 +437,9 @@ static int Open( vlc_object_t *p_this ) } else { - VLC_DVBPSI_DEMUX_TABLE_INIT(GetPID(p_sys, 0x11), p_demux); - VLC_DVBPSI_DEMUX_TABLE_INIT(GetPID(p_sys, 0x12), p_demux); - VLC_DVBPSI_DEMUX_TABLE_INIT(GetPID(p_sys, 0x14), p_demux); + 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)); if( p_sys->b_access_control && ( SetPIDFilter( p_sys, GetPID(p_sys, 0x11), true ) || SetPIDFilter( p_sys, GetPID(p_sys, 0x14), true ) || diff --git a/modules/demux/mpeg/ts_psi_eit.c b/modules/demux/mpeg/ts_psi_eit.c index cae9928..e059336 100644 --- a/modules/demux/mpeg/ts_psi_eit.c +++ b/modules/demux/mpeg/ts_psi_eit.c @@ -526,10 +526,12 @@ static void EITCallBackSchedule( demux_t *p_demux, dvbpsi_eit_t *p_eit ) } static void PSINewTableCallBack( dvbpsi_t *h, uint8_t i_table_id, - uint16_t i_extension, demux_t *p_demux ) + uint16_t i_extension, void *p_pid_cbdata ) { - demux_sys_t *p_sys = p_demux->p_sys; + VLC_UNUSED(p_pid_cbdata); assert( h ); + demux_t *p_demux = (demux_t *) h->p_sys; + demux_sys_t *p_sys = p_demux->p_sys; #if 0 msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)", i_table_id, i_table_id, i_extension, i_extension ); @@ -567,7 +569,7 @@ static void PSINewTableCallBack( dvbpsi_t *h, uint8_t i_table_id, } } -bool AttachDvbpsiNewEITTableHandler( dvbpsi_t *p_handle, demux_t * p_demux ) +bool ts_attach_PSINewTableCallBack( dvbpsi_t *p_handle, void *p_pid ) { - return dvbpsi_AttachDemux( p_handle, (dvbpsi_demux_new_cb_t)PSINewTableCallBack, p_demux ); + return dvbpsi_AttachDemux( p_handle, PSINewTableCallBack, p_pid ); } diff --git a/modules/demux/mpeg/ts_psi_eit.h b/modules/demux/mpeg/ts_psi_eit.h index d786549..db56468 100644 --- a/modules/demux/mpeg/ts_psi_eit.h +++ b/modules/demux/mpeg/ts_psi_eit.h @@ -30,6 +30,6 @@ #define TS_PSI_RUNSTATUS_PAUSING 0x03 #define TS_PSI_RUNSTATUS_RUNNING 0x04 -bool AttachDvbpsiNewEITTableHandler( dvbpsi_t *p_handle, demux_t * p_demux ); +bool ts_attach_PSINewTableCallBack( dvbpsi_t *p_handle, void * ); #endif _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
