rtp.h File Reference

Go to the source code of this file.

Classes

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...
struct  AVRtpPayloadType_s

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
typedef struct AVRtpPayloadType_s AVRtpPayloadType_t

Enumerations

enum  rtcp_type_t {
  RTCP_SR = 200, RTCP_RR = 201, RTCP_SDES = 202, RTCP_BYE = 203,
  RTCP_APP = 204
}
enum  rtcp_sdes_type_t {
  RTCP_SDES_END = 0, RTCP_SDES_CNAME = 1, RTCP_SDES_NAME = 2, RTCP_SDES_EMAIL = 3,
  RTCP_SDES_PHONE = 4, RTCP_SDES_LOC = 5, RTCP_SDES_TOOL = 6, RTCP_SDES_NOTE = 7,
  RTCP_SDES_PRIV = 8, RTCP_SDES_IMG = 9, RTCP_SDES_DOOR = 10, RTCP_SDES_SOURCE = 11
}

Functions

int rtp_get_codec_info (AVCodecContext *codec, int payload_type)
int rtp_get_payload_type (AVCodecContext *codec)
 return < 0 if unknown payload type
RTPDemuxContextrtp_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.

Variables

AVRtpPayloadType_t AVRtpPayloadTypes []


Typedef Documentation

Definition at line 35 of file mythtv/libs/libavformat/rtp.h.

Definition at line 36 of file mythtv/libs/libavformat/rtp.h.


Enumeration Type Documentation

Enumerator:
RTCP_SR 
RTCP_RR 
RTCP_SDES 
RTCP_BYE 
RTCP_APP 

Definition at line 99 of file mythtv/libs/libavformat/rtp.h.

Enumerator:
RTCP_SDES_END 
RTCP_SDES_CNAME 
RTCP_SDES_NAME 
RTCP_SDES_EMAIL 
RTCP_SDES_PHONE 
RTCP_SDES_LOC 
RTCP_SDES_TOOL 
RTCP_SDES_NOTE 
RTCP_SDES_PRIV 
RTCP_SDES_IMG 
RTCP_SDES_DOOR 
RTCP_SDES_SOURCE 

Definition at line 107 of file mythtv/libs/libavformat/rtp.h.


Function Documentation

int rtp_get_codec_info ( AVCodecContext codec,
int  payload_type 
)

Definition at line 200 of file rtp.c.

Referenced by sdp_parse_line().

int rtp_get_payload_type ( AVCodecContext codec  ) 

return < 0 if unknown payload type

Definition at line 219 of file rtp.c.

Referenced by rtp_write_header(), and sdp_write_media().

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 467 of file rtp.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.

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

Definition at line 598 of file rtp.c.

Referenced by rtsp_read_packet().

void rtp_parse_close ( RTPDemuxContext s  ) 

Definition at line 744 of file rtp.c.

Referenced by rtsp_close_streams().

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 273 of file rtpproto.c.

Referenced by rtsp_read_header().

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 46 of file rtpproto.c.

Referenced by rtsp_read_header().

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 284 of file rtpproto.c.

Referenced by udp_read_packet().

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 361 of file rtp.c.

Referenced by rtsp_read_packet().


Variable Documentation

Definition at line 47 of file rtp.c.


Generated on Sat Dec 18 05:15:55 2010 for MythTV by  doxygen 1.5.5