Commit c5c6e67c authored by Martin Storsjö's avatar Martin Storsjö

Rename url_split to ff_url_split

Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent da5bcafe
...@@ -2805,7 +2805,7 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url) ...@@ -2805,7 +2805,7 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url)
struct sockaddr_in my_addr; struct sockaddr_in my_addr;
/* find which url is asked */ /* find which url is asked */
url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1; path = path1;
if (*path == '/') if (*path == '/')
path++; path++;
...@@ -2880,7 +2880,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url, ...@@ -2880,7 +2880,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
RTSPActionServerSetup setup; RTSPActionServerSetup setup;
/* find which url is asked */ /* find which url is asked */
url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1; path = path1;
if (*path == '/') if (*path == '/')
path++; path++;
...@@ -3022,7 +3022,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url, ...@@ -3022,7 +3022,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
return NULL; return NULL;
/* find which url is asked */ /* find which url is asked */
url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
path = path1; path = path1;
if (*path == '/') if (*path == '/')
path++; path++;
......
...@@ -1343,7 +1343,7 @@ struct in_addr; ...@@ -1343,7 +1343,7 @@ struct in_addr;
/* Deprecated, use getaddrinfo instead. */ /* Deprecated, use getaddrinfo instead. */
attribute_deprecated int resolve_host(struct in_addr *sin_addr, const char *hostname); attribute_deprecated int resolve_host(struct in_addr *sin_addr, const char *hostname);
void url_split(char *proto, int proto_size, void ff_url_split(char *proto, int proto_size,
char *authorization, int authorization_size, char *authorization, int authorization_size,
char *hostname, int hostname_size, char *hostname, int hostname_size,
int *port_ptr, int *port_ptr,
...@@ -1352,12 +1352,12 @@ void url_split(char *proto, int proto_size, ...@@ -1352,12 +1352,12 @@ void url_split(char *proto, int proto_size,
/** /**
* Assembles a URL string from components. This is the reverse operation * Assembles a URL string from components. This is the reverse operation
* of url_split. * of ff_url_split.
* *
* Note, this requires networking to be initialized, so the caller must * Note, this requires networking to be initialized, so the caller must
* ensure ff_network_init has been called. * ensure ff_network_init has been called.
* *
* @see url_split * @see ff_url_split
* *
* @param str the buffer to fill with the url * @param str the buffer to fill with the url
* @param size the size of the str buffer * @param size the size of the str buffer
......
...@@ -89,7 +89,7 @@ static int gopher_open(URLContext *h, const char *uri, int flags) ...@@ -89,7 +89,7 @@ static int gopher_open(URLContext *h, const char *uri, int flags)
h->priv_data = s; h->priv_data = s;
/* needed in any case to build the host string */ /* needed in any case to build the host string */
url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
path, sizeof(path), uri); path, sizeof(path), uri);
if (port < 0) if (port < 0)
......
...@@ -69,12 +69,12 @@ static int http_open_cnx(URLContext *h) ...@@ -69,12 +69,12 @@ static int http_open_cnx(URLContext *h)
/* fill the dest addr */ /* fill the dest addr */
redo: redo:
/* needed in any case to build the host string */ /* needed in any case to build the host string */
url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
path1, sizeof(path1), s->location); path1, sizeof(path1), s->location);
ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL); ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL);
if (use_proxy) { if (use_proxy) {
url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port,
NULL, 0, proxy_path); NULL, 0, proxy_path);
path = s->location; path = s->location;
} else { } else {
......
...@@ -812,7 +812,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) ...@@ -812,7 +812,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
s->priv_data = rt; s->priv_data = rt;
rt->is_input = !(flags & URL_WRONLY); rt->is_input = !(flags & URL_WRONLY);
url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, ff_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port,
path, sizeof(path), s->filename); path, sizeof(path), s->filename);
if (port < 0) if (port < 0)
......
...@@ -64,7 +64,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri) ...@@ -64,7 +64,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri)
char buf[1024]; char buf[1024];
char path[1024]; char path[1024];
url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port,
path, sizeof(path), uri); path, sizeof(path), uri);
ff_url_join(buf, sizeof(buf), "udp", NULL, hostname, port, "%s", path); ff_url_join(buf, sizeof(buf), "udp", NULL, hostname, port, "%s", path);
...@@ -134,7 +134,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags) ...@@ -134,7 +134,7 @@ static int rtp_open(URLContext *h, const char *uri, int flags)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
h->priv_data = s; h->priv_data = s;
url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port,
path, sizeof(path), uri); path, sizeof(path), uri);
/* extract parameters */ /* extract parameters */
ttl = -1; ttl = -1;
......
...@@ -446,7 +446,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, ...@@ -446,7 +446,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
rtsp_st = st->priv_data; rtsp_st = st->priv_data;
/* XXX: may need to add full url resolution */ /* XXX: may need to add full url resolution */
url_split(proto, sizeof(proto), NULL, 0, NULL, 0, ff_url_split(proto, sizeof(proto), NULL, 0, NULL, 0,
NULL, NULL, 0, p); NULL, NULL, 0, p);
if (proto[0] == '\0') { if (proto[0] == '\0') {
/* relative control URL */ /* relative control URL */
...@@ -1390,7 +1390,7 @@ int ff_rtsp_connect(AVFormatContext *s) ...@@ -1390,7 +1390,7 @@ int ff_rtsp_connect(AVFormatContext *s)
return AVERROR(EIO); return AVERROR(EIO);
redirect: redirect:
/* extract hostname and port */ /* extract hostname and port */
url_split(NULL, 0, auth, sizeof(auth), ff_url_split(NULL, 0, auth, sizeof(auth),
host, sizeof(host), &port, path, sizeof(path), s->filename); host, sizeof(host), &port, path, sizeof(path), s->filename);
if (*auth) { if (*auth) {
int auth_len = strlen(auth), b64_len = ((auth_len + 2) / 3) * 4 + 1; int auth_len = strlen(auth), b64_len = ((auth_len + 2) / 3) * 4 + 1;
......
...@@ -109,7 +109,7 @@ static int sdp_get_address(char *dest_addr, int size, int *ttl, const char *url) ...@@ -109,7 +109,7 @@ static int sdp_get_address(char *dest_addr, int size, int *ttl, const char *url)
const char *p; const char *p;
char proto[32]; char proto[32];
url_split(proto, sizeof(proto), NULL, 0, dest_addr, size, &port, NULL, 0, url); ff_url_split(proto, sizeof(proto), NULL, 0, dest_addr, size, &port, NULL, 0, url);
*ttl = 0; *ttl = 0;
......
...@@ -44,7 +44,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ...@@ -44,7 +44,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
char hostname[1024],proto[1024],path[1024]; char hostname[1024],proto[1024],path[1024];
char portstr[10]; char portstr[10];
url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), ff_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
&port, path, sizeof(path), uri); &port, path, sizeof(path), uri);
if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
return AVERROR(EINVAL); return AVERROR(EINVAL);
......
...@@ -265,7 +265,7 @@ int udp_set_remote_url(URLContext *h, const char *uri) ...@@ -265,7 +265,7 @@ int udp_set_remote_url(URLContext *h, const char *uri)
char hostname[256]; char hostname[256];
int port; int port;
url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
/* set the destination address */ /* set the destination address */
s->dest_addr_len = udp_set_url(&s->dest_addr, hostname, port); s->dest_addr_len = udp_set_url(&s->dest_addr, hostname, port);
...@@ -346,9 +346,9 @@ static int udp_open(URLContext *h, const char *uri, int flags) ...@@ -346,9 +346,9 @@ static int udp_open(URLContext *h, const char *uri, int flags)
} }
/* fill the dest addr */ /* fill the dest addr */
url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri);
/* XXX: fix url_split */ /* XXX: fix ff_url_split */
if (hostname[0] == '\0' || hostname[0] == '?') { if (hostname[0] == '\0' || hostname[0] == '?') {
/* only accepts null hostname if input */ /* only accepts null hostname if input */
if (flags & URL_WRONLY) if (flags & URL_WRONLY)
......
...@@ -3365,7 +3365,7 @@ void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload) ...@@ -3365,7 +3365,7 @@ void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload)
pkt_dump_internal(avcl, NULL, level, pkt, dump_payload); pkt_dump_internal(avcl, NULL, level, pkt, dump_payload);
} }
void url_split(char *proto, int proto_size, void ff_url_split(char *proto, int proto_size,
char *authorization, int authorization_size, char *authorization, int authorization_size,
char *hostname, int hostname_size, char *hostname, int hostname_size,
int *port_ptr, int *port_ptr,
......
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