FFmpeg
|
#include "libavutil/mathematics.h"
#include "libavutil/avstring.h"
#include "libavutil/time.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
#include "network.h"
#include "srtp.h"
#include "url.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
Go to the source code of this file.
Macros | |
#define | MIN_FEEDBACK_INTERVAL 200000 /* 200 ms in us */ |
#define | RTP_SEQ_MOD (1 << 16) |
Variables | |
static RTPDynamicProtocolHandler | gsm_dynamic_handler |
static RTPDynamicProtocolHandler | realmedia_mp3_dynamic_handler |
static RTPDynamicProtocolHandler | speex_dynamic_handler |
static RTPDynamicProtocolHandler | opus_dynamic_handler |
static RTPDynamicProtocolHandler * | rtp_first_dynamic_payload_handler = NULL |
#define MIN_FEEDBACK_INTERVAL 200000 /* 200 ms in us */ |
Definition at line 33 of file rtpdec.c.
Referenced by ff_rtp_send_rtcp_feedback().
#define RTP_SEQ_MOD (1 << 16) |
Definition at line 165 of file rtpdec.c.
Referenced by rtp_init_sequence(), and rtp_valid_packet_in_sequence().
void ff_register_dynamic_payload_handler | ( | RTPDynamicProtocolHandler * | handler | ) |
Definition at line 61 of file rtpdec.c.
Referenced by ff_register_rdt_dynamic_payload_handlers(), and ff_register_rtp_dynamic_payload_handlers().
Definition at line 67 of file rtpdec.c.
Referenced by av_register_all().
RTPDynamicProtocolHandler* ff_rtp_handler_find_by_name | ( | const char * | name, |
enum AVMediaType | codec_type | ||
) |
RTPDynamicProtocolHandler* ff_rtp_handler_find_by_id | ( | int | id, |
enum AVMediaType | codec_type | ||
) |
|
static |
Definition at line 129 of file rtpdec.c.
Referenced by rtp_parse_one_packet().
|
static |
Definition at line 167 of file rtpdec.c.
Referenced by ff_rtp_parse_open().
|
static |
Definition at line 178 of file rtpdec.c.
Referenced by rtp_valid_packet_in_sequence().
|
static |
Definition at line 192 of file rtpdec.c.
Referenced by rtp_parse_packet_internal().
|
static |
Definition at line 238 of file rtpdec.c.
Referenced by rtp_parse_one_packet().
int ff_rtp_check_and_send_back_rr | ( | RTPDemuxContext * | s, |
URLContext * | fd, | ||
AVIOContext * | avio, | ||
int | count | ||
) |
some rtp servers assume client is dead if they don't hear from them...
so we send a Receiver Report to the provided URLContext or AVIOContext (we don't have access to the rtcp handle from here)
void ff_rtp_send_punch_packets | ( | URLContext * | rtp_handle | ) |
Send a dummy packet on both port pairs to set up the connection state in potential NAT routers, so that we're able to receive packets.
Note, this only works if the NAT router doesn't remap ports. This isn't a standardized procedure, but it works in many cases in practice.
The same routine is used with RDT too, even if RDT doesn't use normal RTP packets otherwise.
|
static |
Definition at line 397 of file rtpdec.c.
Referenced by ff_rtp_send_rtcp_feedback().
int ff_rtp_send_rtcp_feedback | ( | RTPDemuxContext * | s, |
URLContext * | fd, | ||
AVIOContext * | avio | ||
) |
RTPDemuxContext* ff_rtp_parse_open | ( | AVFormatContext * | s1, |
AVStream * | st, | ||
int | payload_type, | ||
int | queue_size | ||
) |
open a new RTP parse context for stream 'st'.
'st' can be NULL for MPEG2-TS streams.
Definition at line 495 of file rtpdec.c.
Referenced by ff_rtsp_open_transport_ctx().
void ff_rtp_parse_set_dynamic_protocol | ( | RTPDemuxContext * | s, |
PayloadContext * | ctx, | ||
RTPDynamicProtocolHandler * | handler | ||
) |
Definition at line 527 of file rtpdec.c.
Referenced by ff_rtsp_open_transport_ctx().
void ff_rtp_parse_set_crypto | ( | RTPDemuxContext * | s, |
const char * | suite, | ||
const char * | params | ||
) |
Definition at line 534 of file rtpdec.c.
Referenced by ff_rtsp_open_transport_ctx().
|
static |
This was the second switch in rtp_parse packet.
Normalizes time, if required, sets stream_index, etc.
Definition at line 545 of file rtpdec.c.
Referenced by rtp_parse_one_packet(), and rtp_parse_packet_internal().
|
static |
Definition at line 580 of file rtpdec.c.
Referenced by rtp_parse_one_packet(), and rtp_parse_queued_packet().
void ff_rtp_reset_packet_queue | ( | RTPDemuxContext * | s | ) |
Definition at line 663 of file rtpdec.c.
Referenced by ff_rtp_parse_close(), and rtsp_read_play().
|
static |
Definition at line 676 of file rtpdec.c.
Referenced by rtp_parse_one_packet().
|
static |
Definition at line 701 of file rtpdec.c.
Referenced by ff_rtp_parse_packet(), and rtp_parse_queued_packet().
int64_t ff_rtp_queued_packet_time | ( | RTPDemuxContext * | s | ) |
|
static |
Definition at line 711 of file rtpdec.c.
Referenced by ff_rtp_parse_packet(), and rtp_parse_one_packet().
|
static |
Definition at line 733 of file rtpdec.c.
Referenced by ff_rtp_parse_packet().
int ff_rtp_parse_packet | ( | RTPDemuxContext * | s, |
AVPacket * | pkt, | ||
uint8_t ** | bufptr, | ||
int | len | ||
) |
Parse an RTP or RTCP packet directly sent as a buffer.
s | RTP parse context. |
pkt | returned packet |
bufptr | pointer to the input buffer or NULL to read the next packets |
len | buffer len |
void ff_rtp_parse_close | ( | RTPDemuxContext * | s | ) |
Definition at line 829 of file rtpdec.c.
Referenced by ff_rtsp_undo_setup().
int ff_parse_fmtp | ( | AVFormatContext * | s, |
AVStream * | stream, | ||
PayloadContext * | data, | ||
const char * | p, | ||
int(*)(AVFormatContext *s, AVStream *stream, PayloadContext *data, char *attr, char *value) | parse_fmtp | ||
) |
Definition at line 836 of file rtpdec.c.
Referenced by amr_parse_sdp_line(), ilbc_parse_sdp_line(), latm_parse_sdp_line(), parse_h264_sdp_line(), parse_sdp_line(), and xiph_parse_sdp_line().
int ff_rtp_finalize_packet | ( | AVPacket * | pkt, |
AVIOContext ** | dyn_buf, | ||
int | stream_idx | ||
) |
Close the dynamic buffer and make a packet from it.
Definition at line 874 of file rtpdec.c.
Referenced by h263_handle_packet(), jpeg_parse_packet(), svq3_parse_packet(), vp8_handle_packet(), and xiph_handle_packet().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 59 of file rtpdec.c.
Referenced by ff_register_dynamic_payload_handler().