87 #if FF_API_OLD_INTERRUPT_CB
88 static int default_interrupt_cb(
void);
89 int (*url_interrupt_cb)(
void) = default_interrupt_cb;
103 if (!*p)
return NULL;
104 if ((output && (*p)->url_write) || (!output && (*p)->url_read))
114 memcpy(temp, protocol, size);
125 const char *filename,
int flags,
188 const char *filename,
int flags)
203 int url_alloc(
URLContext **puc,
const char *filename,
int flags)
211 int url_open(
URLContext **puc,
const char *filename,
int flags)
219 int url_read_complete(
URLContext *h,
unsigned char *buf,
int size)
227 int64_t url_seek(
URLContext *h, int64_t pos,
int whence)
247 void url_get_filename(
URLContext *h,
char *buf,
int buf_size)
251 void url_set_interrupt_cb(URLInterruptCB *interrupt_cb)
253 avio_set_interrupt_cb(interrupt_cb);
261 #define URL_SCHEME_CHARS \
262 "abcdefghijklmnopqrstuvwxyz" \
263 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
270 char proto_str[128], proto_nested[128], *ptr;
273 if (filename[proto_len] !=
':' ||
is_dos_path(filename))
274 strcpy(proto_str,
"file");
276 av_strlcpy(proto_str, filename,
FFMIN(proto_len+1,
sizeof(proto_str)));
278 av_strlcpy(proto_nested, proto_str,
sizeof(proto_nested));
279 if ((ptr = strchr(proto_nested,
'+')))
283 if (!strcmp(proto_str, up->
name))
286 !strcmp(proto_nested, up->
name))
296 int ret =
ffurl_alloc(puc, filename, flags, int_cb);
299 if (options && (*puc)->prot->priv_data_class &&
312 int (*transfer_func)(
URLContext *h,
unsigned char *buf,
int size))
315 int fast_retries = 5;
318 while (len < size_min) {
319 ret = transfer_func(h, buf+len, size-len);
333 fast_retries =
FFMAX(fast_retries, 2);
397 int url_exist(
const char *filename)
448 #if FF_API_OLD_INTERRUPT_CB
449 static int default_interrupt_cb(
void)
454 void avio_set_interrupt_cb(
int (*interrupt_cb)(
void))
457 interrupt_cb = default_interrupt_cb;
467 #if FF_API_OLD_INTERRUPT_CB
475 int av_url_read_pause(
URLContext *h,
int pause)
483 int stream_index, int64_t timestamp,
int flags)