|
VLC 4.0.0-dev
|
RTP session handling. More...
Data Structures | |
| struct | rtp_session_t |
| State for a RTP session: More... | |
| struct | rtp_source_t |
| State for an RTP source. More... | |
Typedefs | |
| typedef struct rtp_source_t | rtp_source_t |
Functions | |
| static rtp_source_t * | rtp_source_create (struct vlc_logger *logger, const rtp_session_t *session, uint32_t ssrc, uint16_t init_seq) |
| Initializes a new RTP source within an RTP session. | |
| static void | rtp_source_destroy (struct vlc_logger *logger, rtp_source_t *source) |
| Destroys an RTP source and its associated streams. | |
| static void | rtp_decode (struct vlc_logger *logger, const rtp_session_t *session, rtp_source_t *src) |
| Decodes one RTP packet. | |
| rtp_session_t * | rtp_session_create_custom (uint16_t max_dropout, uint16_t max_misorder, uint8_t max_src, vlc_tick_t timeout) |
| Creates a new RTP session. | |
| rtp_session_t * | rtp_session_create (void) |
| void | rtp_session_destroy (struct vlc_logger *logger, rtp_session_t *session) |
| Destroys an RTP session. | |
| int | rtp_add_type (rtp_session_t *ses, rtp_pt_t *pt) |
| Adds a payload type to an RTP session. | |
| static uint16_t | rtp_seq (const block_t *block) |
| static uint32_t | rtp_timestamp (const block_t *block) |
| static struct vlc_rtp_pt * | rtp_find_ptype (const rtp_session_t *session, const block_t *block) |
| void | rtp_queue (struct vlc_logger *logger, rtp_session_t *session, block_t *block) |
| Receives an RTP packet and queues it. | |
| bool | rtp_dequeue (struct vlc_logger *logger, const rtp_session_t *session, vlc_tick_t now, vlc_tick_t *restrict deadlinep) |
| Dequeues RTP packets and pass them to decoder. | |
RTP session handling.
| typedef struct rtp_source_t rtp_source_t |
|
static |
Decodes one RTP packet.
References BLOCK_FLAG_DISCONTINUITY, block_Release, rtp_source_t::blocks, vlc_rtp_pt::frequency, GetWBE, vlc_frame_t::i_buffer, vlc_frame_t::i_flags, vlc_frame_t::i_pts, rtp_source_t::instance, rtp_source_t::last_seq, vlc_rtp_pktinfo::m, rtp_source_t::opaque, vlc_frame_t::p_buffer, vlc_frame_t::p_next, rtp_source_t::pt, rtp_source_t::ref_ntp, rtp_source_t::ref_rtp, rtp_find_ptype(), rtp_ptype(), rtp_seq(), rtp_timestamp(), vlc_debug, vlc_rtp_pt_begin(), vlc_rtp_pt_decode(), vlc_rtp_pt_end(), vlc_tick_from_samples(), and vlc_warning.
Referenced by rtp_dequeue().
| bool rtp_dequeue | ( | struct vlc_logger * | logger, |
| const rtp_session_t * | session, | ||
| vlc_tick_t | now, | ||
| 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.
| logger | pointer to VLC logger |
| session | RTP session receiving the packet |
| now | monotonic clock reference for packets timing (ex: vlc_tick_now()) |
| deadlinep | pointer to deadline to call rtp_dequeue() again |
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(), and VLC_TICK_MAX.
|
static |
References vlc_rtp_pt::number, rtp_session_t::ptc, rtp_session_t::ptv, and rtp_ptype().
Referenced by rtp_decode(), rtp_dequeue(), and rtp_queue().
|
inlinestatic |
References GetWBE, vlc_frame_t::i_buffer, and vlc_frame_t::p_buffer.
Referenced by rtp_decode(), rtp_dequeue(), and rtp_queue().
|
static |
Initializes a new RTP source within an RTP session.
References rtp_source_t::bad_seq, rtp_source_t::blocks, rtp_source_t::instance, rtp_source_t::jitter, rtp_source_t::last_seq, rtp_source_t::max_seq, rtp_source_t::pt, rtp_session_t::ptc, rtp_source_t::ref_ntp, rtp_source_t::ref_rtp, rtp_source_t::ssrc, and vlc_debug.
Referenced by rtp_queue().
|
static |
Destroys an RTP source and its associated streams.
References block_ChainRelease, rtp_source_t::blocks, rtp_source_t::instance, rtp_source_t::opaque, rtp_source_t::pt, rtp_source_t::ssrc, vlc_debug, and vlc_rtp_pt_end().
Referenced by rtp_queue(), and rtp_session_destroy().
|
inlinestatic |
References GetDWBE, vlc_frame_t::i_buffer, and vlc_frame_t::p_buffer.
Referenced by rtp_decode(), and rtp_queue().