69
* @defgroup open_modes URL open modes
70
* The flags argument to url_open and cosins must be one of the following
71
* constants, optionally ORed with other flags.
74
#define URL_RDONLY 0 /**< read-only */
75
#define URL_WRONLY 1 /**< write-only */
76
#define URL_RDWR 2 /**< read-write */
82
* Use non-blocking mode.
83
* If this flag is set, operations on the context will return
84
* AVERROR(EAGAIN) if they can not be performed immediately.
85
* If this flag is not set, operations on the context will never return
87
* Note that this flag does not affect the opening/connecting of the
88
* context. Connecting a protocol will always block if necessary (e.g. on
89
* network protocols) but never hang (e.g. on busy devices).
90
* Warning: non-blocking protocols is work-in-progress; this flag may be
93
#define URL_FLAG_NONBLOCK 4
68
95
typedef int URLInterruptCB(void);
71
* Create a URLContext for accessing to the resource indicated by
72
* url, and open it using the URLProtocol up.
74
* @param puc pointer to the location where, in case of success, the
75
* function puts the pointer to the created URLContext
76
* @param flags flags which control how the resource indicated by url
78
* @return 0 in case of success, a negative value corresponding to an
79
* AVERROR code in case of failure
81
int url_open_protocol (URLContext **puc, struct URLProtocol *up,
82
const char *url, int flags);
85
* Create a URLContext for accessing to the resource indicated by
86
* url, but do not initiate the connection yet.
88
* @param puc pointer to the location where, in case of success, the
89
* function puts the pointer to the created URLContext
90
* @param flags flags which control how the resource indicated by url
92
* @return 0 in case of success, a negative value corresponding to an
93
* AVERROR code in case of failure
95
int url_alloc(URLContext **h, const char *url, int flags);
98
* Connect an URLContext that has been allocated by url_alloc
100
int url_connect(URLContext *h);
103
* Create an URLContext for accessing to the resource indicated by
106
* @param puc pointer to the location where, in case of success, the
107
* function puts the pointer to the created URLContext
108
* @param flags flags which control how the resource indicated by url
110
* @return 0 in case of success, a negative value corresponding to an
111
* AVERROR code in case of failure
113
int url_open(URLContext **h, const char *url, int flags);
116
* Read up to size bytes from the resource accessed by h, and store
117
* the read bytes in buf.
119
* @return The number of bytes actually read, or a negative value
120
* corresponding to an AVERROR code in case of error. A value of zero
121
* indicates that it is not possible to read more from the accessed
122
* resource (except if the value of the size argument is also zero).
124
int url_read(URLContext *h, unsigned char *buf, int size);
127
* Read as many bytes as possible (up to size), calling the
128
* read function multiple times if necessary.
129
* Will also retry if the read function returns AVERROR(EAGAIN).
130
* This makes special short-read handling in applications
131
* unnecessary, if the return value is < size then it is
132
* certain there was either an error or the end of file was reached.
134
int url_read_complete(URLContext *h, unsigned char *buf, int size);
137
* Write size bytes from buf to the resource accessed by h.
139
* @return the number of bytes actually written, or a negative value
140
* corresponding to an AVERROR code in case of failure
142
int url_write(URLContext *h, const unsigned char *buf, int size);
145
* Passing this as the "whence" parameter to a seek function causes it to
146
* return the filesize without seeking anywhere. Supporting this is optional.
147
* If it is not supported then the seek function will return <0.
149
#define AVSEEK_SIZE 0x10000
152
* Change the position that will be used by the next read/write
153
* operation on the resource accessed by h.
155
* @param pos specifies the new position to set
156
* @param whence specifies how pos should be interpreted, it must be
157
* one of SEEK_SET (seek from the beginning), SEEK_CUR (seek from the
158
* current position), SEEK_END (seek from the end), or AVSEEK_SIZE
159
* (return the filesize of the requested resource, pos is ignored).
160
* @return a negative value corresponding to an AVERROR code in case
161
* of failure, or the resulting file position, measured in bytes from
162
* the beginning of the file. You can use this feature together with
163
* SEEK_CUR to read the current file position.
165
int64_t url_seek(URLContext *h, int64_t pos, int whence);
168
* Close the resource accessed by the URLContext h, and free the
171
* @return a negative value if an error condition occurred, 0
174
int url_close(URLContext *h);
98
* @defgroup old_url_funcs Old url_* functions
99
* @deprecated use the buffered API based on AVIOContext instead
102
attribute_deprecated int url_open_protocol (URLContext **puc, struct URLProtocol *up,
103
const char *url, int flags);
104
attribute_deprecated int url_alloc(URLContext **h, const char *url, int flags);
105
attribute_deprecated int url_connect(URLContext *h);
106
attribute_deprecated int url_open(URLContext **h, const char *url, int flags);
107
attribute_deprecated int url_read(URLContext *h, unsigned char *buf, int size);
108
attribute_deprecated int url_read_complete(URLContext *h, unsigned char *buf, int size);
109
attribute_deprecated int url_write(URLContext *h, const unsigned char *buf, int size);
110
attribute_deprecated int64_t url_seek(URLContext *h, int64_t pos, int whence);
111
attribute_deprecated int url_close(URLContext *h);
112
attribute_deprecated int64_t url_filesize(URLContext *h);
113
attribute_deprecated int url_get_file_handle(URLContext *h);
114
attribute_deprecated int url_get_max_packet_size(URLContext *h);
115
attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size);
116
attribute_deprecated int av_url_read_pause(URLContext *h, int pause);
117
attribute_deprecated int64_t av_url_read_seek(URLContext *h, int stream_index,
118
int64_t timestamp, int flags);
119
attribute_deprecated void url_set_interrupt_cb(int (*interrupt_cb)(void));
177
123
* Return a non-zero value if the resource indicated by url
333
236
int (*read_pause)(void *opaque, int pause);
334
237
int64_t (*read_seek)(void *opaque, int stream_index,
335
238
int64_t timestamp, int flags);
338
int init_put_byte(ByteIOContext *s,
339
unsigned char *buffer,
343
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
344
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
345
int64_t (*seek)(void *opaque, int64_t offset, int whence));
346
ByteIOContext *av_alloc_put_byte(
347
unsigned char *buffer,
351
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
352
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
353
int64_t (*seek)(void *opaque, int64_t offset, int whence));
355
void put_byte(ByteIOContext *s, int b);
356
void put_nbyte(ByteIOContext *s, int b, int count);
357
void put_buffer(ByteIOContext *s, const unsigned char *buf, int size);
358
void put_le64(ByteIOContext *s, uint64_t val);
359
void put_be64(ByteIOContext *s, uint64_t val);
360
void put_le32(ByteIOContext *s, unsigned int val);
361
void put_be32(ByteIOContext *s, unsigned int val);
362
void put_le24(ByteIOContext *s, unsigned int val);
363
void put_be24(ByteIOContext *s, unsigned int val);
364
void put_le16(ByteIOContext *s, unsigned int val);
365
void put_be16(ByteIOContext *s, unsigned int val);
366
void put_tag(ByteIOContext *s, const char *tag);
368
void put_strz(ByteIOContext *s, const char *buf);
371
* fseek() equivalent for ByteIOContext.
372
* @return new position or AVERROR.
374
int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence);
377
* Skip given number of bytes forward.
378
* @param offset number of bytes
379
* @return 0 on success, <0 on error
381
int url_fskip(ByteIOContext *s, int64_t offset);
384
* ftell() equivalent for ByteIOContext.
240
* A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
246
typedef attribute_deprecated AVIOContext ByteIOContext;
248
attribute_deprecated int init_put_byte(AVIOContext *s,
249
unsigned char *buffer,
253
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
254
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
255
int64_t (*seek)(void *opaque, int64_t offset, int whence));
256
attribute_deprecated AVIOContext *av_alloc_put_byte(
257
unsigned char *buffer,
261
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
262
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
263
int64_t (*seek)(void *opaque, int64_t offset, int whence));
266
* @defgroup old_avio_funcs Old put_/get_*() functions
267
* @deprecated use the avio_ -prefixed functions instead.
270
attribute_deprecated int get_buffer(AVIOContext *s, unsigned char *buf, int size);
271
attribute_deprecated int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size);
272
attribute_deprecated int get_byte(AVIOContext *s);
273
attribute_deprecated unsigned int get_le16(AVIOContext *s);
274
attribute_deprecated unsigned int get_le24(AVIOContext *s);
275
attribute_deprecated unsigned int get_le32(AVIOContext *s);
276
attribute_deprecated uint64_t get_le64(AVIOContext *s);
277
attribute_deprecated unsigned int get_be16(AVIOContext *s);
278
attribute_deprecated unsigned int get_be24(AVIOContext *s);
279
attribute_deprecated unsigned int get_be32(AVIOContext *s);
280
attribute_deprecated uint64_t get_be64(AVIOContext *s);
282
attribute_deprecated void put_byte(AVIOContext *s, int b);
283
attribute_deprecated void put_nbyte(AVIOContext *s, int b, int count);
284
attribute_deprecated void put_buffer(AVIOContext *s, const unsigned char *buf, int size);
285
attribute_deprecated void put_le64(AVIOContext *s, uint64_t val);
286
attribute_deprecated void put_be64(AVIOContext *s, uint64_t val);
287
attribute_deprecated void put_le32(AVIOContext *s, unsigned int val);
288
attribute_deprecated void put_be32(AVIOContext *s, unsigned int val);
289
attribute_deprecated void put_le24(AVIOContext *s, unsigned int val);
290
attribute_deprecated void put_be24(AVIOContext *s, unsigned int val);
291
attribute_deprecated void put_le16(AVIOContext *s, unsigned int val);
292
attribute_deprecated void put_be16(AVIOContext *s, unsigned int val);
293
attribute_deprecated void put_tag(AVIOContext *s, const char *tag);
298
attribute_deprecated int av_url_read_fpause(AVIOContext *h, int pause);
299
attribute_deprecated int64_t av_url_read_fseek (AVIOContext *h, int stream_index,
300
int64_t timestamp, int flags);
303
* @defgroup old_url_f_funcs Old url_f* functions
304
* @deprecated use the avio_ -prefixed functions instead.
307
attribute_deprecated int url_fopen( AVIOContext **s, const char *url, int flags);
308
attribute_deprecated int url_fclose(AVIOContext *s);
309
attribute_deprecated int64_t url_fseek(AVIOContext *s, int64_t offset, int whence);
310
attribute_deprecated int url_fskip(AVIOContext *s, int64_t offset);
311
attribute_deprecated int64_t url_ftell(AVIOContext *s);
312
attribute_deprecated int64_t url_fsize(AVIOContext *s);
314
attribute_deprecated int url_fgetc(AVIOContext *s);
315
attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size);
317
attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
319
attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...);
321
attribute_deprecated void put_flush_packet(AVIOContext *s);
322
attribute_deprecated int url_open_dyn_buf(AVIOContext **s);
323
attribute_deprecated int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size);
324
attribute_deprecated int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
325
attribute_deprecated int url_fdopen(AVIOContext **s, URLContext *h);
331
* @deprecated use AVIOContext.eof_reached
333
attribute_deprecated int url_feof(AVIOContext *s);
334
attribute_deprecated int url_ferror(AVIOContext *s);
336
attribute_deprecated int udp_set_remote_url(URLContext *h, const char *uri);
337
attribute_deprecated int udp_get_local_port(URLContext *h);
339
attribute_deprecated void init_checksum(AVIOContext *s,
340
unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len),
341
unsigned long checksum);
342
attribute_deprecated unsigned long get_checksum(AVIOContext *s);
346
* Allocate and initialize an AVIOContext for buffered I/O. It must be later
347
* freed with av_free().
349
* @param buffer Memory block for input/output operations via AVIOContext.
350
* @param buffer_size The buffer size is very important for performance.
351
* For protocols with fixed blocksize it should be set to this blocksize.
352
* For others a typical size is a cache page, e.g. 4kb.
353
* @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
354
* @param opaque An opaque pointer to user-specific data.
355
* @param read_packet A function for refilling the buffer, may be NULL.
356
* @param write_packet A function for writing the buffer contents, may be NULL.
357
* @param seek A function for seeking to specified byte position, may be NULL.
359
* @return Allocated AVIOContext or NULL on failure.
361
AVIOContext *avio_alloc_context(
362
unsigned char *buffer,
366
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
367
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
368
int64_t (*seek)(void *opaque, int64_t offset, int whence));
370
void avio_w8(AVIOContext *s, int b);
371
void avio_write(AVIOContext *s, const unsigned char *buf, int size);
372
void avio_wl64(AVIOContext *s, uint64_t val);
373
void avio_wb64(AVIOContext *s, uint64_t val);
374
void avio_wl32(AVIOContext *s, unsigned int val);
375
void avio_wb32(AVIOContext *s, unsigned int val);
376
void avio_wl24(AVIOContext *s, unsigned int val);
377
void avio_wb24(AVIOContext *s, unsigned int val);
378
void avio_wl16(AVIOContext *s, unsigned int val);
379
void avio_wb16(AVIOContext *s, unsigned int val);
382
attribute_deprecated void put_strz(AVIOContext *s, const char *buf);
386
* Write a NULL-terminated string.
387
* @return number of bytes written.
389
int avio_put_str(AVIOContext *s, const char *str);
392
* Convert an UTF-8 string to UTF-16LE and write it.
393
* @return number of bytes written.
395
int avio_put_str16le(AVIOContext *s, const char *str);
398
* Passing this as the "whence" parameter to a seek function causes it to
399
* return the filesize without seeking anywhere. Supporting this is optional.
400
* If it is not supported then the seek function will return <0.
402
#define AVSEEK_SIZE 0x10000
405
* Oring this flag as into the "whence" parameter to a seek function causes it to
406
* seek by any means (like reopening and linear reading) or other normally unreasonble
407
* means that can be extreemly slow.
408
* This may be ignored by the seek code.
410
#define AVSEEK_FORCE 0x20000
413
* fseek() equivalent for AVIOContext.
414
* @return new position or AVERROR.
416
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence);
419
* Skip given number of bytes forward
420
* @return new position or AVERROR.
422
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
424
return avio_seek(s, offset, SEEK_CUR);
428
* ftell() equivalent for AVIOContext.
385
429
* @return position or AVERROR.
387
int64_t url_ftell(ByteIOContext *s);
431
static av_always_inline int64_t avio_tell(AVIOContext *s)
433
return avio_seek(s, 0, SEEK_CUR);
390
437
* Get the filesize.
391
438
* @return filesize or AVERROR
393
int64_t url_fsize(ByteIOContext *s);
396
* feof() equivalent for ByteIOContext.
397
* @return non zero if and only if end of file
399
int url_feof(ByteIOContext *s);
401
int url_ferror(ByteIOContext *s);
403
int av_url_read_fpause(ByteIOContext *h, int pause);
404
int64_t av_url_read_fseek(ByteIOContext *h, int stream_index,
405
int64_t timestamp, int flags);
408
/** @note return URL_EOF (-1) if EOF */
409
int url_fgetc(ByteIOContext *s);
440
int64_t avio_size(AVIOContext *s);
411
442
/** @warning currently size is limited */
413
int url_fprintf(ByteIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
444
int avio_printf(AVIOContext *s, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
415
int url_fprintf(ByteIOContext *s, const char *fmt, ...);
446
int avio_printf(AVIOContext *s, const char *fmt, ...);
418
450
/** @note unlike fgets, the EOL character is not returned and a whole
419
451
line is parsed. return NULL if first char read was EOF */
420
char *url_fgets(ByteIOContext *s, char *buf, int buf_size);
422
void put_flush_packet(ByteIOContext *s);
426
* Read size bytes from ByteIOContext into buf.
427
* @return number of bytes read or AVERROR
429
int get_buffer(ByteIOContext *s, unsigned char *buf, int size);
432
* Read size bytes from ByteIOContext into buf.
433
* This reads at most 1 packet. If that is not enough fewer bytes will be
435
* @return number of bytes read or AVERROR
437
int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size);
452
attribute_deprecated char *url_fgets(AVIOContext *s, char *buf, int buf_size);
455
void avio_flush(AVIOContext *s);
459
* Read size bytes from AVIOContext into buf.
460
* @return number of bytes read or AVERROR
462
int avio_read(AVIOContext *s, unsigned char *buf, int size);
439
464
/** @note return 0 if EOF, so you cannot use it if EOF handling is
441
int get_byte(ByteIOContext *s);
442
unsigned int get_le24(ByteIOContext *s);
443
unsigned int get_le32(ByteIOContext *s);
444
uint64_t get_le64(ByteIOContext *s);
445
unsigned int get_le16(ByteIOContext *s);
447
char *get_strz(ByteIOContext *s, char *buf, int maxlen);
448
unsigned int get_be16(ByteIOContext *s);
449
unsigned int get_be24(ByteIOContext *s);
450
unsigned int get_be32(ByteIOContext *s);
451
uint64_t get_be64(ByteIOContext *s);
453
uint64_t ff_get_v(ByteIOContext *bc);
455
static inline int url_is_streamed(ByteIOContext *s)
466
int avio_r8 (AVIOContext *s);
467
unsigned int avio_rl16(AVIOContext *s);
468
unsigned int avio_rl24(AVIOContext *s);
469
unsigned int avio_rl32(AVIOContext *s);
470
uint64_t avio_rl64(AVIOContext *s);
473
* Read a string from pb into buf. The reading will terminate when either
474
* a NULL character was encountered, maxlen bytes have been read, or nothing
475
* more can be read from pb. The result is guaranteed to be NULL-terminated, it
476
* will be truncated if buf is too small.
477
* Note that the string is not interpreted or validated in any way, it
478
* might get truncated in the middle of a sequence for multi-byte encodings.
480
* @return number of bytes read (is always <= maxlen).
481
* If reading ends on EOF or error, the return value will be one more than
482
* bytes actually read.
484
int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
487
* Read a UTF-16 string from pb and convert it to UTF-8.
488
* The reading will terminate when either a null or invalid character was
489
* encountered or maxlen bytes have been read.
490
* @return number of bytes read (is always <= maxlen)
492
int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen);
493
int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
497
* @deprecated use avio_get_str instead
499
attribute_deprecated char *get_strz(AVIOContext *s, char *buf, int maxlen);
501
unsigned int avio_rb16(AVIOContext *s);
502
unsigned int avio_rb24(AVIOContext *s);
503
unsigned int avio_rb32(AVIOContext *s);
504
uint64_t avio_rb64(AVIOContext *s);
508
* @deprecated Use AVIOContext.seekable field directly.
510
attribute_deprecated static inline int url_is_streamed(AVIOContext *s)
457
return s->is_streamed;
461
* Create and initialize a ByteIOContext for accessing the
462
* resource referenced by the URLContext h.
463
* @note When the URLContext h has been opened in read+write mode, the
464
* ByteIOContext can be used only for writing.
466
* @param s Used to return the pointer to the created ByteIOContext.
467
* In case of failure the pointed to value is set to NULL.
468
* @return 0 in case of success, a negative value corresponding to an
469
* AVERROR code in case of failure
471
int url_fdopen(ByteIOContext **s, URLContext *h);
473
/** @warning must be called before any I/O */
474
int url_setbufsize(ByteIOContext *s, int buf_size);
475
516
#if FF_API_URL_RESETBUF
476
517
/** Reset the buffer for reading or writing.
477
518
* @note Will drop any data currently in the buffer without transmitting it.
478
519
* @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY
479
520
* to set up the buffer for writing. */
480
int url_resetbuf(ByteIOContext *s, int flags);
521
int url_resetbuf(AVIOContext *s, int flags);
484
* Rewind the ByteIOContext using the specified buffer containing the first buf_size bytes of the file.
485
* Used after probing to avoid seeking.
486
* Joins buf and s->buffer, taking any overlap into consideration.
487
* @note s->buffer must overlap with buf or they can't be joined and the function fails
488
* @note This function is NOT part of the public API
490
* @param s The read-only ByteIOContext to rewind
491
* @param buf The probe buffer containing the first buf_size bytes of the file
492
* @param buf_size The size of buf
493
* @return 0 in case of success, a negative value corresponding to an
494
* AVERROR code in case of failure
496
int ff_rewind_with_probe_data(ByteIOContext *s, unsigned char *buf, int buf_size);
499
* Create and initialize a ByteIOContext for accessing the
525
* @defgroup open_modes URL open modes
526
* The flags argument to avio_open must be one of the following
527
* constants, optionally ORed with other flags.
530
#define AVIO_RDONLY 0 /**< read-only */
531
#define AVIO_WRONLY 1 /**< write-only */
532
#define AVIO_RDWR 2 /**< read-write */
538
* Use non-blocking mode.
539
* If this flag is set, operations on the context will return
540
* AVERROR(EAGAIN) if they can not be performed immediately.
541
* If this flag is not set, operations on the context will never return
543
* Note that this flag does not affect the opening/connecting of the
544
* context. Connecting a protocol will always block if necessary (e.g. on
545
* network protocols) but never hang (e.g. on busy devices).
546
* Warning: non-blocking protocols is work-in-progress; this flag may be
549
#define AVIO_FLAG_NONBLOCK 4
552
* Create and initialize a AVIOContext for accessing the
500
553
* resource indicated by url.
501
554
* @note When the resource indicated by url has been opened in
502
* read+write mode, the ByteIOContext can be used only for writing.
555
* read+write mode, the AVIOContext can be used only for writing.
504
* @param s Used to return the pointer to the created ByteIOContext.
557
* @param s Used to return the pointer to the created AVIOContext.
505
558
* In case of failure the pointed to value is set to NULL.
506
559
* @param flags flags which control how the resource indicated by url
507
560
* is to be opened
508
561
* @return 0 in case of success, a negative value corresponding to an
509
562
* AVERROR code in case of failure
511
int url_fopen(ByteIOContext **s, const char *url, int flags);
513
int url_fclose(ByteIOContext *s);
514
URLContext *url_fileno(ByteIOContext *s);
564
int avio_open(AVIOContext **s, const char *url, int flags);
566
int avio_close(AVIOContext *s);
569
attribute_deprecated URLContext *url_fileno(AVIOContext *s);
517
* Return the maximum packet size associated to packetized buffered file
518
* handle. If the file is not packetized (stream like http or file on
519
* disk), then 0 is returned.
521
* @param s buffered file handle
522
* @return maximum packet size in bytes
572
* @deprecated use AVIOContext.max_packet_size directly.
524
int url_fget_max_packet_size(ByteIOContext *s);
574
attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
526
int url_open_buf(ByteIOContext **s, uint8_t *buf, int buf_size, int flags);
576
attribute_deprecated int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags);
528
578
/** return the written or read size */
529
int url_close_buf(ByteIOContext *s);
579
attribute_deprecated int url_close_buf(AVIOContext *s);
532
583
* Open a write only memory stream.