#include "libavutil/mathematics.h"
#include "libavutil/avstring.h"
#include "libavutil/time.h"
#include "libavcodec/get_bits.h"
#include "avformat.h"
#include "mpegts.h"
#include "url.h"
#include "network.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
Go to the source code of this file.
#define RTP_SEQ_MOD (1<<16) |
Definition at line 160 of file rtpdec.c.
Referenced by rtp_init_sequence(), and rtp_valid_packet_in_sequence().
void av_register_rtp_dynamic_payload_handlers | ( | void | ) |
static void enqueue_packet | ( | RTPDemuxContext * | s, | |
uint8_t * | buf, | |||
int | len | |||
) | [static] |
int ff_parse_fmtp | ( | AVStream * | stream, | |
PayloadContext * | data, | |||
const char * | p, | |||
int(*)(AVStream *stream, PayloadContext *data, char *attr, char *value) | parse_fmtp | |||
) |
Definition at line 770 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().
void ff_register_dynamic_payload_handler | ( | RTPDynamicProtocolHandler * | handler | ) |
Definition at line 61 of file rtpdec.c.
Referenced by av_register_rdt_dynamic_payload_handlers(), and av_register_rtp_dynamic_payload_handlers().
int ff_rtp_check_and_send_back_rr | ( | RTPDemuxContext * | s, | |
int | count | |||
) |
RTPDynamicProtocolHandler* ff_rtp_handler_find_by_id | ( | int | id, | |
enum AVMediaType | codec_type | |||
) |
RTPDynamicProtocolHandler* ff_rtp_handler_find_by_name | ( | const char * | name, | |
enum AVMediaType | codec_type | |||
) |
void ff_rtp_parse_close | ( | RTPDemuxContext * | s | ) |
RTPDemuxContext* ff_rtp_parse_open | ( | AVFormatContext * | s1, | |
AVStream * | st, | |||
URLContext * | rtpc, | |||
int | payload_type, | |||
int | queue_size | |||
) |
open a new RTP parse context for stream 'st'.
'st' can be NULL for MPEG2TS streams to indicate that they should be demuxed inside the rtp demux (otherwise AV_CODEC_ID_MPEG2TS packets are returned)
Definition at line 377 of file rtpdec.c.
Referenced by ff_rtsp_open_transport_ctx().
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_set_dynamic_protocol | ( | RTPDemuxContext * | s, | |
PayloadContext * | ctx, | |||
RTPDynamicProtocolHandler * | handler | |||
) |
int64_t ff_rtp_queued_packet_time | ( | RTPDemuxContext * | s | ) |
void ff_rtp_reset_packet_queue | ( | RTPDemuxContext * | s | ) |
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 void finalize_packet | ( | RTPDemuxContext * | s, | |
AVPacket * | pkt, | |||
uint32_t | timestamp | |||
) | [static] |
This was the second switch in rtp_parse packet.
Normalizes time, if required, sets stream_index, etc.
Definition at line 438 of file rtpdec.c.
Referenced by rtp_parse_one_packet(), and rtp_parse_packet_internal().
static int has_next_packet | ( | RTPDemuxContext * | s | ) | [static] |
Definition at line 634 of file rtpdec.c.
Referenced by ff_rtp_parse_packet(), and rtp_parse_queued_packet().
static int rtcp_parse_packet | ( | RTPDemuxContext * | s, | |
const unsigned char * | buf, | |||
int | len | |||
) | [static] |
static void rtp_init_sequence | ( | RTPStatistics * | s, | |
uint16_t | seq | |||
) | [static] |
called whenever there is a large jump in sequence numbers, or when they get out of probation.
..
Definition at line 175 of file rtpdec.c.
Referenced by rtp_valid_packet_in_sequence().
static void rtp_init_statistics | ( | RTPStatistics * | s, | |
uint16_t | base_sequence | |||
) | [static] |
called on parse open packet
Definition at line 165 of file rtpdec.c.
Referenced by ff_rtp_parse_open().
static int rtp_parse_one_packet | ( | RTPDemuxContext * | s, | |
AVPacket * | pkt, | |||
uint8_t ** | bufptr, | |||
int | len | |||
) | [static] |
static int rtp_parse_packet_internal | ( | RTPDemuxContext * | s, | |
AVPacket * | pkt, | |||
const uint8_t * | buf, | |||
int | len | |||
) | [static] |
Definition at line 469 of file rtpdec.c.
Referenced by rtp_parse_one_packet(), and rtp_parse_queued_packet().
static int rtp_parse_queued_packet | ( | RTPDemuxContext * | s, | |
AVPacket * | pkt | |||
) | [static] |
Definition at line 644 of file rtpdec.c.
Referenced by ff_rtp_parse_packet(), and rtp_parse_one_packet().
static int rtp_valid_packet_in_sequence | ( | RTPStatistics * | s, | |
uint16_t | seq | |||
) | [static] |
returns 1 if we should handle this packet.
Definition at line 191 of file rtpdec.c.
Referenced by rtp_parse_packet_internal().
Initial value:
{ .enc_name = "X-MP3-draft-00", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_MP3ADU, }
Initial value:
{ .enc_name = "speex", .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_SPEEX, }