Mercurial > libavformat.hg
comparison internal.h @ 5837:d605f589f0be libavformat
move ff_url_split() and ff_url_join() declarations to internal.h
those functions are not part of the public API
author | aurel |
---|---|
date | Sun, 14 Mar 2010 23:59:48 +0000 |
parents | 2997c88028cd |
children | ba41d3865253 |
comparison
equal
deleted
inserted
replaced
5836:2997c88028cd | 5837:d605f589f0be |
---|---|
57 */ | 57 */ |
58 int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt, | 58 int ff_probe_input_buffer(ByteIOContext **pb, AVInputFormat **fmt, |
59 const char *filename, void *logctx, | 59 const char *filename, void *logctx, |
60 unsigned int offset, unsigned int max_probe_size); | 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 #endif /* AVFORMAT_INTERNAL_H */ | 115 #endif /* AVFORMAT_INTERNAL_H */ |