rtp.c File Reference

Include dependency graph for rtp.c:


Data Structures

struct  sout_stream_sys_t
struct  rtp_sink_t
struct  sout_stream_id_t

Defines

#define IPPROTO_DCCP   33
#define IPPROTO_UDPLITE   136
#define DEST_TEXT   N_("Destination")
#define DEST_LONGTEXT
#define SDP_TEXT   N_("SDP")
#define SDP_LONGTEXT
#define SAP_TEXT   N_("SAP announcing")
#define SAP_LONGTEXT   N_("Announce this session with SAP.")
#define MUX_TEXT   N_("Muxer")
#define MUX_LONGTEXT
#define NAME_TEXT   N_("Session name")
#define NAME_LONGTEXT
#define DESC_TEXT   N_("Session description")
#define DESC_LONGTEXT
#define URL_TEXT   N_("Session URL")
#define URL_LONGTEXT
#define EMAIL_TEXT   N_("Session email")
#define EMAIL_LONGTEXT
#define PHONE_TEXT   N_("Session phone number")
#define PHONE_LONGTEXT
#define PORT_TEXT   N_("Port")
#define PORT_LONGTEXT
#define PORT_AUDIO_TEXT   N_("Audio port")
#define PORT_AUDIO_LONGTEXT
#define PORT_VIDEO_TEXT   N_("Video port")
#define PORT_VIDEO_LONGTEXT
#define TTL_TEXT   N_("Hop limit (TTL)")
#define TTL_LONGTEXT
#define RTCP_MUX_TEXT   N_("RTP/RTCP multiplexing")
#define RTCP_MUX_LONGTEXT
#define CACHING_TEXT   N_("Caching value (ms)")
#define CACHING_LONGTEXT
#define PROTO_TEXT   N_("Transport protocol")
#define PROTO_LONGTEXT
#define SRTP_KEY_TEXT   N_("SRTP key (hexadecimal)")
#define SRTP_KEY_LONGTEXT
#define SRTP_SALT_TEXT   N_("SRTP salt (hexadecimal)")
#define SRTP_SALT_LONGTEXT
#define RFC3016_TEXT   N_("MP4A LATM")
#define RFC3016_LONGTEXT
#define SOUT_CFG_PREFIX   "sout-rtp-"
#define MAX_EMPTY_BLOCKS   200

Typedefs

typedef int(* pf_rtp_packetizer_t )(sout_stream_id_t *, block_t *)

Functions

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 sout_stream_id_tAdd (sout_stream_t *p_stream, es_format_t *p_fmt)
 Add an ES as a new RTP stream.
static int Del (sout_stream_t *, sout_stream_id_t *)
static int Send (sout_stream_t *, sout_stream_id_t *, block_t *)
static sout_stream_id_tMuxAdd (sout_stream_t *p_stream, es_format_t *p_fmt)
 Add an ES to a non-RTP muxed stream.
static int MuxDel (sout_stream_t *p_stream, sout_stream_id_t *id)
 Remove an ES from a non-RTP muxed stream.
static int MuxSend (sout_stream_t *, sout_stream_id_t *, block_t *)
static sout_access_out_tGrabberCreate (sout_stream_t *p_sout)
static void * ThreadSend (void *)
static void * rtp_listen_thread (void *)
static void SDPHandleUrl (sout_stream_t *, const char *)
static int SapSetup (sout_stream_t *p_stream)
static int FileSetup (sout_stream_t *p_stream)
static int HttpSetup (sout_stream_t *p_stream, const vlc_url_t *)
char * SDPGenerate (sout_stream_t *p_stream, const char *rtsp_url)
static void sprintf_hexa (char *s, uint8_t *p_data, int i_data)
static void rtp_set_ptime (sout_stream_id_t *id, unsigned ptime_ms, size_t bytes)
 Shrink the MTU down to a fixed packetization time (for audio).
uint32_t rtp_compute_ts (const sout_stream_id_t *id, int64_t i_pts)
static int HttpCallback (httpd_file_sys_t *p_args, httpd_file_t *, uint8_t *p_request, uint8_t **pp_data, int *pi_data)
 This function is the main HTTPD Callback used by the HTTP Interface.
int rtp_add_sink (sout_stream_id_t *id, int fd, bool rtcp_mux, uint16_t *seq)
void rtp_del_sink (sout_stream_id_t *id, int fd)
uint16_t rtp_get_seq (sout_stream_id_t *id)
int64_t rtp_get_ts (const sout_stream_t *p_stream)
void rtp_packetize_common (sout_stream_id_t *id, block_t *out, int b_marker, int64_t i_pts)
void rtp_packetize_send (sout_stream_id_t *id, block_t *out)
size_t rtp_mtu (const sout_stream_id_t *id)
static ssize_t AccessOutGrabberWriteBuffer (sout_stream_t *p_stream, const block_t *p_buffer)
static ssize_t AccessOutGrabberWrite (sout_access_out_t *p_access, block_t *p_buffer)

Variables

static const char *const ppsz_protos []
static const char *const ppsz_protocols []
static const char *const ppsz_sout_options []

Define Documentation

#define CACHING_LONGTEXT

Value:

N_( \
    "Default caching value for outbound RTP streams. This " \
    "value should be set in milliseconds." )

#define CACHING_TEXT   N_("Caching value (ms)")

#define DESC_LONGTEXT

Value:

N_( \
    "This allows you to give a short description with details about the stream, " \
    "that will be announced in the SDP (Session Descriptor)." )

#define DESC_TEXT   N_("Session description")

#define DEST_LONGTEXT

Value:

N_( \
    "This is the output URL that will be used." )

#define DEST_TEXT   N_("Destination")

#define EMAIL_LONGTEXT

Value:

N_( \
    "This allows you to give a contact mail address for the stream, that will " \
    "be announced in the SDP (Session Descriptor)." )

#define EMAIL_TEXT   N_("Session email")

#define IPPROTO_DCCP   33

#define IPPROTO_UDPLITE   136

#define MAX_EMPTY_BLOCKS   200

#define MUX_LONGTEXT

Value:

N_( \
    "This allows you to specify the muxer used for the streaming output. " \
    "Default is to use no muxer (standard RTP stream)." )

#define MUX_TEXT   N_("Muxer")

#define NAME_LONGTEXT

Value:

N_( \
    "This is the name of the session that will be announced in the SDP " \
    "(Session Descriptor)." )

#define NAME_TEXT   N_("Session name")

#define PHONE_LONGTEXT

Value:

N_( \
    "This allows you to give a contact telephone number for the stream, that will " \
    "be announced in the SDP (Session Descriptor)." )

#define PHONE_TEXT   N_("Session phone number")

#define PORT_AUDIO_LONGTEXT

Value:

N_( \
    "This allows you to specify the default audio port for the RTP streaming." )

#define PORT_AUDIO_TEXT   N_("Audio port")

#define PORT_LONGTEXT

Value:

N_( \
    "This allows you to specify the base port for the RTP streaming." )

#define PORT_TEXT   N_("Port")

#define PORT_VIDEO_LONGTEXT

Value:

N_( \
    "This allows you to specify the default video port for the RTP streaming." )

#define PORT_VIDEO_TEXT   N_("Video port")

#define PROTO_LONGTEXT

Value:

N_( \
    "This selects which transport protocol to use for RTP." )

#define PROTO_TEXT   N_("Transport protocol")

#define RFC3016_LONGTEXT

Value:

N_( \
    "This allows you to stream MPEG4 LATM audio streams (see RFC3016)." )

#define RFC3016_TEXT   N_("MP4A LATM")

#define RTCP_MUX_LONGTEXT

Value:

N_( \
    "This sends and receives RTCP packet multiplexed over the same port " \
    "as RTP packets." )

#define RTCP_MUX_TEXT   N_("RTP/RTCP multiplexing")

#define SAP_LONGTEXT   N_("Announce this session with SAP.")

#define SAP_TEXT   N_("SAP announcing")

#define SDP_LONGTEXT

Value:

N_( \
    "This allows you to specify how the SDP (Session Descriptor) for this RTP "\
    "session will be made available. You must use an url: http://location to " \
    "access the SDP via HTTP, rtsp://location for RTSP access, and sap:// " \
    "for the SDP to be announced via SAP." )

#define SDP_TEXT   N_("SDP")

#define SOUT_CFG_PREFIX   "sout-rtp-"

#define SRTP_KEY_LONGTEXT

Value:

N_( \
    "RTP packets will be integrity-protected and ciphered "\
    "with this Secure RTP master shared secret key.")

#define SRTP_KEY_TEXT   N_("SRTP key (hexadecimal)")

#define SRTP_SALT_LONGTEXT

Value:

N_( \
    "Secure RTP requires a (non-secret) master salt value.")

#define SRTP_SALT_TEXT   N_("SRTP salt (hexadecimal)")

#define TTL_LONGTEXT

Value:

N_( \
    "This is the hop limit (also known as \"Time-To-Live\" or TTL) of " \
    "the multicast packets sent by the stream output (-1 = use operating " \
    "system built-in default).")

#define TTL_TEXT   N_("Hop limit (TTL)")

#define URL_LONGTEXT

Value:

N_( \
    "This allows you to give an URL with more details about the stream " \
    "(often the website of the streaming organization), that will " \
    "be announced in the SDP (Session Descriptor)." )

#define URL_TEXT   N_("Session URL")


Typedef Documentation


Function Documentation

static ssize_t AccessOutGrabberWrite ( sout_access_out_t p_access,
block_t p_buffer 
) [static]

static ssize_t AccessOutGrabberWriteBuffer ( sout_stream_t p_stream,
const block_t p_buffer 
) [static]

static sout_stream_id_t * Add ( sout_stream_t p_stream,
es_format_t p_fmt 
) [static]

Add an ES as a new RTP stream.

References asprintf(), es_format_t::audio, AUDIO_ES, sout_stream_sys_t::b_export_sap, sout_stream_sys_t::b_latm, sout_stream_id_t::b_ts_init, block_FifoNew(), block_FifoRelease(), clz32, config, Del(), sout_stream_sys_t::es, sout_stream_id_t::fd, FileSetup(), GetDWBE, es_format_t::i_bitrate, sout_stream_id_t::i_cat, es_format_t::i_cat, audio_format_t::i_channels, es_format_t::i_codec, sout_stream_sys_t::i_es, es_format_t::i_extra, sout_stream_id_t::i_mtu, sout_stream_sys_t::i_npt_zero, sout_stream_id_t::i_payload_type, sout_stream_sys_t::i_port, sout_stream_id_t::i_port, sout_stream_sys_t::i_port_audio, sout_stream_sys_t::i_port_video, sout_stream_sys_t::i_pts_offset, audio_format_t::i_rate, sout_stream_id_t::i_sequence, sout_stream_sys_t::i_ttl, IPPROTO_DCCP, sout_stream_id_t::listen, sout_stream_sys_t::lock_es, sout_stream_sys_t::lock_sdp, sout_stream_id_t::lock_sink, sout_stream_sys_t::lock_ts, msg_Dbg, msg_Err, net_ConnectDgram, net_Listen(), net_ListenClose(), net_SetCSCov(), es_format_t::p_extra, sout_stream_id_t::p_fifo, sout_stream_t::p_sys, sout_stream_sys_t::payload_bitmap, sout_stream_sys_t::proto, sout_stream_sys_t::psz_destination, sout_stream_id_t::psz_fmtp, sout_stream_sys_t::psz_sdp, sout_stream_sys_t::psz_sdp_file, sout_stream_sys_t::rtcp_mux, rtp_add_sink(), rtp_compute_ts(), rtp_sink_t::rtp_fd, rtp_listen_thread(), rtp_packetize_ac3(), rtp_packetize_amr(), rtp_packetize_g726_16(), rtp_packetize_g726_24(), rtp_packetize_g726_32(), rtp_packetize_g726_40(), rtp_packetize_h263(), rtp_packetize_h264(), rtp_packetize_mp4a(), rtp_packetize_mp4a_latm(), rtp_packetize_mpa(), rtp_packetize_mpv(), rtp_packetize_split(), rtp_packetize_spx(), rtp_packetize_swab(), rtp_packetize_t140(), rtp_set_ptime(), sout_stream_sys_t::rtsp, RtspAddId(), SapSetup(), SDPGenerate(), sout_stream_id_t::sinkc, sout_stream_id_t::sinkv, SOUT_CFG_PREFIX, sprintf_hexa(), SPU_ES, sout_stream_id_t::ssrc, strdup(), TAB_APPEND, sout_stream_id_t::thread, ThreadSend(), unlikely, var_CreateGetNonEmptyString, var_GetInteger, var_GetNonEmptyString, var_InheritInteger, var_SetString, VIDEO_ES, vlc_b64_encode_binary(), vlc_clone(), VLC_CODEC_A52, VLC_CODEC_ADPCM_G726, VLC_CODEC_ALAW, VLC_CODEC_AMR_NB, VLC_CODEC_AMR_WB, VLC_CODEC_H263, VLC_CODEC_H264, VLC_CODEC_ITU_T140, VLC_CODEC_MP4A, VLC_CODEC_MP4V, VLC_CODEC_MPGA, VLC_CODEC_MPGV, VLC_CODEC_MULAW, VLC_CODEC_S16B, VLC_CODEC_S16L, VLC_CODEC_SPEEX, VLC_CODEC_U8, vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, vlc_rand_bytes(), VLC_THREAD_PRIORITY_HIGHEST, VLC_THREAD_PRIORITY_LOW, and VLC_TS_INVALID.

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 Del ( sout_stream_t p_stream,
sout_stream_id_t id 
) [static]

static int FileSetup ( sout_stream_t p_stream  )  [static]

static sout_access_out_t * GrabberCreate ( sout_stream_t p_sout  )  [static]

static int HttpSetup ( sout_stream_t p_stream,
const vlc_url_t url 
) [static]

static sout_stream_id_t * MuxAdd ( sout_stream_t p_stream,
es_format_t p_fmt 
) [static]

Add an ES to a non-RTP muxed stream.

References msg_Err, sout_stream_sys_t::p_mux, sout_stream_t::p_sys, and sout_MuxAddStream().

static int MuxDel ( sout_stream_t p_stream,
sout_stream_id_t id 
) [static]

Remove an ES from a non-RTP muxed stream.

References sout_stream_sys_t::p_mux, sout_stream_t::p_sys, sout_MuxDeleteStream(), and VLC_SUCCESS.

static int MuxSend ( sout_stream_t p_stream,
sout_stream_id_t id,
block_t p_buffer 
) [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

int rtp_add_sink ( sout_stream_id_t id,
int  fd,
bool  rtcp_mux,
uint16_t *  seq 
)

uint32_t rtp_compute_ts ( const sout_stream_id_t id,
int64_t  i_pts 
)

void rtp_del_sink ( sout_stream_id_t id,
int  fd 
)

uint16_t rtp_get_seq ( sout_stream_id_t id  ) 

int64_t rtp_get_ts ( const sout_stream_t p_stream  ) 

static void * rtp_listen_thread ( void *  data  )  [static]

size_t rtp_mtu ( const sout_stream_id_t id  ) 

void rtp_packetize_common ( sout_stream_id_t id,
block_t out,
int  b_marker,
int64_t  i_pts 
)

void rtp_packetize_send ( sout_stream_id_t id,
block_t out 
)

static void rtp_set_ptime ( sout_stream_id_t id,
unsigned  ptime_ms,
size_t  bytes 
) [static]

Shrink the MTU down to a fixed packetization time (for audio).

References sout_stream_id_t::i_mtu, and rtp_mtu().

Referenced by Add().

static int SapSetup ( sout_stream_t p_stream  )  [static]

char* SDPGenerate ( sout_stream_t p_stream,
const char *  rtsp_url 
)

static void SDPHandleUrl ( sout_stream_t p_stream,
const char *  psz_url 
) [static]

static int Send ( sout_stream_t p_stream,
sout_stream_id_t id,
block_t p_buffer 
) [static]

static void sprintf_hexa ( char *  s,
uint8_t *  p_data,
int  i_data 
) [static]

References hex().

static void * ThreadSend ( void *  data  )  [static]

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 


Variable Documentation

const char* const ppsz_protocols[] [static]

Initial value:

 {
    "DCCP", "SCTP", "TCP", "UDP", "UDP-Lite",
}

const char* const ppsz_protos[] [static]

Initial value:

 {
    "dccp", "sctp", "tcp", "udp", "udplite",
}

const char* const ppsz_sout_options[] [static]

Initial value:

 {
    "dst", "name", "port", "port-audio", "port-video", "*sdp", "ttl", "mux",
    "sap", "description", "url", "email", "phone",
    "proto", "rtcp-mux", "caching", "key", "salt",
    "mp4a-latm", NULL
}


Generated on Tue May 25 08:05:08 2010 for VLC by  doxygen 1.5.6