VLC  4.0.0-dev
Data Structures | Typedefs | Functions
session.c File Reference

RTP session handling. More...

Include dependency graph for session.c:

Data Structures

struct  rtp_session_t
 State for a RTP session: More...
struct  rtp_source_t
 State for an RTP source. More...


typedef struct rtp_source_t rtp_source_t


static rtp_source_trtp_source_create (demux_t *demux, const rtp_session_t *session, uint32_t ssrc, uint16_t init_seq)
 Initializes a new RTP source within an RTP session. More...
static void rtp_source_destroy (demux_t *demux, rtp_source_t *source)
 Destroys an RTP source and its associated streams. More...
static void rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src)
 Decodes one RTP packet. More...
rtp_session_trtp_session_create (demux_t *demux)
 Creates a new RTP session. More...
void rtp_session_destroy (demux_t *demux, rtp_session_t *session)
 Destroys an RTP session. More...
int rtp_add_type (rtp_session_t *ses, rtp_pt_t *pt)
 Adds a payload type to an RTP session. More...
static uint16_t rtp_seq (const block_t *block)
static uint32_t rtp_timestamp (const block_t *block)
static struct vlc_rtp_ptrtp_find_ptype (const rtp_session_t *session, const block_t *block)
void rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
 Receives an RTP packet and queues it. More...
bool rtp_dequeue (demux_t *demux, const rtp_session_t *session, vlc_tick_t *restrict deadlinep)
 Dequeues RTP packets and pass them to decoder. More...

Detailed Description

RTP session handling.

Typedef Documentation

◆ rtp_source_t

typedef struct rtp_source_t rtp_source_t

Function Documentation

◆ rtp_decode()

static void rtp_decode ( demux_t demux,
const rtp_session_t session,
rtp_source_t src 

◆ rtp_dequeue()

bool rtp_dequeue ( demux_t demux,
const rtp_session_t session,
vlc_tick_t *restrict  deadlinep 

Dequeues RTP packets and pass them to decoder.

Not cancellation-safe(?). A packet is decoded if it is the next in sequence order, or if we have given up waiting on the missing packets (time out) from the last one already decoded.

demuxVLC demux object
sessionRTP session receiving the packet
deadlineppointer to deadline to call rtp_dequeue() again
true if the buffer is not empty, false otherwise. In the later case, *deadlinep is undefined.

References rtp_source_t::blocks, vlc_rtp_pt::frequency, vlc_frame_t::i_pts, rtp_source_t::jitter, rtp_source_t::last_seq, rtp_decode(), rtp_find_ptype(), rtp_seq(), rtp_session_t::srcc, rtp_session_t::srcv, VLC_TICK_FROM_MS, vlc_tick_from_samples(), VLC_TICK_MAX, and vlc_tick_now().

◆ rtp_find_ptype()

static struct vlc_rtp_pt* rtp_find_ptype ( const rtp_session_t session,
const block_t block 

◆ rtp_seq()

static uint16_t rtp_seq ( const block_t block)

◆ rtp_source_create()

static rtp_source_t * rtp_source_create ( demux_t demux,
const rtp_session_t session,
uint32_t  ssrc,
uint16_t  init_seq 

◆ rtp_source_destroy()

static void rtp_source_destroy ( demux_t demux,
rtp_source_t source 

◆ rtp_timestamp()

static uint32_t rtp_timestamp ( const block_t block)