structure is meant to represent. See "[PATCH] rtsp.[ch]: RTSPHeader -> RTSPServerResponse" and "[PATCH] document rtsp.h" threads on ML. Originally committed as revision 17504 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
@@ -273,10 +273,10 @@ static int http_receive_data(HTTPContext *c); | |||||
static int rtsp_parse_request(HTTPContext *c); | static int rtsp_parse_request(HTTPContext *c); | ||||
static void rtsp_cmd_describe(HTTPContext *c, const char *url); | static void rtsp_cmd_describe(HTTPContext *c, const char *url); | ||||
static void rtsp_cmd_options(HTTPContext *c, const char *url); | static void rtsp_cmd_options(HTTPContext *c, const char *url); | ||||
static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPHeader *h); | |||||
static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPHeader *h); | |||||
static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPHeader *h); | |||||
static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPHeader *h); | |||||
static void rtsp_cmd_setup(HTTPContext *c, const char *url, RTSPMessageHeader *h); | |||||
static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h); | |||||
static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h); | |||||
static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h); | |||||
/* SDP handling */ | /* SDP handling */ | ||||
static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, | static int prepare_sdp_description(FFStream *stream, uint8_t **pbuffer, | ||||
@@ -2628,7 +2628,7 @@ static int rtsp_parse_request(HTTPContext *c) | |||||
char protocol[32]; | char protocol[32]; | ||||
char line[1024]; | char line[1024]; | ||||
int len; | int len; | ||||
RTSPHeader header1, *header = &header1; | |||||
RTSPMessageHeader header1, *header = &header1; | |||||
c->buffer_ptr[0] = '\0'; | c->buffer_ptr[0] = '\0'; | ||||
p = c->buffer; | p = c->buffer; | ||||
@@ -2811,7 +2811,7 @@ static HTTPContext *find_rtp_session(const char *session_id) | |||||
return NULL; | return NULL; | ||||
} | } | ||||
static RTSPTransportField *find_transport(RTSPHeader *h, enum RTSPLowerTransport lower_transport) | |||||
static RTSPTransportField *find_transport(RTSPMessageHeader *h, enum RTSPLowerTransport lower_transport) | |||||
{ | { | ||||
RTSPTransportField *th; | RTSPTransportField *th; | ||||
int i; | int i; | ||||
@@ -2825,7 +2825,7 @@ static RTSPTransportField *find_transport(RTSPHeader *h, enum RTSPLowerTransport | |||||
} | } | ||||
static void rtsp_cmd_setup(HTTPContext *c, const char *url, | static void rtsp_cmd_setup(HTTPContext *c, const char *url, | ||||
RTSPHeader *h) | |||||
RTSPMessageHeader *h) | |||||
{ | { | ||||
FFStream *stream; | FFStream *stream; | ||||
int stream_index, port; | int stream_index, port; | ||||
@@ -2996,7 +2996,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url, | |||||
return NULL; | return NULL; | ||||
} | } | ||||
static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPHeader *h) | |||||
static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPMessageHeader *h) | |||||
{ | { | ||||
HTTPContext *rtp_c; | HTTPContext *rtp_c; | ||||
@@ -3030,7 +3030,7 @@ static void rtsp_cmd_play(HTTPContext *c, const char *url, RTSPHeader *h) | |||||
url_fprintf(c->pb, "\r\n"); | url_fprintf(c->pb, "\r\n"); | ||||
} | } | ||||
static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPHeader *h) | |||||
static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPMessageHeader *h) | |||||
{ | { | ||||
HTTPContext *rtp_c; | HTTPContext *rtp_c; | ||||
@@ -3055,7 +3055,7 @@ static void rtsp_cmd_pause(HTTPContext *c, const char *url, RTSPHeader *h) | |||||
url_fprintf(c->pb, "\r\n"); | url_fprintf(c->pb, "\r\n"); | ||||
} | } | ||||
static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPHeader *h) | |||||
static void rtsp_cmd_teardown(HTTPContext *c, const char *url, RTSPMessageHeader *h) | |||||
{ | { | ||||
HTTPContext *rtp_c; | HTTPContext *rtp_c; | ||||
char session_id[32]; | char session_id[32]; | ||||
@@ -570,7 +570,7 @@ static void rtsp_parse_range(int *min_ptr, int *max_ptr, const char **pp) | |||||
} | } | ||||
/* XXX: only one transport specification is parsed */ | /* XXX: only one transport specification is parsed */ | ||||
static void rtsp_parse_transport(RTSPHeader *reply, const char *p) | |||||
static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) | |||||
{ | { | ||||
char transport_protocol[16]; | char transport_protocol[16]; | ||||
char profile[16]; | char profile[16]; | ||||
@@ -672,7 +672,7 @@ static void rtsp_parse_transport(RTSPHeader *reply, const char *p) | |||||
} | } | ||||
} | } | ||||
void rtsp_parse_line(RTSPHeader *reply, const char *buf) | |||||
void rtsp_parse_line(RTSPMessageHeader *reply, const char *buf) | |||||
{ | { | ||||
const char *p; | const char *p; | ||||
@@ -738,7 +738,7 @@ static void rtsp_skip_packet(AVFormatContext *s) | |||||
} | } | ||||
static void rtsp_send_cmd(AVFormatContext *s, | static void rtsp_send_cmd(AVFormatContext *s, | ||||
const char *cmd, RTSPHeader *reply, | |||||
const char *cmd, RTSPMessageHeader *reply, | |||||
unsigned char **content_ptr) | unsigned char **content_ptr) | ||||
{ | { | ||||
RTSPState *rt = s->priv_data; | RTSPState *rt = s->priv_data; | ||||
@@ -888,7 +888,7 @@ make_setup_request (AVFormatContext *s, const char *host, int port, | |||||
RTSPState *rt = s->priv_data; | RTSPState *rt = s->priv_data; | ||||
int j, i, err, interleave = 0; | int j, i, err, interleave = 0; | ||||
RTSPStream *rtsp_st; | RTSPStream *rtsp_st; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
char cmd[2048]; | char cmd[2048]; | ||||
const char *trans_pref; | const char *trans_pref; | ||||
@@ -1064,7 +1064,7 @@ static int rtsp_read_header(AVFormatContext *s, | |||||
char host[1024], path[1024], tcpname[1024], cmd[2048], *option_list, *option; | char host[1024], path[1024], tcpname[1024], cmd[2048], *option_list, *option; | ||||
URLContext *rtsp_hd; | URLContext *rtsp_hd; | ||||
int port, ret, err; | int port, ret, err; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
unsigned char *content = NULL; | unsigned char *content = NULL; | ||||
int lower_transport_mask = 0; | int lower_transport_mask = 0; | ||||
char real_challenge[64]; | char real_challenge[64]; | ||||
@@ -1313,7 +1313,7 @@ static int rtsp_read_packet(AVFormatContext *s, | |||||
if (rt->server_type == RTSP_SERVER_REAL) { | if (rt->server_type == RTSP_SERVER_REAL) { | ||||
int i; | int i; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
enum AVDiscard cache[MAX_STREAMS]; | enum AVDiscard cache[MAX_STREAMS]; | ||||
char cmd[1024]; | char cmd[1024]; | ||||
@@ -1421,7 +1421,7 @@ static int rtsp_read_packet(AVFormatContext *s, | |||||
static int rtsp_read_play(AVFormatContext *s) | static int rtsp_read_play(AVFormatContext *s) | ||||
{ | { | ||||
RTSPState *rt = s->priv_data; | RTSPState *rt = s->priv_data; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
char cmd[1024]; | char cmd[1024]; | ||||
av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); | av_log(s, AV_LOG_DEBUG, "hello state=%d\n", rt->state); | ||||
@@ -1451,7 +1451,7 @@ static int rtsp_read_play(AVFormatContext *s) | |||||
static int rtsp_read_pause(AVFormatContext *s) | static int rtsp_read_pause(AVFormatContext *s) | ||||
{ | { | ||||
RTSPState *rt = s->priv_data; | RTSPState *rt = s->priv_data; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
char cmd[1024]; | char cmd[1024]; | ||||
rt = s->priv_data; | rt = s->priv_data; | ||||
@@ -1495,7 +1495,7 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index, | |||||
static int rtsp_read_close(AVFormatContext *s) | static int rtsp_read_close(AVFormatContext *s) | ||||
{ | { | ||||
RTSPState *rt = s->priv_data; | RTSPState *rt = s->priv_data; | ||||
RTSPHeader reply1, *reply = &reply1; | |||||
RTSPMessageHeader reply1, *reply = &reply1; | |||||
char cmd[1024]; | char cmd[1024]; | ||||
#if 0 | #if 0 | ||||
@@ -59,7 +59,7 @@ typedef struct RTSPTransportField { | |||||
enum RTSPLowerTransport lower_transport; | enum RTSPLowerTransport lower_transport; | ||||
} RTSPTransportField; | } RTSPTransportField; | ||||
typedef struct RTSPHeader { | |||||
typedef struct RTSPMessageHeader { | |||||
int content_length; | int content_length; | ||||
enum RTSPStatusCode status_code; /**< response code from server */ | enum RTSPStatusCode status_code; /**< response code from server */ | ||||
int nb_transports; | int nb_transports; | ||||
@@ -70,7 +70,7 @@ typedef struct RTSPHeader { | |||||
char session_id[512]; | char session_id[512]; | ||||
char real_challenge[64]; /**< the RealChallenge1 field from the server */ | char real_challenge[64]; /**< the RealChallenge1 field from the server */ | ||||
char server[64]; | char server[64]; | ||||
} RTSPHeader; | |||||
} RTSPMessageHeader; | |||||
enum RTSPClientState { | enum RTSPClientState { | ||||
RTSP_STATE_IDLE, | RTSP_STATE_IDLE, | ||||
@@ -126,7 +126,7 @@ typedef struct RTSPStream { | |||||
} RTSPStream; | } RTSPStream; | ||||
int rtsp_init(void); | int rtsp_init(void); | ||||
void rtsp_parse_line(RTSPHeader *reply, const char *buf); | |||||
void rtsp_parse_line(RTSPMessageHeader *reply, const char *buf); | |||||
#if LIBAVFORMAT_VERSION_INT < (53 << 16) | #if LIBAVFORMAT_VERSION_INT < (53 << 16) | ||||
extern int rtsp_default_protocols; | extern int rtsp_default_protocols; | ||||