rtsp.c File Reference

Go to the source code of this file.

Classes

struct  RTSPState
struct  RTSPStream
struct  attrname_map
struct  SDPParseState

Typedefs

typedef struct attrname_map attrname_map_t

Enumerations

enum  RTSPClientState { RTSP_STATE_IDLE, RTSP_STATE_PLAYING, RTSP_STATE_PAUSED }

Functions

static int rtsp_read_play (AVFormatContext *s)
static int rtsp_probe (AVProbeData *p)
static int redir_isspace (int c)
static void skip_spaces (const char **pp)
static void get_word_sep (char *buf, int buf_size, const char *sep, const char **pp)
static void get_word (char *buf, int buf_size, const char **pp)
static int sdp_parse_rtpmap (AVCodecContext *codec, RTSPStream *rtsp_st, int payload_type, const char *p)
static int hex_to_data (uint8_t *data, const char *p)
static void sdp_parse_fmtp_config (AVCodecContext *codec, char *attr, char *value)
int rtsp_next_attr_and_value (const char **p, char *attr, int attr_size, char *value, int value_size)
 parse the attribute line from the fmtp a line of an sdp resonse.
static void sdp_parse_fmtp (AVStream *st, const char *p)
static void rtsp_parse_range_npt (const char *p, int64_t *start, int64_t *end)
 Parse a string in the form of Range:npt=xx-xx, and determine the start and end time.
static void sdp_parse_line (AVFormatContext *s, SDPParseState *s1, int letter, const char *buf)
static int sdp_parse (AVFormatContext *s, const char *content)
static void rtsp_parse_range (int *min_ptr, int *max_ptr, const char **pp)
static void rtsp_parse_transport (RTSPHeader *reply, const char *p)
void rtsp_parse_line (RTSPHeader *reply, const char *buf)
static int url_readbuf (URLContext *h, unsigned char *buf, int size)
static void rtsp_skip_packet (AVFormatContext *s)
static void rtsp_send_cmd (AVFormatContext *s, const char *cmd, RTSPHeader *reply, unsigned char **content_ptr)
static void rtsp_close_streams (RTSPState *rt)
static int rtsp_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int tcp_read_packet (AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size)
static int udp_read_packet (AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size)
static int rtsp_read_packet (AVFormatContext *s, AVPacket *pkt)
static int rtsp_read_pause (AVFormatContext *s)
static int rtsp_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
static int rtsp_read_close (AVFormatContext *s)
static int sdp_probe (AVProbeData *p1)
static int sdp_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int sdp_read_packet (AVFormatContext *s, AVPacket *pkt)
static int sdp_read_close (AVFormatContext *s)
static int redir_probe (AVProbeData *pd)
int redir_open (AVFormatContext **ic_ptr, ByteIOContext *f)

Variables

int rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_UDP)
static attrname_map_t attr_names []
AVInputFormat rtsp_demuxer
AVInputFormat sdp_demuxer
AVInputFormat redir_demuxer


Typedef Documentation

typedef struct attrname_map attrname_map_t


Enumeration Type Documentation

Enumerator:
RTSP_STATE_IDLE 
RTSP_STATE_PLAYING 
RTSP_STATE_PAUSED 

Definition at line 34 of file rtsp.c.


Function Documentation

static int rtsp_read_play ( AVFormatContext s  )  [static]

Definition at line 1210 of file rtsp.c.

Referenced by rtsp_read_header(), and rtsp_read_seek().

static int rtsp_probe ( AVProbeData p  )  [static]

Definition at line 82 of file rtsp.c.

static int redir_isspace ( int  c  )  [static]

Definition at line 89 of file rtsp.c.

Referenced by get_word(), redir_open(), redir_probe(), and skip_spaces().

static void skip_spaces ( const char **  pp  )  [static]

static void get_word_sep ( char *  buf,
int  buf_size,
const char *  sep,
const char **  pp 
) [static]

static void get_word ( char *  buf,
int  buf_size,
const char **  pp 
) [static]

Definition at line 124 of file rtsp.c.

Referenced by rtsp_send_cmd(), and sdp_parse_line().

static int sdp_parse_rtpmap ( AVCodecContext codec,
RTSPStream rtsp_st,
int  payload_type,
const char *  p 
) [static]

Definition at line 144 of file rtsp.c.

Referenced by sdp_parse_line().

static int hex_to_data ( uint8_t *  data,
const char *  p 
) [static]

Definition at line 212 of file rtsp.c.

Referenced by sdp_parse_fmtp_config().

static void sdp_parse_fmtp_config ( AVCodecContext codec,
char *  attr,
char *  value 
) [static]

Definition at line 240 of file rtsp.c.

Referenced by sdp_parse_fmtp().

int rtsp_next_attr_and_value ( const char **  p,
char *  attr,
int  attr_size,
char *  value,
int  value_size 
)

parse the attribute line from the fmtp a line of an sdp resonse.

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 285 of file rtsp.c.

Referenced by parse_h264_sdp_line(), and sdp_parse_fmtp().

static void sdp_parse_fmtp ( AVStream st,
const char *  p 
) [static]

Definition at line 302 of file rtsp.c.

Referenced by sdp_parse_line().

static void rtsp_parse_range_npt ( const char *  p,
int64_t start,
int64_t end 
) [static]

Parse a string in the form of Range:npt=xx-xx, and determine the start and end time.

Used for seeking in the rtp stream.

Definition at line 333 of file rtsp.c.

Referenced by rtsp_parse_line(), and sdp_parse_line().

static void sdp_parse_line ( AVFormatContext s,
SDPParseState s1,
int  letter,
const char *  buf 
) [static]

Definition at line 361 of file rtsp.c.

Referenced by sdp_parse().

static int sdp_parse ( AVFormatContext s,
const char *  content 
) [static]

Definition at line 528 of file rtsp.c.

Referenced by rtsp_read_header(), and sdp_read_header().

static void rtsp_parse_range ( int *  min_ptr,
int *  max_ptr,
const char **  pp 
) [static]

Definition at line 564 of file rtsp.c.

Referenced by rtsp_parse_transport().

static void rtsp_parse_transport ( RTSPHeader reply,
const char *  p 
) [static]

Definition at line 585 of file rtsp.c.

Referenced by rtsp_parse_line().

void rtsp_parse_line ( RTSPHeader reply,
const char *  buf 
)

Definition at line 677 of file rtsp.c.

Referenced by rtsp_send_cmd().

static int url_readbuf ( URLContext h,
unsigned char *  buf,
int  size 
) [static]

Definition at line 696 of file rtsp.c.

Referenced by rtsp_send_cmd(), rtsp_skip_packet(), and tcp_read_packet().

static void rtsp_skip_packet ( AVFormatContext s  )  [static]

Definition at line 711 of file rtsp.c.

Referenced by rtsp_send_cmd().

static void rtsp_send_cmd ( AVFormatContext s,
const char *  cmd,
RTSPHeader reply,
unsigned char **  content_ptr 
) [static]

Definition at line 736 of file rtsp.c.

Referenced by rtsp_read_close(), rtsp_read_header(), rtsp_read_pause(), and rtsp_read_play().

static void rtsp_close_streams ( RTSPState rt  )  [static]

Definition at line 820 of file rtsp.c.

Referenced by rtsp_read_close(), rtsp_read_header(), sdp_read_close(), and sdp_read_header().

static int rtsp_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 840 of file rtsp.c.

static int tcp_read_packet ( AVFormatContext s,
RTSPStream **  prtsp_st,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 1073 of file rtsp.c.

Referenced by rtsp_read_packet().

static int udp_read_packet ( AVFormatContext s,
RTSPStream **  prtsp_st,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 1122 of file rtsp.c.

Referenced by rtsp_read_packet().

static int rtsp_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 1163 of file rtsp.c.

Referenced by sdp_read_packet().

static int rtsp_read_pause ( AVFormatContext s  )  [static]

Definition at line 1239 of file rtsp.c.

static int rtsp_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
) [static]

Definition at line 1262 of file rtsp.c.

static int rtsp_read_close ( AVFormatContext s  )  [static]

Definition at line 1283 of file rtsp.c.

static int sdp_probe ( AVProbeData p1  )  [static]

Definition at line 1321 of file rtsp.c.

static int sdp_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 1341 of file rtsp.c.

static int sdp_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 1399 of file rtsp.c.

static int sdp_read_close ( AVFormatContext s  )  [static]

Definition at line 1405 of file rtsp.c.

static int redir_probe ( AVProbeData pd  )  [static]

Definition at line 1426 of file rtsp.c.

int redir_open ( AVFormatContext **  ic_ptr,
ByteIOContext f 
)

Definition at line 1439 of file rtsp.c.

Referenced by av_open_input_file().


Variable Documentation

int rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_UDP)

Definition at line 80 of file rtsp.c.

Referenced by rtsp_read_header().

Initial value:

{
    {"SizeLength",       ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, sizelength)},
    {"IndexLength",      ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, indexlength)},
    {"IndexDeltaLength", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, indexdeltalength)},
    {"profile-level-id", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, profile_level_id)},
    {"StreamType",       ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, streamtype)},
    {"mode",             ATTR_NAME_TYPE_STR, offsetof(rtp_payload_data_t, mode)},
    {NULL, -1, -1},
}

Definition at line 271 of file rtsp.c.

Initial value:

 {
    "rtsp",
    "RTSP input format",
    sizeof(RTSPState),
    rtsp_probe,
    rtsp_read_header,
    rtsp_read_packet,
    rtsp_read_close,
    rtsp_read_seek,
    .flags = AVFMT_NOFILE,
    .read_play = rtsp_read_play,
    .read_pause = rtsp_read_pause,
}

Definition at line 1306 of file rtsp.c.

Initial value:

Definition at line 1413 of file rtsp.c.

Initial value:

 {
    "redir",
    "Redirector format",
    0,
    redir_probe,
    NULL,
    NULL,
    NULL,
}

Definition at line 1478 of file rtsp.c.


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