ts.c File Reference

Include dependency graph for ts.c:


Data Structures

struct  pmt_map_t
struct  sdt_desc_t
struct  sout_buffer_chain_t
struct  ts_stream_t
struct  sout_mux_sys_t

Defines

#define VPID_TEXT   N_("Video PID")
#define VPID_LONGTEXT
#define APID_TEXT   N_("Audio PID")
#define APID_LONGTEXT   N_("Assign a fixed PID to the audio stream.")
#define SPUPID_TEXT   N_("SPU PID")
#define SPUPID_LONGTEXT   N_("Assign a fixed PID to the SPU.")
#define PMTPID_TEXT   N_("PMT PID")
#define PMTPID_LONGTEXT   N_("Assign a fixed PID to the PMT")
#define TSID_TEXT   N_("TS ID")
#define TSID_LONGTEXT   N_("Assign a fixed Transport Stream ID.")
#define NETID_TEXT   N_("NET ID")
#define NETID_LONGTEXT   N_("Assign a fixed Network ID (for SDT table)")
#define PMTPROG_TEXT   N_("PMT Program numbers")
#define PMTPROG_LONGTEXT
#define MUXPMT_TEXT   N_("Mux PMT (requires --sout-ts-es-id-pid)")
#define MUXPMT_LONGTEXT
#define SDTDESC_TEXT   N_("SDT Descriptors (requires --sout-ts-es-id-pid)")
#define SDTDESC_LONGTEXT
#define PID_TEXT   N_("Set PID to ID of ES")
#define PID_LONGTEXT
#define ALIGNMENT_TEXT   N_("Data alignment")
#define ALIGNMENT_LONGTEXT
#define SHAPING_TEXT   N_("Shaping delay (ms)")
#define SHAPING_LONGTEXT
#define KEYF_TEXT   N_("Use keyframes")
#define KEYF_LONGTEXT
#define PCR_TEXT   N_("PCR delay (ms)")
#define PCR_LONGTEXT
#define BMIN_TEXT   N_( "Minimum B (deprecated)")
#define BMIN_LONGTEXT   N_( "This setting is deprecated and not used anymore" )
#define BMAX_TEXT   N_( "Maximum B (deprecated)")
#define BMAX_LONGTEXT   N_( "This setting is deprecated and not used anymore")
#define DTS_TEXT   N_("DTS delay (ms)")
#define DTS_LONGTEXT
#define ACRYPT_TEXT   N_("Crypt audio")
#define ACRYPT_LONGTEXT   N_("Crypt audio using CSA")
#define VCRYPT_TEXT   N_("Crypt video")
#define VCRYPT_LONGTEXT   N_("Crypt video using CSA")
#define CK_TEXT   N_("CSA Key")
#define CK_LONGTEXT
#define CK2_TEXT   N_("Second CSA Key")
#define CK2_LONGTEXT
#define CU_TEXT   N_("CSA Key in use")
#define CU_LONGTEXT
#define CPKT_TEXT   N_("Packet size in bytes to encrypt")
#define CPKT_LONGTEXT
#define SOUT_CFG_PREFIX   "sout-ts-"
#define MAX_PMT   1
#define MAX_PMT_PID   64
#define STD_PES_PAYLOAD   170
#define ADTS_HEADER_SIZE   7

Functions

static int ChangeKeyCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
static int ActiveKeyCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
static int Open (vlc_object_t *)
static void Close (vlc_object_t *)
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static void BufferChainInit (sout_buffer_chain_t *c)
static void BufferChainAppend (sout_buffer_chain_t *c, block_t *b)
static block_tBufferChainGet (sout_buffer_chain_t *c)
static block_tBufferChainPeek (sout_buffer_chain_t *c)
static void BufferChainClean (sout_buffer_chain_t *c)
static int AllocatePID (sout_mux_sys_t *p_sys, int i_cat)
static int pmtcompare (const void *pa, const void *pb)
static int intcompare (const void *pa, const void *pb)
static int Control (sout_mux_t *, int, va_list)
static int AddStream (sout_mux_t *, sout_input_t *)
static int DelStream (sout_mux_t *, sout_input_t *)
static int Mux (sout_mux_t *)
static block_tFixPES (sout_mux_t *p_mux, block_fifo_t *p_fifo)
static block_tAdd_ADTS (block_t *, es_format_t *)
static void TSSchedule (sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts, mtime_t i_pcr_length, mtime_t i_pcr_dts)
static void TSDate (sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts, mtime_t i_pcr_length, mtime_t i_pcr_dts)
static void GetPAT (sout_mux_t *p_mux, sout_buffer_chain_t *c)
static void GetPMT (sout_mux_t *p_mux, sout_buffer_chain_t *c)
static block_tTSNew (sout_mux_t *p_mux, ts_stream_t *p_stream, bool b_pcr)
static void TSSetPCR (block_t *p_ts, mtime_t i_dts)
static void PEStoTS (sout_instance_t *, sout_buffer_chain_t *, block_t *, ts_stream_t *)
static block_tWritePSISection (sout_instance_t *p_sout, dvbpsi_psi_section_t *p_section)
static uint32_t GetDescriptorLength24b (int i_length)

Variables

static const char *const ppsz_sout_options []

Define Documentation

#define ACRYPT_LONGTEXT   N_("Crypt audio using CSA")

#define ACRYPT_TEXT   N_("Crypt audio")

#define ADTS_HEADER_SIZE   7

#define ALIGNMENT_LONGTEXT

Value:

N_("Enforces alignment of all access units on " \
  "PES boundaries. Disabling this might save some bandwidth but introduce incompatibilities.")

#define ALIGNMENT_TEXT   N_("Data alignment")

#define APID_LONGTEXT   N_("Assign a fixed PID to the audio stream.")

#define APID_TEXT   N_("Audio PID")

#define BMAX_LONGTEXT   N_( "This setting is deprecated and not used anymore")

#define BMAX_TEXT   N_( "Maximum B (deprecated)")

#define BMIN_LONGTEXT   N_( "This setting is deprecated and not used anymore" )

#define BMIN_TEXT   N_( "Minimum B (deprecated)")

#define CK2_LONGTEXT

Value:

N_("The even CSA encryption key. This must be a " \
  "16 char string (8 hexadecimal bytes).")

#define CK2_TEXT   N_("Second CSA Key")

#define CK_LONGTEXT

Value:

N_("CSA encryption key. This must be a " \
  "16 char string (8 hexadecimal bytes).")

#define CK_TEXT   N_("CSA Key")

#define CPKT_LONGTEXT

Value:

N_("Size of the TS packet to encrypt. " \
    "The encryption routines subtract the TS-header from the value before " \
    "encrypting." )

#define CPKT_TEXT   N_("Packet size in bytes to encrypt")

#define CU_LONGTEXT

Value:

N_("CSA encryption key used. It can be the odd/first/1 " \
  "(default) or the even/second/2 one.")

#define CU_TEXT   N_("CSA Key in use")

#define DTS_LONGTEXT

Value:

N_("Delay the DTS (decoding time " \
  "stamps) and PTS (presentation timestamps) of the data in the " \
  "stream, compared to the PCRs. This allows for some buffering inside " \
  "the client decoder.")

#define DTS_TEXT   N_("DTS delay (ms)")

#define KEYF_LONGTEXT

Value:

N_("If enabled, and shaping is specified, " \
  "the TS muxer will place the boundaries at the end of I pictures. In " \
  "that case, the shaping duration given by the user is a worse case " \
  "used when no reference frame is available. This enhances the efficiency " \
  "of the shaping algorithm, since I frames are usually the biggest " \
  "frames in the stream.")

#define KEYF_TEXT   N_("Use keyframes")

#define MAX_PMT   1

#define MAX_PMT_PID   64

#define MUXPMT_LONGTEXT

Value:

N_("Define the pids to add to each pmt. This " \
                           "requires \"Set PID to ID of ES\" to be enabled." )

#define MUXPMT_TEXT   N_("Mux PMT (requires --sout-ts-es-id-pid)")

#define NETID_LONGTEXT   N_("Assign a fixed Network ID (for SDT table)")

#define NETID_TEXT   N_("NET ID")

#define PCR_LONGTEXT

Value:

N_("Set at which interval " \
  "PCRs (Program Clock Reference) will be sent (in milliseconds). " \
  "This value should be below 100ms. (default is 70ms).")

#define PCR_TEXT   N_("PCR delay (ms)")

#define PID_LONGTEXT

Value:

N_("Sets PID to the ID if the incoming ES. This is for " \
  "use with --ts-es-id-pid, and allows to have the same PIDs in the input " \
  "and output streams.")

#define PID_TEXT   N_("Set PID to ID of ES")

#define PMTPID_LONGTEXT   N_("Assign a fixed PID to the PMT")

#define PMTPID_TEXT   N_("PMT PID")

#define PMTPROG_LONGTEXT

Value:

N_("Assign a program number to each PMT. This " \
                            "requires \"Set PID to ID of ES\" to be enabled." )

#define PMTPROG_TEXT   N_("PMT Program numbers")

#define SDTDESC_LONGTEXT

Value:

N_("Defines the descriptors of each SDT. This" \
                        "requires \"Set PID to ID of ES\" to be enabled." )

#define SDTDESC_TEXT   N_("SDT Descriptors (requires --sout-ts-es-id-pid)")

#define SHAPING_LONGTEXT

Value:

N_("Cut the " \
  "stream in slices of the given duration, and ensure a constant bitrate " \
  "between the two boundaries. This avoids having huge bitrate peaks, " \
  "especially for reference frames." )

#define SHAPING_TEXT   N_("Shaping delay (ms)")

#define SOUT_CFG_PREFIX   "sout-ts-"

#define SPUPID_LONGTEXT   N_("Assign a fixed PID to the SPU.")

#define SPUPID_TEXT   N_("SPU PID")

#define STD_PES_PAYLOAD   170

#define TSID_LONGTEXT   N_("Assign a fixed Transport Stream ID.")

#define TSID_TEXT   N_("TS ID")

#define VCRYPT_LONGTEXT   N_("Crypt video using CSA")

#define VCRYPT_TEXT   N_("Crypt video")

#define VPID_LONGTEXT

Value:

N_("Assign a fixed PID to the video stream. The PCR " \
  "PID will automatically be the video.")

#define VPID_TEXT   N_("Video PID")


Function Documentation

static int ActiveKeyCallback ( vlc_object_t ,
char const *  ,
vlc_value_t  ,
vlc_value_t  ,
void *   
) [static]

static block_t * Add_ADTS ( block_t ,
es_format_t  
) [static]

static int AddStream ( sout_mux_t ,
sout_input_t  
) [static]

static int AllocatePID ( sout_mux_sys_t p_sys,
int  i_cat 
) [static]

static void BufferChainAppend ( sout_buffer_chain_t c,
block_t b 
) [inline, static]

static void BufferChainClean ( sout_buffer_chain_t c  )  [inline, static]

static block_t* BufferChainGet ( sout_buffer_chain_t c  )  [inline, static]

static void BufferChainInit ( sout_buffer_chain_t c  )  [inline, static]

static block_t* BufferChainPeek ( sout_buffer_chain_t c  )  [inline, static]

static int ChangeKeyCallback ( vlc_object_t ,
char const *  ,
vlc_value_t  ,
vlc_value_t  ,
void *   
) [static]

static void Close ( vlc_object_t  )  [static]

static int Control ( sout_mux_t ,
int  ,
va_list   
) [static]

static int DelStream ( sout_mux_t ,
sout_input_t  
) [static]

static block_t * FixPES ( sout_mux_t p_mux,
block_fifo_t p_fifo 
) [static]

static uint32_t GetDescriptorLength24b ( int  i_length  )  [static]

static void GetPAT ( sout_mux_t p_mux,
sout_buffer_chain_t c 
) [static]

static void GetPMT ( sout_mux_t p_mux,
sout_buffer_chain_t c 
) [static]

static int intcompare ( const void *  pa,
const void *  pb 
) [static]

static int Mux ( sout_mux_t  )  [static]

static int Open ( vlc_object_t  )  [static]

static void PEStoTS ( sout_instance_t ,
sout_buffer_chain_t ,
block_t ,
ts_stream_t  
) [static]

static int pmtcompare ( const void *  pa,
const void *  pb 
) [static]

static void TSDate ( sout_mux_t p_mux,
sout_buffer_chain_t p_chain_ts,
mtime_t  i_pcr_length,
mtime_t  i_pcr_dts 
) [static]

static block_t * TSNew ( sout_mux_t p_mux,
ts_stream_t p_stream,
bool  b_pcr 
) [static]

static void TSSchedule ( sout_mux_t p_mux,
sout_buffer_chain_t p_chain_ts,
mtime_t  i_pcr_length,
mtime_t  i_pcr_dts 
) [static]

static void TSSetPCR ( block_t p_ts,
mtime_t  i_dts 
) [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 

static block_t* WritePSISection ( sout_instance_t p_sout,
dvbpsi_psi_section_t *  p_section 
) [static]


Variable Documentation

const char* const ppsz_sout_options[] [static]

Initial value:

 {
    "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "netid",
    "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", "sdtdesc", "program-pmt", "alignment",
    NULL
}


Generated on Wed Aug 13 08:03:31 2008 for VLC by  doxygen 1.5.1