#include "avcodec.h"
#include "avformat.h"
Go to the source code of this file.
Data Structures | |
struct | rtp_payload_data_s |
Structure listing useful vars to parse RTP packet payload. More... | |
struct | rtp_payload_data_s::AUHeaders |
mpeg 4 AU headers More... | |
Defines | |
#define | RTP_MIN_PACKET_LENGTH 12 |
#define | RTP_MAX_PACKET_LENGTH 1500 |
#define | RTP_PT_PRIVATE 96 |
#define | RTP_VERSION 2 |
#define | RTP_MAX_SDES 256 |
maximum text length for SDES | |
#define | RTCP_TX_RATIO_NUM 5 |
#define | RTCP_TX_RATIO_DEN 1000 |
Typedefs | |
typedef struct RTPDemuxContext | RTPDemuxContext |
typedef struct rtp_payload_data_s | rtp_payload_data_s |
typedef struct rtp_payload_data_s | rtp_payload_data_t |
Structure listing useful vars to parse RTP packet payload. | |
Functions | |
int | rtp_get_codec_info (AVCodecContext *codec, int payload_type) |
int | rtp_get_payload_type (AVCodecContext *codec) |
return < 0 if unknown payload type | |
RTPDemuxContext * | rtp_parse_open (AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, rtp_payload_data_s *rtp_payload_data) |
open a new RTP parse context for stream 'st'. | |
int | rtp_parse_packet (RTPDemuxContext *s, AVPacket *pkt, const uint8_t *buf, int len) |
Parse an RTP or RTCP packet directly sent as a buffer. | |
void | rtp_parse_close (RTPDemuxContext *s) |
int | rtp_get_local_port (URLContext *h) |
Return the local port used by the RTP connection. | |
int | rtp_set_remote_url (URLContext *h, const char *uri) |
If no filename is given to av_open_input_file because you want to get the local port first, then you must call this function to set the remote server address. | |
void | rtp_get_file_handles (URLContext *h, int *prtp_fd, int *prtcp_fd) |
Return the rtp and rtcp file handles for select() usage to wait for several RTP streams at the same time. | |
int | rtp_check_and_send_back_rr (RTPDemuxContext *s, int count) |
some rtp servers assume client is dead if they don't hear from them. |
#define RTCP_TX_RATIO_DEN 1000 |
Definition at line 59 of file rtp.h.
Referenced by rtp_check_and_send_back_rr(), and rtp_write_packet().
#define RTCP_TX_RATIO_NUM 5 |
Definition at line 58 of file rtp.h.
Referenced by rtp_check_and_send_back_rr(), and rtp_write_packet().
#define RTP_MAX_PACKET_LENGTH 1500 |
#define RTP_PT_PRIVATE 96 |
Definition at line 53 of file rtp.h.
Referenced by rtp_write_header(), sdp_parse_line(), and sdp_parse_rtpmap().
#define RTP_VERSION 2 |
Definition at line 54 of file rtp.h.
Referenced by ff_rtp_send_data(), rtcp_send_sr(), rtp_check_and_send_back_rr(), and rtp_parse_packet().
typedef struct rtp_payload_data_s rtp_payload_data_s |
typedef struct rtp_payload_data_s rtp_payload_data_t |
Structure listing useful vars to parse RTP packet payload.
typedef struct RTPDemuxContext RTPDemuxContext |
int rtp_check_and_send_back_rr | ( | RTPDemuxContext * | s, | |
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 ByteIO context (we don't have access to the rtcp handle from here)
Definition at line 164 of file rtpdec.c.
Referenced by rtsp_read_packet().
int rtp_get_codec_info | ( | AVCodecContext * | codec, | |
int | payload_type | |||
) |
void rtp_get_file_handles | ( | URLContext * | h, | |
int * | prtp_fd, | |||
int * | prtcp_fd | |||
) |
Return the rtp and rtcp file handles for select() usage to wait for several RTP streams at the same time.
h | media file context |
Definition at line 285 of file rtpproto.c.
Referenced by udp_read_packet().
int rtp_get_local_port | ( | URLContext * | h | ) |
Return the local port used by the RTP connection.
s1 | media file context |
Definition at line 274 of file rtpproto.c.
Referenced by rtsp_cmd_setup(), and rtsp_read_header().
int rtp_get_payload_type | ( | AVCodecContext * | codec | ) |
return < 0 if unknown payload type
Definition at line 193 of file rtp.c.
Referenced by rtp_write_header().
void rtp_parse_close | ( | RTPDemuxContext * | s | ) |
RTPDemuxContext* rtp_parse_open | ( | AVFormatContext * | s1, | |
AVStream * | st, | |||
URLContext * | rtpc, | |||
int | payload_type, | |||
rtp_payload_data_t * | rtp_payload_data | |||
) |
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 CODEC_ID_MPEG2TS packets are returned) TODO: change this to not take rtp_payload data, and use the new dynamic payload system.
Definition at line 270 of file rtpdec.c.
Referenced by rtsp_read_header(), and sdp_read_header().
int rtp_parse_packet | ( | RTPDemuxContext * | s, | |
AVPacket * | pkt, | |||
const uint8_t * | buf, | |||
int | len | |||
) |
Parse an RTP or RTCP packet directly sent as a buffer.
s | RTP parse context. | |
pkt | returned packet | |
buf | input buffer or NULL to read the next packets | |
len | buffer len |
< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
Definition at line 401 of file rtpdec.c.
Referenced by rtsp_read_packet().
int rtp_set_remote_url | ( | URLContext * | h, | |
const char * | uri | |||
) |
If no filename is given to av_open_input_file because you want to get the local port first, then you must call this function to set the remote server address.
s1 | media file context | |
uri | of the remote server |
Definition at line 47 of file rtpproto.c.
Referenced by rtsp_read_header().