OLD | NEW |
1 /* | 1 /* |
2 * copyright (c) 2001 Fabrice Bellard | 2 * copyright (c) 2001 Fabrice Bellard |
3 * | 3 * |
4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
5 * | 5 * |
6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 unsigned int get_be32(ByteIOContext *s); | 374 unsigned int get_be32(ByteIOContext *s); |
375 uint64_t get_be64(ByteIOContext *s); | 375 uint64_t get_be64(ByteIOContext *s); |
376 | 376 |
377 uint64_t ff_get_v(ByteIOContext *bc); | 377 uint64_t ff_get_v(ByteIOContext *bc); |
378 | 378 |
379 static inline int url_is_streamed(ByteIOContext *s) | 379 static inline int url_is_streamed(ByteIOContext *s) |
380 { | 380 { |
381 return s->is_streamed; | 381 return s->is_streamed; |
382 } | 382 } |
383 | 383 |
384 /** @note when opened as read/write, the buffers are only used for | 384 /** |
385 writing */ | 385 * Creates and initializes a ByteIOContext for accessing the |
| 386 * resource referenced by the URLContext h. |
| 387 * @note When the URLContext h has been opened in read+write mode, the |
| 388 * ByteIOContext can be used only for writing. |
| 389 * |
| 390 * @param s Used to return the pointer to the created ByteIOContext. |
| 391 * In case of failure the pointed to value is set to NULL. |
| 392 * @return 0 in case of success, a negative value corresponding to an |
| 393 * AVERROR code in case of failure |
| 394 */ |
386 int url_fdopen(ByteIOContext **s, URLContext *h); | 395 int url_fdopen(ByteIOContext **s, URLContext *h); |
387 | 396 |
388 /** @warning must be called before any I/O */ | 397 /** @warning must be called before any I/O */ |
389 int url_setbufsize(ByteIOContext *s, int buf_size); | 398 int url_setbufsize(ByteIOContext *s, int buf_size); |
390 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 399 #if LIBAVFORMAT_VERSION_MAJOR < 53 |
391 /** Reset the buffer for reading or writing. | 400 /** Reset the buffer for reading or writing. |
392 * @note Will drop any data currently in the buffer without transmitting it. | 401 * @note Will drop any data currently in the buffer without transmitting it. |
393 * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY | 402 * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY |
394 * to set up the buffer for writing. */ | 403 * to set up the buffer for writing. */ |
395 int url_resetbuf(ByteIOContext *s, int flags); | 404 int url_resetbuf(ByteIOContext *s, int flags); |
396 #endif | 405 #endif |
397 | 406 |
398 /** @note when opened as read/write, the buffers are only used for | 407 /** |
399 writing */ | 408 * Creates and initializes a ByteIOContext for accessing the |
| 409 * resource indicated by url. |
| 410 * @note When the resource indicated by url has been opened in |
| 411 * read+write mode, the ByteIOContext can be used only for writing. |
| 412 * |
| 413 * @param s Used to return the pointer to the created ByteIOContext. |
| 414 * In case of failure the pointed to value is set to NULL. |
| 415 * @param flags flags which control how the resource indicated by url |
| 416 * is to be opened |
| 417 * @return 0 in case of success, a negative value corresponding to an |
| 418 * AVERROR code in case of failure |
| 419 */ |
400 int url_fopen(ByteIOContext **s, const char *url, int flags); | 420 int url_fopen(ByteIOContext **s, const char *url, int flags); |
| 421 |
401 int url_fclose(ByteIOContext *s); | 422 int url_fclose(ByteIOContext *s); |
402 URLContext *url_fileno(ByteIOContext *s); | 423 URLContext *url_fileno(ByteIOContext *s); |
403 | 424 |
404 /** | 425 /** |
405 * Return the maximum packet size associated to packetized buffered file | 426 * Return the maximum packet size associated to packetized buffered file |
406 * handle. If the file is not packetized (stream like http or file on | 427 * handle. If the file is not packetized (stream like http or file on |
407 * disk), then 0 is returned. | 428 * disk), then 0 is returned. |
408 * | 429 * |
409 * @param s buffered file handle | 430 * @param s buffered file handle |
410 * @return maximum packet size in bytes | 431 * @return maximum packet size in bytes |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 unsigned long checksum); | 473 unsigned long checksum); |
453 | 474 |
454 /* udp.c */ | 475 /* udp.c */ |
455 int udp_set_remote_url(URLContext *h, const char *uri); | 476 int udp_set_remote_url(URLContext *h, const char *uri); |
456 int udp_get_local_port(URLContext *h); | 477 int udp_get_local_port(URLContext *h); |
457 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) | 478 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) |
458 int udp_get_file_handle(URLContext *h); | 479 int udp_get_file_handle(URLContext *h); |
459 #endif | 480 #endif |
460 | 481 |
461 #endif /* AVFORMAT_AVIO_H */ | 482 #endif /* AVFORMAT_AVIO_H */ |
OLD | NEW |