crypto.c File Reference
#include "avformat.h"
#include "libavutil/aes.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "url.h"
Include dependency graph for crypto.c:

Go to the source code of this file.

Data Structures

struct  CryptoContext
 

Macros

#define MAX_BUFFER_BLOCKS   150
 
#define BLOCKSIZE   16
 
#define OFFSET(x)   offsetof(CryptoContext, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int crypto_open2 (URLContext *h, const char *uri, int flags, AVDictionary **options)
 
static int crypto_read (URLContext *h, uint8_t *buf, int size)
 
static int crypto_close (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass crypto_class
 
URLProtocol ff_crypto_protocol
 

Macro Definition Documentation

#define BLOCKSIZE   16

Definition at line 30 of file crypto.c.

Referenced by crypto_open2(), and crypto_read().

Definition at line 48 of file crypto.c.

#define MAX_BUFFER_BLOCKS   150

Definition at line 29 of file crypto.c.

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

Definition at line 47 of file crypto.c.

Function Documentation

static int crypto_close ( URLContext h)
static

Definition at line 153 of file crypto.c.

static int crypto_open2 ( URLContext h,
const char *  uri,
int  flags,
AVDictionary **  options 
)
static

Definition at line 62 of file crypto.c.

static int crypto_read ( URLContext h,
uint8_t buf,
int  size 
)
static

Definition at line 104 of file crypto.c.

Variable Documentation

const AVClass crypto_class
static
Initial value:
= {
.class_name = "crypto",
.item_name = av_default_item_name,
.option = options,
}
av_default_item_name
static const AVOption options[]
Definition: crypto.c:49
LIBAVUTIL_VERSION_INT
Definition: eval.c:55

Definition at line 55 of file crypto.c.

URLProtocol ff_crypto_protocol
Initial value:
= {
.name = "crypto",
.url_open2 = crypto_open2,
.url_read = crypto_read,
.url_close = crypto_close,
.priv_data_size = sizeof(CryptoContext),
.priv_data_class = &crypto_class,
}
static int crypto_close(URLContext *h)
Definition: crypto.c:153
static int crypto_read(URLContext *h, uint8_t *buf, int size)
Definition: crypto.c:104
static int crypto_open2(URLContext *h, const char *uri, int flags, AVDictionary **options)
Definition: crypto.c:62
#define URL_PROTOCOL_FLAG_NESTED_SCHEME
Definition: url.h:34
static const AVClass crypto_class
Definition: crypto.c:55
static int flags
Definition: cpu.c:23

Definition at line 162 of file crypto.c.

const AVOption options[]
static
Initial value:
= {
{"key", "AES decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, .flags = D },
{"iv", "AES decryption initialization vector", OFFSET(iv), AV_OPT_TYPE_BINARY, .flags = D },
{ NULL }
}
#define D
Definition: crypto.c:48
offset must point to a pointer immediately followed by an int for the length
Definition: opt.h:228
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: crypto.c:47

Definition at line 49 of file crypto.c.