#include "libavcodec/avcodec.h"
#include "avformat.h"
#include "rtp.h"
Go to the source code of this file.
Data Structures | |
struct | rtp_payload_data |
Structure listing useful vars to parse RTP packet payload. More... | |
struct | rtp_payload_data::rtp_payload_data::AUHeaders |
mpeg 4 AU headers More... | |
struct | RTPStatistics |
struct | RTPDynamicProtocolHandler_s |
struct | RTPDemuxContext |
Defines | |
#define | RTP_MIN_PACKET_LENGTH 12 |
#define | RTP_MAX_PACKET_LENGTH 1500 |
#define | RTP_FLAG_KEY 0x1 |
RTP packet contains a keyframe. | |
#define | RTP_FLAG_MARKER 0x2 |
RTP marker bit was set for this packet. | |
Typedefs | |
typedef struct rtp_payload_data | RTPPayloadData |
Structure listing useful vars to parse RTP packet payload. | |
typedef struct PayloadContext | PayloadContext |
typedef struct RTPDynamicProtocolHandler_s | RTPDynamicProtocolHandler |
typedef struct RTPDemuxContext | RTPDemuxContext |
typedef int(* | DynamicPayloadPacketHandlerProc )(AVFormatContext *ctx, PayloadContext *s, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags) |
Packet parsing for "private" payloads in the RTP specs. | |
Functions | |
RTPDemuxContext * | rtp_parse_open (AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data) |
open a new RTP parse context for stream 'st'. | |
void | rtp_parse_set_dynamic_protocol (RTPDemuxContext *s, PayloadContext *ctx, RTPDynamicProtocolHandler *handler) |
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. | |
void | ff_register_dynamic_payload_handler (RTPDynamicProtocolHandler *handler) |
int | rtsp_next_attr_and_value (const char **p, char *attr, int attr_size, char *value, int value_size) |
from rtsp.c, but used by rtp dynamic protocol handlers. | |
void | av_register_rtp_dynamic_payload_handlers (void) |
Variables | |
RTPDynamicProtocolHandler * | RTPFirstDynamicPayloadHandler |
#define RTP_FLAG_KEY 0x1 |
RTP packet contains a keyframe.
Definition at line 95 of file rtpdec.h.
Referenced by ff_rdt_parse_packet(), and rdt_parse_packet().
#define RTP_FLAG_MARKER 0x2 |
RTP marker bit was set for this packet.
Definition at line 96 of file rtpdec.h.
Referenced by rtp_parse_packet().
#define RTP_MAX_PACKET_LENGTH 1500 |
typedef int(* DynamicPayloadPacketHandlerProc)(AVFormatContext *ctx, PayloadContext *s, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, int flags) |
Packet parsing for "private" payloads in the RTP specs.
ctx | RTSP demuxer context | |
s | stream context | |
st | stream that this packet belongs to | |
pkt | packet in which to write the parsed data | |
timestamp | pointer in which to write the timestamp of this RTP packet | |
buf | pointer to raw RTP packet data | |
len | length of buf | |
flags | flags from the RTP packet header (RTP_FLAG_*) |
typedef struct PayloadContext PayloadContext |
typedef struct RTPDemuxContext RTPDemuxContext |
typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler |
typedef struct rtp_payload_data RTPPayloadData |
Structure listing useful vars to parse RTP packet payload.
void av_register_rtp_dynamic_payload_handlers | ( | void | ) |
void ff_register_dynamic_payload_handler | ( | RTPDynamicProtocolHandler * | handler | ) |
Definition at line 52 of file rtpdec.c.
Referenced by av_register_rdt_dynamic_payload_handlers(), and av_register_rtp_dynamic_payload_handlers().
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 168 of file rtpdec.c.
Referenced by rtsp_read_packet().
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 305 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 293 of file rtpproto.c.
Referenced by make_setup_request(), and rtsp_cmd_setup().
void rtp_parse_close | ( | RTPDemuxContext * | s | ) |
RTPDemuxContext* rtp_parse_open | ( | AVFormatContext * | s1, | |
AVStream * | st, | |||
URLContext * | rtpc, | |||
int | payload_type, | |||
RTPPayloadData * | 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_open_transport_ctx().
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 397 of file rtpdec.c.
Referenced by rtsp_read_packet().
void rtp_parse_set_dynamic_protocol | ( | RTPDemuxContext * | s, | |
PayloadContext * | ctx, | |||
RTPDynamicProtocolHandler * | handler | |||
) |
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 57 of file rtpproto.c.
Referenced by make_setup_request().
int rtsp_next_attr_and_value | ( | const char ** | p, | |
char * | attr, | |||
int | attr_size, | |||
char * | value, | |||
int | value_size | |||
) |
from rtsp.c, but used by rtp dynamic protocol handlers.
from rtsp.c, but used by rtp dynamic protocol handlers.
This is broken out as a function because it is used in rtp_h264.c, which is forthcoming.
Definition at line 254 of file rtsp.c.
Referenced by parse_h264_sdp_line(), and sdp_parse_fmtp().