Originally committed as revision 22534 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -1340,59 +1340,6 @@ const char *small_strptime(const char *p, const char *fmt, |
| 1340 | 1340 |
struct tm *dt); |
| 1341 | 1341 |
|
| 1342 | 1342 |
/** |
| 1343 |
- * Splits a URL string into components. To reassemble components back into |
|
| 1344 |
- * a URL, use ff_url_join instead of using snprintf directly. |
|
| 1345 |
- * |
|
| 1346 |
- * The pointers to buffers for storing individual components may be null, |
|
| 1347 |
- * in order to ignore that component. Buffers for components not found are |
|
| 1348 |
- * set to empty strings. If the port isn't found, it is set to a negative |
|
| 1349 |
- * value. |
|
| 1350 |
- * |
|
| 1351 |
- * @see ff_url_join |
|
| 1352 |
- * |
|
| 1353 |
- * @param proto the buffer for the protocol |
|
| 1354 |
- * @param proto_size the size of the proto buffer |
|
| 1355 |
- * @param authorization the buffer for the authorization |
|
| 1356 |
- * @param authorization_size the size of the authorization buffer |
|
| 1357 |
- * @param hostname the buffer for the host name |
|
| 1358 |
- * @param hostname_size the size of the hostname buffer |
|
| 1359 |
- * @param port_ptr a pointer to store the port number in |
|
| 1360 |
- * @param path the buffer for the path |
|
| 1361 |
- * @param path_size the size of the path buffer |
|
| 1362 |
- * @param url the URL to split |
|
| 1363 |
- */ |
|
| 1364 |
-void ff_url_split(char *proto, int proto_size, |
|
| 1365 |
- char *authorization, int authorization_size, |
|
| 1366 |
- char *hostname, int hostname_size, |
|
| 1367 |
- int *port_ptr, |
|
| 1368 |
- char *path, int path_size, |
|
| 1369 |
- const char *url); |
|
| 1370 |
- |
|
| 1371 |
-/** |
|
| 1372 |
- * Assembles a URL string from components. This is the reverse operation |
|
| 1373 |
- * of ff_url_split. |
|
| 1374 |
- * |
|
| 1375 |
- * Note, this requires networking to be initialized, so the caller must |
|
| 1376 |
- * ensure ff_network_init has been called. |
|
| 1377 |
- * |
|
| 1378 |
- * @see ff_url_split |
|
| 1379 |
- * |
|
| 1380 |
- * @param str the buffer to fill with the url |
|
| 1381 |
- * @param size the size of the str buffer |
|
| 1382 |
- * @param proto the protocol identifier, if null, the separator |
|
| 1383 |
- * after the identifier is left out, too |
|
| 1384 |
- * @param authorization an optional authorization string, may be null |
|
| 1385 |
- * @param hostname the host name string |
|
| 1386 |
- * @param port the port number, left out from the string if negative |
|
| 1387 |
- * @param fmt a generic format string for everything to add after the |
|
| 1388 |
- * host/port, may be null |
|
| 1389 |
- * @return the number of characters written to the destination buffer |
|
| 1390 |
- */ |
|
| 1391 |
-int ff_url_join(char *str, int size, const char *proto, |
|
| 1392 |
- const char *authorization, const char *hostname, |
|
| 1393 |
- int port, const char *fmt, ...); |
|
| 1394 |
- |
|
| 1395 |
-/** |
|
| 1396 | 1343 |
* Returns a positive value if the given filename has one of the given |
| 1397 | 1344 |
* extensions, 0 otherwise. |
| 1398 | 1345 |
* |
| ... | ... |
@@ -59,4 +59,57 @@ int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt, |
| 59 | 59 |
const char *filename, void *logctx, |
| 60 | 60 |
unsigned int offset, unsigned int max_probe_size); |
| 61 | 61 |
|
| 62 |
+/** |
|
| 63 |
+ * Splits a URL string into components. To reassemble components back into |
|
| 64 |
+ * a URL, use ff_url_join instead of using snprintf directly. |
|
| 65 |
+ * |
|
| 66 |
+ * The pointers to buffers for storing individual components may be null, |
|
| 67 |
+ * in order to ignore that component. Buffers for components not found are |
|
| 68 |
+ * set to empty strings. If the port isn't found, it is set to a negative |
|
| 69 |
+ * value. |
|
| 70 |
+ * |
|
| 71 |
+ * @see ff_url_join |
|
| 72 |
+ * |
|
| 73 |
+ * @param proto the buffer for the protocol |
|
| 74 |
+ * @param proto_size the size of the proto buffer |
|
| 75 |
+ * @param authorization the buffer for the authorization |
|
| 76 |
+ * @param authorization_size the size of the authorization buffer |
|
| 77 |
+ * @param hostname the buffer for the host name |
|
| 78 |
+ * @param hostname_size the size of the hostname buffer |
|
| 79 |
+ * @param port_ptr a pointer to store the port number in |
|
| 80 |
+ * @param path the buffer for the path |
|
| 81 |
+ * @param path_size the size of the path buffer |
|
| 82 |
+ * @param url the URL to split |
|
| 83 |
+ */ |
|
| 84 |
+void ff_url_split(char *proto, int proto_size, |
|
| 85 |
+ char *authorization, int authorization_size, |
|
| 86 |
+ char *hostname, int hostname_size, |
|
| 87 |
+ int *port_ptr, |
|
| 88 |
+ char *path, int path_size, |
|
| 89 |
+ const char *url); |
|
| 90 |
+ |
|
| 91 |
+/** |
|
| 92 |
+ * Assembles a URL string from components. This is the reverse operation |
|
| 93 |
+ * of ff_url_split. |
|
| 94 |
+ * |
|
| 95 |
+ * Note, this requires networking to be initialized, so the caller must |
|
| 96 |
+ * ensure ff_network_init has been called. |
|
| 97 |
+ * |
|
| 98 |
+ * @see ff_url_split |
|
| 99 |
+ * |
|
| 100 |
+ * @param str the buffer to fill with the url |
|
| 101 |
+ * @param size the size of the str buffer |
|
| 102 |
+ * @param proto the protocol identifier, if null, the separator |
|
| 103 |
+ * after the identifier is left out, too |
|
| 104 |
+ * @param authorization an optional authorization string, may be null |
|
| 105 |
+ * @param hostname the host name string |
|
| 106 |
+ * @param port the port number, left out from the string if negative |
|
| 107 |
+ * @param fmt a generic format string for everything to add after the |
|
| 108 |
+ * host/port, may be null |
|
| 109 |
+ * @return the number of characters written to the destination buffer |
|
| 110 |
+ */ |
|
| 111 |
+int ff_url_join(char *str, int size, const char *proto, |
|
| 112 |
+ const char *authorization, const char *hostname, |
|
| 113 |
+ int port, const char *fmt, ...); |
|
| 114 |
+ |
|
| 62 | 115 |
#endif /* AVFORMAT_INTERNAL_H */ |