libavformat/rtpdec.h File Reference

#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

RTPDemuxContextrtp_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

RTPDynamicProtocolHandlerRTPFirstDynamicPayloadHandler


Define Documentation

#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

Definition at line 60 of file rtpdec.h.

Referenced by rtp_parse_mp4_au(), and rtsp_read_packet().

#define RTP_MIN_PACKET_LENGTH   12

Definition at line 59 of file rtpdec.h.


Typedef Documentation

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.

Parameters:
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_*)

Definition at line 109 of file rtpdec.h.

Definition at line 56 of file rtpdec.h.

Definition at line 62 of file rtpdec.h.

Definition at line 57 of file rtpdec.h.

Structure listing useful vars to parse RTP packet payload.


Function Documentation

void av_register_rtp_dynamic_payload_handlers ( void   ) 

Definition at line 58 of file rtpdec.c.

Referenced by av_register_all().

void ff_register_dynamic_payload_handler ( RTPDynamicProtocolHandler handler  ) 

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.

Parameters:
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.

Parameters:
s1 media file context
Returns:
the local port number

Definition at line 293 of file rtpproto.c.

Referenced by make_setup_request(), and rtsp_cmd_setup().

void rtp_parse_close ( RTPDemuxContext s  ) 

Definition at line 545 of file rtpdec.c.

Referenced by rtsp_close_streams().

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.

Parameters:
s RTP parse context.
pkt returned packet
buf input buffer or NULL to read the next packets
len buffer len
Returns:
0 if a packet is returned, 1 if a packet is returned and more can follow (use buf as NULL to read the next). -1 if no packet (error or no more packet).

< 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 
)

Definition at line 315 of file rtpdec.c.

Referenced by rtsp_open_transport_ctx().

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.

Parameters:
s1 media file context
uri of the remote server
Returns:
zero if no error.

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().


Variable Documentation

Definition at line 47 of file rtpdec.c.

Referenced by sdp_parse_rtpmap().


Generated on Fri Oct 26 02:35:46 2012 for FFmpeg by  doxygen 1.5.8