Commit 3307e6ea authored by Ronald S. Bultje's avatar Ronald S. Bultje

Prefix non-static RTSP functions with ff_.

Originally committed as revision 21974 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fc5607f8
...@@ -2693,7 +2693,7 @@ static int rtsp_parse_request(HTTPContext *c) ...@@ -2693,7 +2693,7 @@ static int rtsp_parse_request(HTTPContext *c)
len = sizeof(line) - 1; len = sizeof(line) - 1;
memcpy(line, p, len); memcpy(line, p, len);
line[len] = '\0'; line[len] = '\0';
rtsp_parse_line(header, line); ff_rtsp_parse_line(header, line);
p = p1 + 1; p = p1 + 1;
} }
......
...@@ -388,7 +388,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index, ...@@ -388,7 +388,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
while (*p && *p == ' ') p++; // strip trailing spaces. while (*p && *p == ' ') p++; // strip trailing spaces.
/* loop on each attribute */ /* loop on each attribute */
while (rtsp_next_attr_and_value while (ff_rtsp_next_attr_and_value
(&p, attr, sizeof(attr), value, sizeof(value))) { (&p, attr, sizeof(attr), value, sizeof(value))) {
/* grab the codec extra_data from the config parameter of the fmtp line */ /* grab the codec extra_data from the config parameter of the fmtp line */
sdp_parse_fmtp_config_h264(stream, h264_data, attr, value); sdp_parse_fmtp_config_h264(stream, h264_data, attr, value);
......
...@@ -192,7 +192,7 @@ struct RTPDemuxContext { ...@@ -192,7 +192,7 @@ struct RTPDemuxContext {
extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler; extern RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler;
void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler); 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. int ff_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); void av_register_rtp_dynamic_payload_handlers(void);
......
...@@ -141,7 +141,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index, ...@@ -141,7 +141,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
while (*p && *p != ' ') p++; /* eat protocol identifier */ while (*p && *p != ' ') p++; /* eat protocol identifier */
while (*p && *p == ' ') p++; /* strip trailing spaces */ while (*p && *p == ' ') p++; /* strip trailing spaces */
while (rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value))) { while (ff_rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value))) {
if (!strcmp(attr, "octet-align")) if (!strcmp(attr, "octet-align"))
octet_align = atoi(value); octet_align = atoi(value);
else if (!strcmp(attr, "crc")) else if (!strcmp(attr, "crc"))
......
This diff is collapsed.
...@@ -315,7 +315,7 @@ typedef struct RTSPStream { ...@@ -315,7 +315,7 @@ typedef struct RTSPStream {
//@} //@}
} RTSPStream; } RTSPStream;
void rtsp_parse_line(RTSPMessageHeader *reply, const char *buf); void ff_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;
...@@ -323,9 +323,6 @@ extern int rtsp_default_protocols; ...@@ -323,9 +323,6 @@ extern int rtsp_default_protocols;
extern int rtsp_rtp_port_min; extern int rtsp_rtp_port_min;
extern int rtsp_rtp_port_max; extern int rtsp_rtp_port_max;
int rtsp_pause(AVFormatContext *s);
int rtsp_resume(AVFormatContext *s);
/** /**
* Send a command to the RTSP server without waiting for the reply. * Send a command to the RTSP server without waiting for the reply.
* *
...@@ -335,7 +332,7 @@ int rtsp_resume(AVFormatContext *s); ...@@ -335,7 +332,7 @@ int rtsp_resume(AVFormatContext *s);
* @param send_content_length the length of the send_content data, or 0 if * @param send_content_length the length of the send_content data, or 0 if
* send_content is null * send_content is null
*/ */
void rtsp_send_cmd_with_content_async(AVFormatContext *s, void ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
const char *cmd, const char *cmd,
const unsigned char *send_content, const unsigned char *send_content,
int send_content_length); int send_content_length);
...@@ -344,7 +341,7 @@ void rtsp_send_cmd_with_content_async(AVFormatContext *s, ...@@ -344,7 +341,7 @@ void rtsp_send_cmd_with_content_async(AVFormatContext *s,
* *
* @see rtsp_send_cmd_with_content_async * @see rtsp_send_cmd_with_content_async
*/ */
void rtsp_send_cmd_async(AVFormatContext *s, const char *cmd); void ff_rtsp_send_cmd_async(AVFormatContext *s, const char *cmd);
/** /**
* Send a command to the RTSP server and wait for the reply. * Send a command to the RTSP server and wait for the reply.
...@@ -358,7 +355,7 @@ void rtsp_send_cmd_async(AVFormatContext *s, const char *cmd); ...@@ -358,7 +355,7 @@ void rtsp_send_cmd_async(AVFormatContext *s, const char *cmd);
* @param send_content_length the length of the send_content data, or 0 if * @param send_content_length the length of the send_content data, or 0 if
* send_content is null * send_content is null
*/ */
void rtsp_send_cmd_with_content(AVFormatContext *s, void ff_rtsp_send_cmd_with_content(AVFormatContext *s,
const char *cmd, const char *cmd,
RTSPMessageHeader *reply, RTSPMessageHeader *reply,
unsigned char **content_ptr, unsigned char **content_ptr,
...@@ -370,7 +367,7 @@ void rtsp_send_cmd_with_content(AVFormatContext *s, ...@@ -370,7 +367,7 @@ void rtsp_send_cmd_with_content(AVFormatContext *s,
* *
* @see rtsp_send_cmd_with_content * @see rtsp_send_cmd_with_content
*/ */
void rtsp_send_cmd(AVFormatContext *s, const char *cmd, void ff_rtsp_send_cmd(AVFormatContext *s, const char *cmd,
RTSPMessageHeader *reply, unsigned char **content_ptr); RTSPMessageHeader *reply, unsigned char **content_ptr);
/** /**
...@@ -394,7 +391,7 @@ void rtsp_send_cmd(AVFormatContext *s, const char *cmd, ...@@ -394,7 +391,7 @@ void rtsp_send_cmd(AVFormatContext *s, const char *cmd,
* @returns 1 if a data packets is ready to be received, -1 on error, * @returns 1 if a data packets is ready to be received, -1 on error,
* and 0 on success. * and 0 on success.
*/ */
int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
unsigned char **content_ptr, unsigned char **content_ptr,
int return_on_interleaved_data); int return_on_interleaved_data);
...@@ -407,13 +404,13 @@ int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, ...@@ -407,13 +404,13 @@ int rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
* @returns 0 on success, < 0 on error. Cleans up all allocations done * @returns 0 on success, < 0 on error. Cleans up all allocations done
* within the function on error. * within the function on error.
*/ */
int rtsp_connect(AVFormatContext *s); int ff_rtsp_connect(AVFormatContext *s);
/** /**
* Close and free all streams within the RTSP (de)muxer * Close and free all streams within the RTSP (de)muxer
* *
* @param s RTSP (de)muxer context * @param s RTSP (de)muxer context
*/ */
void rtsp_close_streams(AVFormatContext *s); void ff_rtsp_close_streams(AVFormatContext *s);
#endif /* AVFORMAT_RTSP_H */ #endif /* AVFORMAT_RTSP_H */
...@@ -39,7 +39,7 @@ static int rtsp_write_record(AVFormatContext *s) ...@@ -39,7 +39,7 @@ static int rtsp_write_record(AVFormatContext *s)
"Range: npt=%0.3f-\r\n", "Range: npt=%0.3f-\r\n",
s->filename, s->filename,
(double) 0); (double) 0);
rtsp_send_cmd(s, cmd, reply, NULL); ff_rtsp_send_cmd(s, cmd, reply, NULL);
if (reply->status_code != RTSP_STATUS_OK) if (reply->status_code != RTSP_STATUS_OK)
return -1; return -1;
rt->state = RTSP_STATE_STREAMING; rt->state = RTSP_STATE_STREAMING;
...@@ -51,12 +51,12 @@ static int rtsp_write_header(AVFormatContext *s) ...@@ -51,12 +51,12 @@ static int rtsp_write_header(AVFormatContext *s)
RTSPState *rt = s->priv_data; RTSPState *rt = s->priv_data;
int ret; int ret;
ret = rtsp_connect(s); ret = ff_rtsp_connect(s);
if (ret) if (ret)
return ret; return ret;
if (rtsp_write_record(s) < 0) { if (rtsp_write_record(s) < 0) {
rtsp_close_streams(s); ff_rtsp_close_streams(s);
url_close(rt->rtsp_hd); url_close(rt->rtsp_hd);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
...@@ -83,7 +83,7 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -83,7 +83,7 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
if (FD_ISSET(tcp_fd, &rfds)) { if (FD_ISSET(tcp_fd, &rfds)) {
RTSPMessageHeader reply; RTSPMessageHeader reply;
if (rtsp_read_reply(s, &reply, NULL, 0) < 0) if (ff_rtsp_read_reply(s, &reply, NULL, 0) < 0)
return AVERROR(EPIPE); return AVERROR(EPIPE);
/* XXX: parse message */ /* XXX: parse message */
if (rt->state != RTSP_STATE_STREAMING) if (rt->state != RTSP_STATE_STREAMING)
...@@ -108,9 +108,9 @@ static int rtsp_write_close(AVFormatContext *s) ...@@ -108,9 +108,9 @@ static int rtsp_write_close(AVFormatContext *s)
snprintf(cmd, sizeof(cmd), snprintf(cmd, sizeof(cmd),
"TEARDOWN %s RTSP/1.0\r\n", "TEARDOWN %s RTSP/1.0\r\n",
s->filename); s->filename);
rtsp_send_cmd_async(s, cmd); ff_rtsp_send_cmd_async(s, cmd);
rtsp_close_streams(s); ff_rtsp_close_streams(s);
url_close(rt->rtsp_hd); url_close(rt->rtsp_hd);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment