[vlc-commits] ts mux: assume dvbpsi_GenSDTSections is present
Rafaël Carré
git at videolan.org
Fri Feb 10 02:03:13 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Feb 9 20:00:21 2012 -0500| [0344812b799fd5aa1db60b91bda8c3d73ced8de1] | committer: Rafaël Carré
ts mux: assume dvbpsi_GenSDTSections is present
it's in libdvbpsi since 2004
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0344812b799fd5aa1db60b91bda8c3d73ced8de1
---
extras/buildsystem/cmake/config.h.cmake | 1 -
modules/mux/mpeg/ts.c | 22 ++--------------------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/extras/buildsystem/cmake/config.h.cmake b/extras/buildsystem/cmake/config.h.cmake
index e0e49cc..224adc3 100644
--- a/extras/buildsystem/cmake/config.h.cmake
+++ b/extras/buildsystem/cmake/config.h.cmake
@@ -77,7 +77,6 @@
#cmakedefine HAVE_DL_WINDOWS
#cmakedefine HAVE_DSHOW_H
#cmakedefine HAVE_DVBPSI_DR_H
-#cmakedefine HAVE_DVBPSI_SDT
#cmakedefine HAVE_DVDREAD_DVD_READER_H
#cmakedefine HAVE_DYNAMIC_PLUGINS
#cmakedefine HAVE_EBML_EBMLVERSION_H
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 2455f4d..da2ae38 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -193,18 +193,14 @@ vlc_module_begin ()
PMTPID_LONGTEXT, true )
add_integer( SOUT_CFG_PREFIX "tsid", 0, TSID_TEXT,
TSID_LONGTEXT, true )
-#ifdef HAVE_DVBPSI_SDT
add_integer( SOUT_CFG_PREFIX "netid", 0, NETID_TEXT,
NETID_LONGTEXT, true )
-#endif
add_string( SOUT_CFG_PREFIX "program-pmt", NULL, PMTPROG_TEXT,
PMTPROG_LONGTEXT, true )
add_bool( SOUT_CFG_PREFIX "es-id-pid", false, PID_TEXT, PID_LONGTEXT,
true )
add_string( SOUT_CFG_PREFIX "muxpmt", NULL, MUXPMT_TEXT, MUXPMT_LONGTEXT, true )
-#ifdef HAVE_DVBPSI_SDT
add_string( SOUT_CFG_PREFIX "sdtdesc", NULL, SDTDESC_TEXT, SDTDESC_LONGTEXT, true )
-#endif
add_bool( SOUT_CFG_PREFIX "alignment", true, ALIGNMENT_TEXT,
ALIGNMENT_LONGTEXT, true )
@@ -243,9 +239,7 @@ vlc_module_end ()
*****************************************************************************/
static const char *const ppsz_sout_options[] = {
"pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid",
-#ifdef HAVE_DVBPSI_SDT
"netid", "sdtdesc",
-#endif
"es-id-pid", "shaping", "pcr", "bmin", "bmax", "use-key-frames",
"dts-delay", "csa-ck", "csa2-ck", "csa-use", "csa-pkt", "crypt-audio", "crypt-video",
"muxpmt", "program-pmt", "alignment",
@@ -580,11 +574,10 @@ static int Open( vlc_object_t *p_this )
p_sys->i_tsid = nrand48(subi) & 0xffff;
p_sys->i_netid = nrand48(subi) & 0xffff;
-#ifdef HAVE_DVBPSI_SDT
+
var_Get( p_mux, SOUT_CFG_PREFIX "netid", &val );
if ( val.i_int )
p_sys->i_netid = val.i_int;
-#endif
p_sys->i_pmt_version_number = nrand48(subi) & 0x1f;
for( i = 0; i < p_sys->i_num_pmt; i++ )
@@ -597,7 +590,6 @@ static int Open( vlc_object_t *p_this )
p_sys->sdt.i_continuity_counter = 0;
p_sys->sdt.b_discontinuity = false;
-#ifdef HAVE_DVBPSI_SDT
var_Get( p_mux, SOUT_CFG_PREFIX "sdtdesc", &val );
p_sys->b_sdt = val.psz_string && *val.psz_string ? true : false;
@@ -632,9 +624,6 @@ static int Open( vlc_object_t *p_this )
}
}
free( val.psz_string );
-#else
- p_sys->b_sdt = false;
-#endif
p_sys->b_data_alignment = var_GetBool( p_mux, SOUT_CFG_PREFIX "alignment" );
@@ -2292,7 +2281,6 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
int i;
int *p_usepid = NULL;
-#ifdef HAVE_DVBPSI_SDT
block_t *p_sdt;
dvbpsi_sdt_t sdt;
@@ -2300,7 +2288,6 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
dvbpsi_sdt_service_t *p_service;
uint8_t *psz_sdt_desc;
-#endif
if( p_sys->dvbpmt == NULL )
{
@@ -2310,10 +2297,9 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
return;
}
}
-#ifdef HAVE_DVBPSI_SDT
+
if( p_sys->b_sdt )
dvbpsi_InitSDT( &sdt, p_sys->i_tsid, 1, 1, p_sys->i_netid );
-#endif
for( i = 0; i < p_sys->i_num_pmt; i++ )
{
@@ -2323,7 +2309,6 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
1, /* b_current_next */
p_sys->i_pcr_pid );
-#ifdef HAVE_DVBPSI_SDT
if( p_sys->b_sdt )
{
p_service = dvbpsi_SDTAddService( &sdt,
@@ -2365,7 +2350,6 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
#undef psz_sdtprov
#undef psz_sdtserv
}
-#endif
}
if( p_sys->i_mpeg4_streams > 0 )
@@ -2653,7 +2637,6 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
dvbpsi_EmptyPMT( &p_sys->dvbpmt[i] );
}
-#ifdef HAVE_DVBPSI_SDT
if( p_sys->b_sdt )
{
p_section2 = dvbpsi_GenSDTSections( &sdt );
@@ -2662,5 +2645,4 @@ static void GetPMT( sout_mux_t *p_mux, sout_buffer_chain_t *c )
dvbpsi_DeletePSISections( p_section2 );
dvbpsi_EmptySDT( &sdt );
}
-#endif
}
More information about the vlc-commits
mailing list