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
| ... | ... |
@@ -2805,7 +2805,7 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url) |
| 2805 | 2805 |
struct sockaddr_in my_addr; |
| 2806 | 2806 |
|
| 2807 | 2807 |
/* find which url is asked */ |
| 2808 |
- url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 2808 |
+ ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 2809 | 2809 |
path = path1; |
| 2810 | 2810 |
if (*path == '/') |
| 2811 | 2811 |
path++; |
| ... | ... |
@@ -2880,7 +2880,7 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url, |
| 2880 | 2880 |
RTSPActionServerSetup setup; |
| 2881 | 2881 |
|
| 2882 | 2882 |
/* find which url is asked */ |
| 2883 |
- url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 2883 |
+ ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 2884 | 2884 |
path = path1; |
| 2885 | 2885 |
if (*path == '/') |
| 2886 | 2886 |
path++; |
| ... | ... |
@@ -3022,7 +3022,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url, |
| 3022 | 3022 |
return NULL; |
| 3023 | 3023 |
|
| 3024 | 3024 |
/* find which url is asked */ |
| 3025 |
- url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 3025 |
+ ff_url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url); |
|
| 3026 | 3026 |
path = path1; |
| 3027 | 3027 |
if (*path == '/') |
| 3028 | 3028 |
path++; |
| ... | ... |
@@ -1343,7 +1343,7 @@ struct in_addr; |
| 1343 | 1343 |
/* Deprecated, use getaddrinfo instead. */ |
| 1344 | 1344 |
attribute_deprecated int resolve_host(struct in_addr *sin_addr, const char *hostname); |
| 1345 | 1345 |
|
| 1346 |
-void url_split(char *proto, int proto_size, |
|
| 1346 |
+void ff_url_split(char *proto, int proto_size, |
|
| 1347 | 1347 |
char *authorization, int authorization_size, |
| 1348 | 1348 |
char *hostname, int hostname_size, |
| 1349 | 1349 |
int *port_ptr, |
| ... | ... |
@@ -1352,12 +1352,12 @@ void url_split(char *proto, int proto_size, |
| 1352 | 1352 |
|
| 1353 | 1353 |
/** |
| 1354 | 1354 |
* Assembles a URL string from components. This is the reverse operation |
| 1355 |
- * of url_split. |
|
| 1355 |
+ * of ff_url_split. |
|
| 1356 | 1356 |
* |
| 1357 | 1357 |
* Note, this requires networking to be initialized, so the caller must |
| 1358 | 1358 |
* ensure ff_network_init has been called. |
| 1359 | 1359 |
* |
| 1360 |
- * @see url_split |
|
| 1360 |
+ * @see ff_url_split |
|
| 1361 | 1361 |
* |
| 1362 | 1362 |
* @param str the buffer to fill with the url |
| 1363 | 1363 |
* @param size the size of the str buffer |
| ... | ... |
@@ -89,7 +89,7 @@ static int gopher_open(URLContext *h, const char *uri, int flags) |
| 89 | 89 |
h->priv_data = s; |
| 90 | 90 |
|
| 91 | 91 |
/* needed in any case to build the host string */ |
| 92 |
- url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 92 |
+ ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 93 | 93 |
path, sizeof(path), uri); |
| 94 | 94 |
|
| 95 | 95 |
if (port < 0) |
| ... | ... |
@@ -69,12 +69,12 @@ static int http_open_cnx(URLContext *h) |
| 69 | 69 |
/* fill the dest addr */ |
| 70 | 70 |
redo: |
| 71 | 71 |
/* needed in any case to build the host string */ |
| 72 |
- url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 72 |
+ ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 73 | 73 |
path1, sizeof(path1), s->location); |
| 74 | 74 |
ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL); |
| 75 | 75 |
|
| 76 | 76 |
if (use_proxy) {
|
| 77 |
- url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 77 |
+ ff_url_split(NULL, 0, auth, sizeof(auth), hostname, sizeof(hostname), &port, |
|
| 78 | 78 |
NULL, 0, proxy_path); |
| 79 | 79 |
path = s->location; |
| 80 | 80 |
} else {
|
| ... | ... |
@@ -812,7 +812,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) |
| 812 | 812 |
s->priv_data = rt; |
| 813 | 813 |
rt->is_input = !(flags & URL_WRONLY); |
| 814 | 814 |
|
| 815 |
- url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, |
|
| 815 |
+ ff_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), &port, |
|
| 816 | 816 |
path, sizeof(path), s->filename); |
| 817 | 817 |
|
| 818 | 818 |
if (port < 0) |
| ... | ... |
@@ -64,7 +64,7 @@ int rtp_set_remote_url(URLContext *h, const char *uri) |
| 64 | 64 |
char buf[1024]; |
| 65 | 65 |
char path[1024]; |
| 66 | 66 |
|
| 67 |
- url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, |
|
| 67 |
+ ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, |
|
| 68 | 68 |
path, sizeof(path), uri); |
| 69 | 69 |
|
| 70 | 70 |
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 | 134 |
return AVERROR(ENOMEM); |
| 135 | 135 |
h->priv_data = s; |
| 136 | 136 |
|
| 137 |
- url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, |
|
| 137 |
+ ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, |
|
| 138 | 138 |
path, sizeof(path), uri); |
| 139 | 139 |
/* extract parameters */ |
| 140 | 140 |
ttl = -1; |
| ... | ... |
@@ -446,7 +446,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, |
| 446 | 446 |
rtsp_st = st->priv_data; |
| 447 | 447 |
|
| 448 | 448 |
/* XXX: may need to add full url resolution */ |
| 449 |
- url_split(proto, sizeof(proto), NULL, 0, NULL, 0, |
|
| 449 |
+ ff_url_split(proto, sizeof(proto), NULL, 0, NULL, 0, |
|
| 450 | 450 |
NULL, NULL, 0, p); |
| 451 | 451 |
if (proto[0] == '\0') {
|
| 452 | 452 |
/* relative control URL */ |
| ... | ... |
@@ -1390,7 +1390,7 @@ int ff_rtsp_connect(AVFormatContext *s) |
| 1390 | 1390 |
return AVERROR(EIO); |
| 1391 | 1391 |
redirect: |
| 1392 | 1392 |
/* extract hostname and port */ |
| 1393 |
- url_split(NULL, 0, auth, sizeof(auth), |
|
| 1393 |
+ ff_url_split(NULL, 0, auth, sizeof(auth), |
|
| 1394 | 1394 |
host, sizeof(host), &port, path, sizeof(path), s->filename); |
| 1395 | 1395 |
if (*auth) {
|
| 1396 | 1396 |
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 | 109 |
const char *p; |
| 110 | 110 |
char proto[32]; |
| 111 | 111 |
|
| 112 |
- url_split(proto, sizeof(proto), NULL, 0, dest_addr, size, &port, NULL, 0, url); |
|
| 112 |
+ ff_url_split(proto, sizeof(proto), NULL, 0, dest_addr, size, &port, NULL, 0, url); |
|
| 113 | 113 |
|
| 114 | 114 |
*ttl = 0; |
| 115 | 115 |
|
| ... | ... |
@@ -44,7 +44,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) |
| 44 | 44 |
char hostname[1024],proto[1024],path[1024]; |
| 45 | 45 |
char portstr[10]; |
| 46 | 46 |
|
| 47 |
- url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), |
|
| 47 |
+ ff_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname), |
|
| 48 | 48 |
&port, path, sizeof(path), uri); |
| 49 | 49 |
if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) |
| 50 | 50 |
return AVERROR(EINVAL); |
| ... | ... |
@@ -265,7 +265,7 @@ int udp_set_remote_url(URLContext *h, const char *uri) |
| 265 | 265 |
char hostname[256]; |
| 266 | 266 |
int port; |
| 267 | 267 |
|
| 268 |
- url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); |
|
| 268 |
+ ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); |
|
| 269 | 269 |
|
| 270 | 270 |
/* set the destination address */ |
| 271 | 271 |
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 | 346 |
} |
| 347 | 347 |
|
| 348 | 348 |
/* fill the dest addr */ |
| 349 |
- url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); |
|
| 349 |
+ ff_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &port, NULL, 0, uri); |
|
| 350 | 350 |
|
| 351 |
- /* XXX: fix url_split */ |
|
| 351 |
+ /* XXX: fix ff_url_split */ |
|
| 352 | 352 |
if (hostname[0] == '\0' || hostname[0] == '?') {
|
| 353 | 353 |
/* only accepts null hostname if input */ |
| 354 | 354 |
if (flags & URL_WRONLY) |
| ... | ... |
@@ -3365,7 +3365,7 @@ void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, int dump_payload) |
| 3365 | 3365 |
pkt_dump_internal(avcl, NULL, level, pkt, dump_payload); |
| 3366 | 3366 |
} |
| 3367 | 3367 |
|
| 3368 |
-void url_split(char *proto, int proto_size, |
|
| 3368 |
+void ff_url_split(char *proto, int proto_size, |
|
| 3369 | 3369 |
char *authorization, int authorization_size, |
| 3370 | 3370 |
char *hostname, int hostname_size, |
| 3371 | 3371 |
int *port_ptr, |