| 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 25 matching lines...) Expand all Loading... |
| 36 /* unbuffered I/O */ | 36 /* unbuffered I/O */ |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * URL Context. | 39 * URL Context. |
| 40 * New fields can be added to the end with minor version bumps. | 40 * New fields can be added to the end with minor version bumps. |
| 41 * Removal, reordering and changes to existing fields require a major | 41 * Removal, reordering and changes to existing fields require a major |
| 42 * version bump. | 42 * version bump. |
| 43 * sizeof(URLContext) must not be used outside libav*. | 43 * sizeof(URLContext) must not be used outside libav*. |
| 44 */ | 44 */ |
| 45 typedef struct URLContext { | 45 typedef struct URLContext { |
| 46 #if LIBAVFORMAT_VERSION_MAJOR >= 53 | 46 #if FF_API_URL_CLASS |
| 47 const AVClass *av_class; ///< information for av_log(). Set by url_open(). | 47 const AVClass *av_class; ///< information for av_log(). Set by url_open(). |
| 48 #endif | 48 #endif |
| 49 struct URLProtocol *prot; | 49 struct URLProtocol *prot; |
| 50 int flags; | 50 int flags; |
| 51 int is_streamed; /**< true if streamed (no seek possible), default = false
*/ | 51 int is_streamed; /**< true if streamed (no seek possible), default = false
*/ |
| 52 int max_packet_size; /**< if non zero, the stream is packetized with this m
ax packet size */ | 52 int max_packet_size; /**< if non zero, the stream is packetized with this m
ax packet size */ |
| 53 void *priv_data; | 53 void *priv_data; |
| 54 char *filename; /**< specified URL */ | 54 char *filename; /**< specified URL */ |
| 55 int is_connected; | 55 int is_connected; |
| 56 } URLContext; | 56 } URLContext; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 int (*url_close)(URLContext *h); | 249 int (*url_close)(URLContext *h); |
| 250 struct URLProtocol *next; | 250 struct URLProtocol *next; |
| 251 int (*url_read_pause)(URLContext *h, int pause); | 251 int (*url_read_pause)(URLContext *h, int pause); |
| 252 int64_t (*url_read_seek)(URLContext *h, int stream_index, | 252 int64_t (*url_read_seek)(URLContext *h, int stream_index, |
| 253 int64_t timestamp, int flags); | 253 int64_t timestamp, int flags); |
| 254 int (*url_get_file_handle)(URLContext *h); | 254 int (*url_get_file_handle)(URLContext *h); |
| 255 int priv_data_size; | 255 int priv_data_size; |
| 256 const AVClass *priv_data_class; | 256 const AVClass *priv_data_class; |
| 257 } URLProtocol; | 257 } URLProtocol; |
| 258 | 258 |
| 259 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 259 #if FF_API_REGISTER_PROTOCOL |
| 260 extern URLProtocol *first_protocol; | 260 extern URLProtocol *first_protocol; |
| 261 #endif | 261 #endif |
| 262 | 262 |
| 263 extern URLInterruptCB *url_interrupt_cb; | 263 extern URLInterruptCB *url_interrupt_cb; |
| 264 | 264 |
| 265 /** | 265 /** |
| 266 * If protocol is NULL, returns the first registered protocol, | 266 * If protocol is NULL, returns the first registered protocol, |
| 267 * if protocol is non-NULL, returns the next registered protocol after protocol, | 267 * if protocol is non-NULL, returns the next registered protocol after protocol, |
| 268 * or NULL if protocol is the last one. | 268 * or NULL if protocol is the last one. |
| 269 */ | 269 */ |
| 270 URLProtocol *av_protocol_next(URLProtocol *p); | 270 URLProtocol *av_protocol_next(URLProtocol *p); |
| 271 | 271 |
| 272 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 272 #if FF_API_REGISTER_PROTOCOL |
| 273 /** | 273 /** |
| 274 * @deprecated Use av_register_protocol() instead. | 274 * @deprecated Use av_register_protocol() instead. |
| 275 */ | 275 */ |
| 276 attribute_deprecated int register_protocol(URLProtocol *protocol); | 276 attribute_deprecated int register_protocol(URLProtocol *protocol); |
| 277 | 277 |
| 278 /** | 278 /** |
| 279 * @deprecated Use av_register_protocol2() instead. | 279 * @deprecated Use av_register_protocol2() instead. |
| 280 */ | 280 */ |
| 281 attribute_deprecated int av_register_protocol(URLProtocol *protocol); | 281 attribute_deprecated int av_register_protocol(URLProtocol *protocol); |
| 282 #endif | 282 #endif |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 * | 447 * |
| 448 * @param s Used to return the pointer to the created ByteIOContext. | 448 * @param s Used to return the pointer to the created ByteIOContext. |
| 449 * In case of failure the pointed to value is set to NULL. | 449 * In case of failure the pointed to value is set to NULL. |
| 450 * @return 0 in case of success, a negative value corresponding to an | 450 * @return 0 in case of success, a negative value corresponding to an |
| 451 * AVERROR code in case of failure | 451 * AVERROR code in case of failure |
| 452 */ | 452 */ |
| 453 int url_fdopen(ByteIOContext **s, URLContext *h); | 453 int url_fdopen(ByteIOContext **s, URLContext *h); |
| 454 | 454 |
| 455 /** @warning must be called before any I/O */ | 455 /** @warning must be called before any I/O */ |
| 456 int url_setbufsize(ByteIOContext *s, int buf_size); | 456 int url_setbufsize(ByteIOContext *s, int buf_size); |
| 457 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 457 #if FF_API_URL_RESETBUF |
| 458 /** Reset the buffer for reading or writing. | 458 /** Reset the buffer for reading or writing. |
| 459 * @note Will drop any data currently in the buffer without transmitting it. | 459 * @note Will drop any data currently in the buffer without transmitting it. |
| 460 * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY | 460 * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY |
| 461 * to set up the buffer for writing. */ | 461 * to set up the buffer for writing. */ |
| 462 int url_resetbuf(ByteIOContext *s, int flags); | 462 int url_resetbuf(ByteIOContext *s, int flags); |
| 463 #endif | 463 #endif |
| 464 | 464 |
| 465 /** | 465 /** |
| 466 * Rewind the ByteIOContext using the specified buffer containing the first buf_
size bytes of the file. | 466 * Rewind the ByteIOContext using the specified buffer containing the first buf_
size bytes of the file. |
| 467 * Used after probing to avoid seeking. | 467 * Used after probing to avoid seeking. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 unsigned long checksum); | 549 unsigned long checksum); |
| 550 | 550 |
| 551 /* udp.c */ | 551 /* udp.c */ |
| 552 int udp_set_remote_url(URLContext *h, const char *uri); | 552 int udp_set_remote_url(URLContext *h, const char *uri); |
| 553 int udp_get_local_port(URLContext *h); | 553 int udp_get_local_port(URLContext *h); |
| 554 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) | 554 #if (LIBAVFORMAT_VERSION_MAJOR <= 52) |
| 555 int udp_get_file_handle(URLContext *h); | 555 int udp_get_file_handle(URLContext *h); |
| 556 #endif | 556 #endif |
| 557 | 557 |
| 558 #endif /* AVFORMAT_AVIO_H */ | 558 #endif /* AVFORMAT_AVIO_H */ |
| OLD | NEW |