FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
async.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/error.h"
#include "libavutil/fifo.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "url.h"
#include <stdint.h>
#include <pthread.h>

Go to the source code of this file.

Data Structures

struct  Context
 

Macros

#define BUFFER_CAPACITY   (4 * 1024 * 1024)
 support timeout support backward short seek support work with concatdec, hls More...
 
#define SHORT_SEEK_THRESHOLD   (256 * 1024)
 
#define OFFSET(x)   offsetof(Context, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int async_check_interrupt (void *arg)
 
static voidasync_buffer_task (void *arg)
 
static int async_open (URLContext *h, const char *arg, int flags, AVDictionary **options)
 
static int async_close (URLContext *h)
 
static int async_read_internal (URLContext *h, void *dest, int size, int read_complete, void(*func)(void *, void *, int))
 
static int async_read (URLContext *h, unsigned char *buf, int size)
 
static void fifo_do_not_copy_func (void *dest, void *src, int size)
 
static int64_t async_seek (URLContext *h, int64_t pos, int whence)
 

Variables

static const AVOption options []
 
static const AVClass async_context_class
 
URLProtocol ff_async_protocol
 

Macro Definition Documentation

#define BUFFER_CAPACITY   (4 * 1024 * 1024)

support timeout support backward short seek support work with concatdec, hls

Definition at line 45 of file async.c.

Referenced by async_open().

#define SHORT_SEEK_THRESHOLD   (256 * 1024)

Definition at line 46 of file async.c.

Referenced by async_seek().

#define OFFSET (   x)    offsetof(Context, x)

Definition at line 366 of file async.c.

Definition at line 367 of file async.c.

Function Documentation

static int async_check_interrupt ( void arg)
static

Definition at line 74 of file async.c.

Referenced by async_buffer_task(), async_open(), async_read_internal(), and async_seek().

static void* async_buffer_task ( void arg)
static

Definition at line 88 of file async.c.

Referenced by async_open().

static int async_open ( URLContext h,
const char *  arg,
int  flags,
AVDictionary **  options 
)
static

Definition at line 155 of file async.c.

static int async_close ( URLContext h)
static

Definition at line 220 of file async.c.

static int async_read_internal ( URLContext h,
void dest,
int  size,
int  read_complete,
void(*)(void *, void *, int)  func 
)
static

Definition at line 243 of file async.c.

Referenced by async_read(), and async_seek().

static int async_read ( URLContext h,
unsigned char *  buf,
int  size 
)
static

Definition at line 286 of file async.c.

static void fifo_do_not_copy_func ( void dest,
void src,
int  size 
)
static

Definition at line 291 of file async.c.

Referenced by async_seek().

static int64_t async_seek ( URLContext h,
int64_t  pos,
int  whence 
)
static

Definition at line 295 of file async.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{NULL},
}
#define NULL
Definition: coverity.c:32

Definition at line 369 of file async.c.

const AVClass async_context_class
static
Initial value:
= {
.class_name = "Async",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:62
static const AVOption options[]
Definition: async.c:369
av_default_item_name

Definition at line 373 of file async.c.

URLProtocol ff_async_protocol
Initial value:
= {
.name = "async",
.url_open2 = async_open,
.url_read = async_read,
.url_seek = async_seek,
.url_close = async_close,
.priv_data_size = sizeof(Context),
.priv_data_class = &async_context_class,
}
Definition: async.c:48
static const AVClass async_context_class
Definition: async.c:373
static int64_t async_seek(URLContext *h, int64_t pos, int whence)
Definition: async.c:295
static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **options)
Definition: async.c:155
static int async_close(URLContext *h)
Definition: async.c:220
static int async_read(URLContext *h, unsigned char *buf, int size)
Definition: async.c:286

Definition at line 380 of file async.c.