|
FFmpeg
|
#include "config_components.h"#include <curl/curl.h>#include <inttypes.h>#include <limits.h>#include <stdlib.h>#include <string.h>#include "libavutil/avstring.h"#include "libavutil/bprint.h"#include "libavutil/error.h"#include "libavutil/fifo.h"#include "libavutil/log.h"#include "libavutil/macros.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavutil/thread.h"#include "libavutil/time.h"#include "avformat.h"#include "http.h"#include "internal.h"#include "url.h"#include "version.h"Go to the source code of this file.
Data Structures | |
| struct | CurlCmd |
| struct | CurlLoop |
| struct | CurlContext |
Macros | |
| #define | DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION) |
| #define | CURL_DEFAULT_BUFFER_SIZE (4 << 20) |
| #define | CURL_WAIT_US 100000 |
| #define | OFFSET(x) |
| #define | D AV_OPT_FLAG_DECODING_PARAM |
| #define | E AV_OPT_FLAG_ENCODING_PARAM |
Enumerations | |
| enum | cmd_kind { CMD_ADD , CMD_REMOVE , CMD_UNPAUSE , CMD_SEEK } |
Functions | |
| static int | curlcode_to_averror (CURLcode code) |
| static int | is_recoverable (CURLcode code) |
| static size_t | write_callback (char *ptr, size_t size, size_t nmemb, void *userdata) |
| static int64_t | parse_offset (const char *s) |
| static void | parse_content_range (CurlContext *c, const char *v) |
| static size_t | header_callback (char *ptr, size_t size, size_t nitems, void *userdata) |
| static int | xferinfo_callback (void *userdata, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) |
| static void | start_request (CurlContext *c) |
| static void | update_statistics (CurlContext *c) |
| static void | on_done (CurlContext *c, CURLcode code) |
| static int | test_short_seek (CurlContext *c) |
| static void | execute_command (CurlLoop *loop, CurlCmd *cmd) |
| static void * | curl_worker (void *arg) |
| static int | curl_dispatch (CurlLoop *loop, enum cmd_kind kind, CurlContext *c, int64_t pos, int sync) |
| static CurlLoop * | curl_loop_create (AVFormatContext *avfc) |
| static void | print_statistics (CurlLoop *loop) |
| static void | curl_loop_destroy (CurlLoop *loop) |
| static int | curl_loop_attach (CurlContext *c, AVFormatContext *avfc) |
| void | ff_curl_loop_free (struct CurlLoop **loop) |
| Release a libcurl event loop and set *loop to NULL. | |
| static int | libcurl_close (URLContext *h) |
| static int | debug_callback (CURL *easy, curl_infotype type, char *data, size_t size, void *userdata) |
| static struct curl_slist * | build_headers (CurlContext *c) |
| static int | setup_protocols (CurlContext *c) |
| static void | setup_curl (CurlContext *c) |
| static void | curl_cond_wait (CurlContext *c) |
| static int | wait_for_probe (CurlContext *c) |
| static int | libcurl_open (URLContext *h, const char *url, int flags, AVDictionary **options) |
| static int | libcurl_read (URLContext *h, unsigned char *buf, int size) |
| static int64_t | libcurl_seek (URLContext *h, int64_t pos, int whence) |
| static int | libcurl_get_short_seek (URLContext *h) |
Variables | |
| static AVMutex | curl_loop_lock = AV_MUTEX_INITIALIZER |
| static const AVOption | options [] |
| static const AVClass | libcurl_context_class |
| const URLProtocol | ff_libcurl_protocol |
| #define DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION) |
| #define CURL_WAIT_US 100000 |
Definition at line 52 of file libcurl.c.
Referenced by curl_cond_wait().
| #define OFFSET | ( | x | ) |
| #define D AV_OPT_FLAG_DECODING_PARAM |
| #define E AV_OPT_FLAG_ENCODING_PARAM |
| enum cmd_kind |
|
static |
|
static |
Definition at line 203 of file libcurl.c.
Referenced by setup_curl().
|
static |
Definition at line 238 of file libcurl.c.
Referenced by parse_content_range().
|
static |
Definition at line 245 of file libcurl.c.
Referenced by header_callback().
|
static |
Definition at line 265 of file libcurl.c.
Referenced by setup_curl().
|
static |
Definition at line 381 of file libcurl.c.
Referenced by setup_curl().
|
static |
Definition at line 394 of file libcurl.c.
Referenced by execute_command(), and on_done().
|
static |
Definition at line 435 of file libcurl.c.
Referenced by execute_command(), and on_done().
|
static |
Definition at line 460 of file libcurl.c.
Referenced by curl_worker().
|
static |
Definition at line 548 of file libcurl.c.
Referenced by execute_command().
Definition at line 561 of file libcurl.c.
Referenced by curl_worker().
|
static |
Definition at line 606 of file libcurl.c.
Referenced by curl_loop_create().
|
static |
Definition at line 665 of file libcurl.c.
Referenced by libcurl_close(), libcurl_open(), libcurl_read(), and libcurl_seek().
|
static |
Definition at line 695 of file libcurl.c.
Referenced by curl_loop_attach().
|
static |
Definition at line 740 of file libcurl.c.
Referenced by curl_loop_destroy().
|
static |
Definition at line 760 of file libcurl.c.
Referenced by ff_curl_loop_free(), and libcurl_close().
|
static |
Definition at line 784 of file libcurl.c.
Referenced by libcurl_open().
| void ff_curl_loop_free | ( | struct CurlLoop ** | loop | ) |
Release a libcurl event loop and set *loop to NULL.
No-op when loop or *loop is NULL.
Definition at line 803 of file libcurl.c.
Referenced by avformat_free_context().
|
static |
Definition at line 1185 of file libcurl.c.
Referenced by libcurl_open().
|
static |
Definition at line 817 of file libcurl.c.
Referenced by setup_curl().
|
static |
Definition at line 845 of file libcurl.c.
Referenced by setup_curl().
|
static |
Definition at line 869 of file libcurl.c.
Referenced by libcurl_open().
|
static |
Definition at line 910 of file libcurl.c.
Referenced by libcurl_open().
|
static |
Definition at line 987 of file libcurl.c.
Referenced by libcurl_read(), and wait_for_probe().
|
static |
Definition at line 997 of file libcurl.c.
Referenced by libcurl_open().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 160 of file libcurl.c.
Referenced by curl_loop_attach().
|
static |
| const URLProtocol ff_libcurl_protocol |
Definition at line 1263 of file libcurl.c.
Referenced by url_open_whitelist().