Go to the documentation of this file.
   39                 const char *authorization, 
const char *hostname,
 
   40                 int port, 
const char *fmt, ...)
 
   49     if (authorization && authorization[0])
 
   51 #if CONFIG_NETWORK && defined(AF_INET6) 
   56         if (ai->ai_family == AF_INET6) {
 
   82 static const char *
find_delim(
const char *delim, 
const char *cur, 
const char *end)
 
   84     while (cur < end && !strchr(delim, *cur))
 
   91     const char *cur, *aend, *p;
 
   95         end = url + strlen(url);
 
  106     if (end - cur >= 2 && cur[0] == 
'/' && cur[1] == 
'/') {
 
  122             if (p + 1 < aend && p[1] != 
':')
 
  154     if ((path[0] >= 
'a' && path[0] <= 
'z' || path[0] >= 
'A' && path[0] <= 
'Z') &&
 
  156         (path[2] == 
'/' || path[2] == 
'\\'))
 
  158     if ((path[0] == 
'/' || path[0] == 
'\\') &&
 
  159         (path[1] == 
'/' || path[1] == 
'\\'))
 
  165                        const char *in, 
const char *in_end)
 
  168     const char *
d, *next;
 
  170     if (in < in_end && *in == 
'/')
 
  172     while (in < in_end) {
 
  174         next = 
d + (
d < in_end && *
d == 
'/');
 
  175         if (
d - in == 1 && in[0] == 
'.') {
 
  177         } 
else if (
d - in == 2 && in[0] == 
'.' && in[1] == 
'.') {
 
  180                 while (
out > root && (--
out)[-1] != 
'/');
 
  182             if (out_end - 
out < next - in)
 
  184             memmove(
out, in, next - in);
 
  194                           const char *rel, 
int handle_dos_paths)
 
  197     char *
out, *out_end, *path;
 
  198     const char *keep, *base_path_end;
 
  199     int use_base_path, simplify_path = 0, 
ret;
 
  200     const char *base_separators = 
"/";
 
  223     out_end = buf + 
size - 1;
 
  227     if (handle_dos_paths) {
 
  231             base_separators = 
"/\\";
 
  241 #define KEEP(component, also) do { \ 
  242         if (uc.url_component_end_##component == uc.url && \ 
  243             ub.url_component_end_##component > keep) { \ 
  244             keep = ub.url_component_end_##component; \ 
  249     KEEP(authority_full, simplify_path = 1;);
 
  254 #define COPY(start, end) do { \ 
  255         size_t len = end - start; \ 
  256         if (len > out_end - out) { \ 
  257             ret = AVERROR(ENOMEM);  \ 
  260         memmove(out, start, len); \ 
  272         base_path_end = 
ub.url_component_end_path;
 
  274             while (base_path_end > 
ub.path && !strchr(base_separators, base_path_end[-1]))
 
  288         const char *root = 
"/";
 
  289         COPY(root, root + 1);
 
  303             COPY(
ub.path, base_path_end);
 
  304         COPY(uc.
path, uc.url_component_end_path);
 
  307     COPY(uc.url_component_end_path, uc.
end);
 
  315              ret == 
AVERROR(EINVAL) ? 
"syntax_error" : 
"");
 
  
static void error(const char *err)
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.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
const char * url
whole URL, for reference
static const char * find_delim(const char *delim, const char *cur, const char *end)
int type
Type of the entry.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define URL_COMPONENT_HAVE(uc, component)
const char * fragment
including initial '#' if present
int64_t access_timestamp
Time of last access in microseconds since unix epoch, -1 if unknown.
int64_t modification_timestamp
Time of last modification in microseconds since unix epoch, -1 if unknown.
int ff_url_join(char *str, int size, const char *proto, const char *authorization, const char *hostname, int port, const char *fmt,...)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
const char * query
including initial '?' if present
static int append_path(char *root, char *out_end, char **rout, const char *in, const char *in_end)
int64_t size
File size in bytes, -1 if unknown.
const char * authority
"//" if it is a real URL
int64_t group_id
Group ID of owner, -1 if unknown.
int64_t filemode
Unix file mode, -1 if unknown.
Describes single entry of the directory.
int64_t status_change_timestamp
Time of last status change in microseconds since unix epoch, -1 if unknown.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define KEEP(component, also)
int64_t user_id
User ID of owner, -1 if unknown.
AVIODirEntry * ff_alloc_dir_entry(void)
Allocate directory entry with default values.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * port
including initial ':' if present
const char * userinfo
including final '@' if present
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes,...
const char * scheme
possibly including lavf-specific options
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.
static int is_fq_dos_path(const char *path)
int ff_url_decompose(URLComponents *uc, const char *url, const char *end)
Parse an URL to find the components.