FFmpeg
|
#include <string.h>
#include "config.h"
#include "avio.h"
#include "url.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
Go to the source code of this file.
Macros | |
#define | KEEP(component, also) |
#define | COPY(start, end) |
Functions | |
int | ff_url_join (char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...) |
static const char * | find_delim (const char *delim, const char *cur, const char *end) |
int | ff_url_decompose (URLComponents *uc, const char *url, const char *end) |
Parse an URL to find the components. More... | |
static int | is_fq_dos_path (const char *path) |
static int | append_path (char *root, char *out_end, char **rout, const char *in, const char *in_end) |
int | ff_make_absolute_url2 (char *buf, int size, const char *base, const char *rel, int handle_dos_paths) |
Convert a relative url into an absolute url, given a base url. More... | |
int | ff_make_absolute_url (char *buf, int size, const char *base, const char *rel) |
Convert a relative url into an absolute url, given a base url. More... | |
AVIODirEntry * | ff_alloc_dir_entry (void) |
Allocate directory entry with default values. More... | |
URL utility functions.
Definition in file url.c.
#define KEEP | ( | component, | |
also | |||
) |
#define COPY | ( | start, | |
end | |||
) |
int ff_url_join | ( | char * | str, |
int | size, | ||
const char * | proto, | ||
const char * | authorization, | ||
const char * | hostname, | ||
int | port, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 40 of file url.c.
Referenced by build_udp_url(), ff_rtp_set_remote_url(), ff_rtsp_setup_output_streams(), ff_tls_open_underlying(), ftp_connect_control_connection(), ftp_connect_data_connection(), gopher_open(), http_listen(), http_open_cnx_internal(), icecast_open(), mms_open(), mmsh_open_internal(), prompeg_open(), rtmp_http_open(), rtmp_http_send_cmd(), rtmp_open(), rtmpe_open(), rtp_open(), rtsp_listen(), rtsp_read_setup(), sap_read_header(), sap_write_header(), and srtp_open().
|
static |
Definition at line 84 of file url.c.
Referenced by append_path(), and ff_url_decompose().
int ff_url_decompose | ( | URLComponents * | uc, |
const char * | url, | ||
const char * | end | ||
) |
Parse an URL to find the components.
Each component runs until the start of the next component, possibly including a mandatory delimiter.
uc | structure to fill with pointers to the components. |
url | URL to parse. |
end | end of the URL, or NULL to parse to the end of string. |
Definition at line 91 of file url.c.
Referenced by ff_make_absolute_url2(), ff_match_url_ext(), and test_decompose().
|
static |
Definition at line 154 of file url.c.
Referenced by ff_make_absolute_url2().
|
static |
Definition at line 166 of file url.c.
Referenced by ff_make_absolute_url2().
int ff_make_absolute_url2 | ( | char * | buf, |
int | size, | ||
const char * | base, | ||
const char * | rel, | ||
int | handle_dos_paths | ||
) |
Convert a relative url into an absolute url, given a base url.
buf | the buffer where output absolute url is written |
size | the size of buf |
base | the base url, may be equal to buf. |
rel | the new url, which is interpreted relative to base |
handle_dos_paths | handle DOS paths for file or unspecified protocol |
Definition at line 195 of file url.c.
Referenced by ff_make_absolute_url(), and test().
Convert a relative url into an absolute url, given a base url.
Same as ff_make_absolute_url2 with handle_dos_paths being equal to HAVE_DOS_PATHS config variable.
Definition at line 321 of file url.c.
Referenced by add_file(), get_content_url(), new_init_section(), new_playlist(), open_input(), parse_location(), parse_playlist(), and test().
AVIODirEntry* ff_alloc_dir_entry | ( | void | ) |
Allocate directory entry with default values.
Definition at line 327 of file url.c.
Referenced by ftp_read_dir(), libsmbc_read_dir(), and libssh_read_dir().