xine-lib: xine-lib-1.2.12/src/input/input_crypto.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Functions | Variables
input_crypto.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <gcrypt.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "input_helper.h"`

## Data Structures
struct | crypto_input_plugin_t

## Macros
#define | LOG_MODULE "input_crypto"
#define | LOG_VERBOSE
#define | CRYPTO_BLOCK_SIZE 4096
#define | CHECK(x)

## Functions
static void | _fill (crypto_input_plugin_t *this)
static off_t | crypto_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static uint32_t | crypto_plugin_get_blocksize (input_plugin_t *this_gen)
static off_t | crypto_plugin_get_current_pos (input_plugin_t *this_gen)
static off_t | crypto_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static uint32_t | crypto_plugin_get_capabilities (input_plugin_t *this_gen)
static off_t | crypto_plugin_get_length (input_plugin_t *this_gen)
static const char * | crypto_plugin_get_mrl (input_plugin_t *this_gen)
static int | crypto_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static void | crypto_plugin_dispose (input_plugin_t *this_gen)
static int | crypto_plugin_open (input_plugin_t *this_gen)
static unsigned | _hexval (const char *c)
static int | _get_hex (const char *src, uint8_t *dst)
static size_t | _get_key (const char *src, uint8_t *dst, size_t dst_size)
static input_plugin_t * | crypto_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
static void * | input_crypto_init_class (xine_t *xine, const void *data)

## Variables
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ CHECK

#define CHECK | ( |  | x | ) |

## ◆ CRYPTO_BLOCK_SIZE

#define CRYPTO_BLOCK_SIZE 4096

## ◆ LOG_MODULE

#define LOG_MODULE "input_crypto"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Function Documentation

## ◆ _fill()

static void _fill | ( | crypto_input_plugin_t * | this | ) |
| static

References CHECK, LOG_MODULE, lprintf, NULL, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _x_overlay_to_argb32(), crypto_plugin_read(), and crypto_plugin_seek().

## ◆ _get_hex()

static int _get_hex | ( | const char * | src,
|  | uint8_t * | dst
| ) |  |
| static

References _hexval(), and v.

Referenced by _get_key().

## ◆ _get_key()

static size_t _get_key | ( | const char * | src,
|  | uint8_t * | dst,
|  | size_t | dst_size
| ) |  |
| static

References _get_hex().

Referenced by crypto_class_get_instance().

## ◆ _hexval()

static unsigned _hexval | ( | const char * | c | ) |
| static

Referenced by _get_hex().

## ◆ crypto_class_get_instance()

static input_plugin_t * crypto_class_get_instance | ( | input_class_t * | cls_gen,
|  | xine_stream_t * | stream,
|  | const char * | mrl
| ) |  |
| static

References _get_key(), _x_find_input_plugin(), _x_free_input_plugin(), _x_input_default_read_block(), crypto_plugin_dispose(), crypto_plugin_get_blocksize(), crypto_plugin_get_capabilities(), crypto_plugin_get_current_pos(), crypto_plugin_get_length(), crypto_plugin_get_mrl(), crypto_plugin_get_optional_data(), crypto_plugin_open(), crypto_plugin_read(), crypto_plugin_seek(), key, LOG_MODULE, NULL, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.

Referenced by input_crypto_init_class().

## ◆ crypto_plugin_dispose()

static void crypto_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

References _x_free_input_plugin(), _x_freep(), and xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_blocksize()

static uint32_t crypto_plugin_get_blocksize | ( | input_plugin_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_capabilities()

static uint32_t crypto_plugin_get_capabilities | ( | input_plugin_t * | this_gen | ) |
| static

References INPUT_CAP_PREVIEW, INPUT_CAP_SIZED_PREVIEW, and xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_current_pos()

static off_t crypto_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_length()

static off_t crypto_plugin_get_length | ( | input_plugin_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_mrl()

static const char * crypto_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

References xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_get_optional_data()

static int crypto_plugin_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type
| ) |  |
| static

References crypto_plugin_seek(), INPUT_OPTIONAL_DATA_CLONE, INPUT_OPTIONAL_DATA_NEW_MRL, INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_DATA_SIZED_PREVIEW, INPUT_OPTIONAL_UNSUPPORTED, MAX_PREVIEW_SIZE, and xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_open()

static int crypto_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References key, LOG_MODULE, xine_container_of, XINE_VERBOSITY_LOG, and xprintf.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_read()

static off_t crypto_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf_gen,
|  | off_t | len
| ) |  |
| static

References _fill(), CHECK, MIN, and xine_container_of.

Referenced by crypto_class_get_instance().

## ◆ crypto_plugin_seek()

static off_t crypto_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin
| ) |  |
| static

References _fill(), _x_input_translate_seek(), LOG_MODULE, lprintf, xine_container_of, XINE_VERBOSITY_LOG, and xprintf.

Referenced by crypto_class_get_instance(), and crypto_plugin_get_optional_data().

## ◆ input_crypto_init_class()

static void * input_crypto_init_class | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References crypto_class_get_instance(), input_class_s::get_instance, N_, and NULL.

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT, 18, "crypto", XINE_VERSION_CODE, NULL, input_crypto_init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
input_crypto_init_class
static void * input_crypto_init_class(xine_t *xine, const void *data)
Definition: input_crypto.c:439
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition: xine_plugin.h:30