#define SPUPID_TEXT N_("SPU PID")
#define SPUPID_LONGTEXT N_("Assigns a fixed PID to the SPU.")
#define PMTPID_TEXT N_("PMT PID")
-#define PMTPID_LONGTEXT N_("Assings a fixed PID to the PMT")
+#define PMTPID_LONGTEXT N_("Assigns a fixed PID to the PMT")
#define TSID_TEXT N_("TS ID")
#define TSID_LONGTEXT N_("Assigns a fixed Transport Stream ID.")
+#define PMTPROG_TEXT N_("PMT Program number")
+#define PMTPROG_LONGTEXT N_("Assigns a program number to the PMT.")
#define PID_TEXT N_("Set PID to id of ES")
#define PID_LONGTEXT N_("set PID to id of es")
PMTPID_LONGTEXT, VLC_TRUE );
add_integer( SOUT_CFG_PREFIX "tsid", 0, NULL, TSID_TEXT,
TSID_LONGTEXT, VLC_TRUE );
+ add_integer( SOUT_CFG_PREFIX "program-pmt", 1, NULL, PMTPROG_TEXT,
+ PMTPROG_LONGTEXT, VLC_TRUE );
add_bool( SOUT_CFG_PREFIX "es-id-pid", 0, NULL, PID_TEXT, PID_LONGTEXT,
VLC_TRUE );
* Local data structures
*****************************************************************************/
static const char *ppsz_sout_options[] = {
- "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "es-id-pid",
+ "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "program-pmt", "es-id-pid",
"shaping", "pcr", "bmin", "bmax", "use-key-frames", "dts-delay",
"csa-ck", "crypt-audio",
NULL
int i_pmt_version_number;
ts_stream_t pmt; // Up to now only one program
+ int i_pmt_program_number;
int i_mpeg4_streams;
p_sys->i_pmt_version_number = rand() % 32;
p_sys->pmt.i_continuity_counter = 0;
+ var_Get( p_mux, SOUT_CFG_PREFIX "program-pmt", &val );
+ if (val.i_int )
+ {
+ p_sys->i_pmt_program_number = val.i_int;
+ }
+ else
+ {
+ p_sys->i_pmt_program_number = 1;
+ }
+
var_Get( p_mux, SOUT_CFG_PREFIX "pid-pmt", &val );
if (val.i_int )
{
1 ); // b_current_next
/* add all program (only one) */
dvbpsi_PATAddProgram( &pat,
- 1, // i_number
+ p_sys->i_pmt_program_number, // i_number
p_sys->pmt.i_pid ); // i_pid
p_section = dvbpsi_GenPATSections( &pat,
int i_stream;
dvbpsi_InitPMT( &pmt,
- 0x01, // program number
+ p_sys->i_pmt_program_number, // program number
p_sys->i_pmt_version_number,
1, // b_current_next
p_sys->i_pcr_pid );