Commit 5f1a8335 authored by massiot's avatar massiot

* demux.c: By default preserve original TSID, patch by Marian Ďurkovič.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@23 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent ffec5330
......@@ -744,8 +744,12 @@ static void SendEIT( dvbpsi_psi_section_t *p_section, uint16_t i_sid,
{
if ( pp_outputs[i]->i_maddr && pp_outputs[i]->i_sid == i_sid )
{
p_section->p_data[8] = (i_sid >> 8) & 0xff;
p_section->p_data[9] = i_sid & 0xff;
if( b_unique_tsid )
{
p_section->p_data[8] = (i_sid >> 8) & 0xff;
p_section->p_data[9] = i_sid & 0xff;
}
dvbpsi_BuildPSISection( p_section );
block_t *p_block;
......@@ -795,7 +799,11 @@ static void NewPAT( output_t *p_output )
return;
}
dvbpsi_InitPAT( &pat, p_output->i_sid, p_output->i_pat_version, 1 );
if ( b_unique_tsid )
dvbpsi_InitPAT( &pat, p_output->i_sid, p_output->i_pat_version, 1 );
else
dvbpsi_InitPAT( &pat, p_current_pat->i_ts_id, p_output->i_pat_version, 1 );
dvbpsi_PATAddProgram( &pat, p_output->i_sid, p_program->i_pid );
p_output->p_pat_section = dvbpsi_GenPATSections( &pat, 0 );
......@@ -1292,9 +1300,15 @@ static void SDTCallback( void *_unused, dvbpsi_sdt_t *p_sdt )
{
p_new_sdt = malloc(sizeof(dvbpsi_sdt_t));
dvbpsi_InitSDT( p_new_sdt, p_service->i_service_id,
p_sdt->i_version, p_sdt->b_current_next,
p_sdt->i_network_id );
if ( b_unique_tsid )
dvbpsi_InitSDT( p_new_sdt, p_service->i_service_id,
p_sdt->i_version, p_sdt->b_current_next,
p_sdt->i_network_id );
else
dvbpsi_InitSDT( p_new_sdt, p_sdt->i_ts_id,
p_sdt->i_version, p_sdt->b_current_next,
p_sdt->i_network_id );
p_new_service = dvbpsi_SDTAddService( p_new_sdt,
p_service->i_service_id, p_service->b_eit_schedule,
p_service->b_eit_present, p_service->i_running_status, 0 );
......
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Andy Gatward <a.j.gatward@reading.ac.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -56,6 +57,7 @@ char *psz_modulation = NULL;
int b_budget_mode = 0;
int b_output_udp = 0;
int b_enable_epg = 0;
int b_unique_tsid = 0;
volatile int b_hup_received = 0;
int i_verbose = DEFAULT_VERBOSITY;
......@@ -184,7 +186,7 @@ static void SigHandler( int i_signal )
*****************************************************************************/
void usage()
{
msg_Raw( NULL, "Usage: dvblast [-q] -c <config file> [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>][-n <frontend_num>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-U] [-d <dest IP:port>] [-e]" );
msg_Raw( NULL, "Usage: dvblast [-q] -c <config file> [-r <remote socket>] [-t <ttl>] [-o <SSRC IP>] [-i <RT priority>] [-a <adapter>][-n <frontend_num>] -f <frequency> [-s <symbol rate>] [-v <0|13|18>] [-p] [-b <bandwidth>] [-m <modulation] [-u] [-U] [-d <dest IP:port>] [-e] [-T]" );
msg_Raw( NULL, " -q: be quiet (less verbosity, repeat or use number for even quieter)" );
msg_Raw( NULL, " -v: voltage to apply to the LNB (QPSK)" );
msg_Raw( NULL, " -p: force 22kHz pulses for high-band selection (DVB-S)" );
......@@ -195,6 +197,7 @@ void usage()
msg_Raw( NULL, " -U: use raw UDP rather than RTP (required by some IPTV set top boxes)" );
msg_Raw( NULL, " -d: duplicate all received packets to a given port" );
msg_Raw( NULL, " -e: enable EPG pass through (EIT data)" );
msg_Raw( NULL, " -T: generate unique TS ID for each program" );
exit(1);
}
......@@ -209,7 +212,7 @@ int main( int i_argc, char **pp_argv )
msg_Warn( NULL, "restarting" );
while ( ( c = getopt(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:s:v:pb:m:uUd:eh")) != (char)EOF )
while ( ( c = getopt(i_argc, pp_argv, "q::c:r:t:o:i:a:n:f:s:v:pb:m:uUTd:eh")) != (char)EOF )
{
switch ( c )
{
......@@ -321,6 +324,10 @@ int main( int i_argc, char **pp_argv )
b_enable_epg = 1;
break;
case 'T':
b_unique_tsid = 1;
break;
case 'h':
default:
usage();
......
......@@ -95,6 +95,7 @@ extern char *psz_modulation;
extern int b_budget_mode;
extern int b_output_udp;
extern int b_enable_epg;
extern int b_unique_tsid;
extern volatile int b_hup_received;
extern mtime_t i_ca_timeout;
extern int i_comm_fd;
......
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