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 interval (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   64
#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 *)
 Probes and initializes.
static void Close (vlc_object_t *)
 Releases resources.
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

Referenced by Add_ADTS(), and PacketizeStreamBlock().

#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   64

#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 interval (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

Referenced by FixPES().

#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 p_this,
char const *  psz_cmd,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  p_data 
) [static]

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

static int AddStream ( sout_mux_t p_mux,
sout_input_t p_input 
) [static]

References AllocatePID(), es_format_t::audio, AUDIO_ES, ts_stream_t::b_discontinuity, sout_mux_sys_t::b_es_id_pid, ts_stream_t::b_key_frame, BufferChainInit(), ts_stream_t::chain_pes, subs_format_t::dvb, GetLang_1(), GetLang_2B(), GetLang_2T(), sout_mux_sys_t::i_audio_bound, ts_stream_t::i_bih_codec, ts_stream_t::i_bih_height, ts_stream_t::i_bih_width, es_format_t::i_cat, es_format_t::i_codec, ts_stream_t::i_codec, ts_stream_t::i_continuity_counter, ts_stream_t::i_decoder_specific_info, ts_stream_t::i_es_id, es_format_t::i_extra, es_format_t::i_extra_languages, video_format_t::i_height, subs_format_t::i_id, es_format_t::i_id, ts_stream_t::i_langs, sout_mux_sys_t::i_mpeg4_streams, sout_mux_sys_t::i_pcr_pid, ts_stream_t::i_pes_dts, ts_stream_t::i_pes_length, ts_stream_t::i_pes_used, ts_stream_t::i_pid, sout_mux_sys_t::i_pmt_version_number, audio_format_t::i_rate, ts_stream_t::i_stream_id, ts_stream_t::i_stream_type, sout_mux_sys_t::i_video_bound, video_format_t::i_width, ts_stream_t::lang, msg_Dbg, ts_stream_t::p_decoder_specific_info, es_format_t::p_extra, es_format_t::p_extra_languages, sout_input_t::p_fmt, sout_mux_sys_t::p_pcr_input, p_stream, sout_input_t::p_sys, sout_mux_t::p_sys, PES_EXTENDED_STREAM_ID, iso639_lang_t::psz_iso639_1, iso639_lang_t::psz_iso639_2T, extra_languages_t::psz_language, es_format_t::psz_language, SPU_ES, es_format_t::subs, es_format_t::video, VIDEO_ES, VLC_CODEC_A52, VLC_CODEC_DIRAC, VLC_CODEC_DIV1, VLC_CODEC_DIV2, VLC_CODEC_DIV3, VLC_CODEC_DTS, VLC_CODEC_DVBS, VLC_CODEC_DVD_LPCM, VLC_CODEC_EAC3, VLC_CODEC_H263, VLC_CODEC_H263I, VLC_CODEC_H264, VLC_CODEC_MJPG, VLC_CODEC_MP4A, VLC_CODEC_MP4V, VLC_CODEC_MPGA, VLC_CODEC_MPGV, VLC_CODEC_SPU, VLC_CODEC_SUBT, VLC_CODEC_TELETEXT, VLC_CODEC_WMV1, VLC_CODEC_WMV2, VLC_CODEC_WMV3, VLC_EGENERIC, VLC_ENOMEM, and VLC_SUCCESS.

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]

References b, block_Release(), BufferChainGet(), and BufferChainInit().

Referenced by DelStream(), and Mux().

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]

References b, and sout_buffer_chain_t::p_first.

Referenced by TSSchedule().

static int ChangeKeyCallback ( vlc_object_t p_this,
char const *  psz_cmd,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  p_data 
) [static]

static void Close ( vlc_object_t p_this  )  [static]

Releases resources.

Close the module.

Destroys the X11 window.

Disconnect from the X server.

Close a SDL video output.

It destroys an OpenGL vout display.

Terminate a vout display created by Open.

It destroyes a Direct3D vout display.

Terminate an output method created by Open.

Release the drawable.

Close a libcaca video output.

Close a aa video output method.

Close the filter.

Terminate a splitter module.

This function closes a clone video splitter module.

Common close function.

Releases allocate resources.

Close: Destructor.

Parameters:
p_this pointer to this filter object
p_this,: the filter object

static int Control ( sout_mux_t p_mux,
int  i_query,
va_list  args 
) [static]

static int DelStream ( sout_mux_t p_mux,
sout_input_t p_input 
) [static]

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

static uint32_t GetDescriptorLength24b ( int  i_length  )  [static]

Referenced by GetPMT().

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]

Referenced by GetPMT().

static int Mux ( sout_mux_t p_mux  )  [static]

static int Open ( vlc_object_t p_this  )  [static]

Probes and initializes.

Status of this demuxer: Real Media format -----------------.

Basic chorus/flanger/delay audio filter This implements a variable delay filter for VLC.

Todo:

  • Improve CDDB support (non-blocking, cache, .

Open the module.

Create an X11 window.

Probe the X server.

This function initializes SDL vout method.

It creates an OpenGL vout display.

This function allocates and initialize the DirectX vout display.

It creates a Direct3D vout display.

This function allocates and initializes a FB vout method.

Find the drawable set by libvlc application.

This function initializes libcaca vout method.

This function allocates and initializes a aa vout method.

This function allocates and initializes a Wall splitter module.

Open the filter.

This function allocates and initializes a Clone splitter module.

Open: initialize and create stuff.

Connect to the sftp server and ask for a file.

Parameters:
p_this,: the vlc_object
Returns:
VLC_SUCCESS if everything was fine
Parameters:
p_this 
p_this,: the filter object
Returns:
VLC_SUCCESS or vlc error codes

Todo:
Reinstate meta codec name

static void PEStoTS ( sout_instance_t p_sout,
sout_buffer_chain_t c,
block_t p_pes,
ts_stream_t p_stream 
) [static]

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

Referenced by GetPMT().

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]

References block_t::p_buffer.

Referenced by TSDate().

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 Tue May 25 08:05:17 2010 for VLC by  doxygen 1.5.6