xine-lib: xine-lib-1.2.12/src/spu_dec/xine_cc_decoder.c File Reference

xine-lib 1.2.12

Data Structures | Typedefs | Functions | Variables
xine_cc_decoder.c File Reference
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <xine/buffer.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include "cc_decoder.h"`

## Data Structures
struct | spucc_decoder_s

## Typedefs
typedef struct spucc_decoder_s | spucc_decoder_t

## Functions
static void | copy_str (char *d, const char *s, size_t maxbytes)
static void | spucc_update_intrinsics (spucc_decoder_t *this)
static void | spucc_do_close (spucc_decoder_t *this)
static void | spucc_do_init (spucc_decoder_t *this)
static void | spucc_cfg_enable_change (void *this_gen, xine_cfg_entry_t *value)
static void | spucc_cfg_scheme_change (void *this_gen, xine_cfg_entry_t *value)
static void | spucc_font_change (void *this_gen, xine_cfg_entry_t *value)
static void | spucc_num_change (void *this_gen, xine_cfg_entry_t *value)
static void | spucc_register_cfg_vars (spucc_class_t *this, config_values_t *xine_cfg)
static void | spucc_notify_frame_change (spucc_decoder_t *this, int width, int height)
static void | spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf)
static void | spudec_reset (spu_decoder_t *this_gen)
static void | spudec_discontinuity (spu_decoder_t *this_gen)
static void | spudec_dispose (spu_decoder_t *this_gen)
static spu_decoder_t * | spudec_open_plugin (spu_decoder_class_t *class, xine_stream_t *stream)
static void * | init_spu_decoder_plugin (xine_t *xine, const void *data)

## Variables
static const char *const | cc_schemes [2+1]
static const uint32_t | supported_types [] = { BUF_SPU_CC, 0 }
static const decoder_info_t | spudec_info
const plugin_info_t xine_plugin_info[] | EXPORTED

## Typedef Documentation

## ◆ spucc_decoder_t

typedef struct spucc_decoder_s spucc_decoder_t

## Function Documentation

## ◆ copy_str()

static void copy_str | ( | char * | d,
|  | const char * | s,
|  | size_t | maxbytes
| ) |  |
| static

Referenced by spucc_font_change(), and spucc_register_cfg_vars().

## ◆ init_spu_decoder_plugin()

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

References xine_s::config, default_spu_decoder_class_dispose, N_, NULL, spucc_register_cfg_vars(), and spudec_open_plugin().

## ◆ spucc_cfg_enable_change()

static void spucc_cfg_enable_change | ( | void * | this_gen,
|  | xine_cfg_entry_t * | value
| ) |  |
| static

References cc_config_s::cc_enabled, cc_config_s::config_version, and xine_cfg_entry_s::num_value.

Referenced by spucc_register_cfg_vars().

## ◆ spucc_cfg_scheme_change()

static void spucc_cfg_scheme_change | ( | void * | this_gen,
|  | xine_cfg_entry_t * | value
| ) |  |
| static

References cc_config_s::cc_scheme, cc_schemes, cc_config_s::config_version, and xine_cfg_entry_s::num_value.

Referenced by spucc_register_cfg_vars().

## ◆ spucc_do_close()

static void spucc_do_close | ( | spucc_decoder_t * | this | ) |
| static

References cc_decoder_close(), and cc_renderer_close().

Referenced by spudec_decode_data(), and spudec_dispose().

## ◆ spucc_do_init()

static void spucc_do_init | ( | spucc_decoder_t * | this | ) |
| static

References cc_decoder_open(), cc_renderer_open(), and spucc_update_intrinsics().

Referenced by spudec_decode_data().

## ◆ spucc_font_change()

static void spucc_font_change | ( | void * | this_gen,
|  | xine_cfg_entry_t * | value
| ) |  |
| static

References CC_FONT_MAX, cc_config_s::config_version, copy_str(), cc_config_s::font, cc_config_s::italic_font, xine_cfg_entry_s::key, and xine_cfg_entry_s::str_value.

Referenced by spucc_register_cfg_vars().

## ◆ spucc_notify_frame_change()

static void spucc_notify_frame_change | ( | spucc_decoder_t * | this,
|  | int | width,
|  | int | height
| ) |  |
| static

References height, spucc_update_intrinsics(), and width.

Referenced by spudec_decode_data().

## ◆ spucc_num_change()

static void spucc_num_change | ( | void * | this_gen,
|  | xine_cfg_entry_t * | value
| ) |  |
| static

References cc_config_s::center, cc_config_s::config_version, cc_config_s::font_size, xine_cfg_entry_s::key, and xine_cfg_entry_s::num_value.

Referenced by spucc_register_cfg_vars().

## ◆ spucc_register_cfg_vars()

static void spucc_register_cfg_vars | ( | spucc_class_t * | this,
|  | config_values_t * | xine_cfg
| ) |  |
| static

References _, cc_config_s::cc_enabled, CC_FONT_MAX, cc_config_s::cc_scheme, cc_schemes, cc_config_s::center, copy_str(), cc_config_s::font, cc_config_s::font_size, cc_config_s::italic_font, config_values_s::register_bool, config_values_s::register_enum, config_values_s::register_num, config_values_s::register_string, spucc_cfg_enable_change(), spucc_cfg_scheme_change(), spucc_font_change(), and spucc_num_change().

Referenced by init_spu_decoder_plugin().

## ◆ spucc_update_intrinsics()

static void spucc_update_intrinsics | ( | spucc_decoder_t * | this | ) |
| static

References cc_renderer_update_cfg().

Referenced by spucc_do_init(), spucc_notify_frame_change(), and spudec_decode_data().

## ◆ spudec_decode_data()

static void spudec_decode_data | ( | spu_decoder_t * | this_gen,
|  | buf_element_t * | buf
| ) |  |
| static

References BUF_FLAG_PREVIEW, buf_element_s::content, xine_event_t::data, decode_cc(), buf_element_s::decoder_flags, xine_format_change_data_t::height, buf_element_s::pts, buf_element_s::size, spucc_do_close(), spucc_do_init(), spucc_notify_frame_change(), spucc_update_intrinsics(), xine_event_t::type, xine_format_change_data_t::width, XINE_EVENT_FRAME_FORMAT_CHANGE, xine_event_free(), and xine_event_get().

Referenced by spudec_open_plugin().

## ◆ spudec_discontinuity()

static void spudec_discontinuity | ( | spu_decoder_t * | this_gen | ) |
| static

Referenced by spudec_open_plugin().

## ◆ spudec_dispose()

static void spudec_dispose | ( | spu_decoder_t * | this_gen | ) |
| static

References spucc_do_close(), and xine_event_dispose_queue().

Referenced by spudec_open_plugin().

## ◆ spudec_open_plugin()

static spu_decoder_t * spudec_open_plugin | ( | spu_decoder_class_t * | class,
|  | xine_stream_t * | stream
| ) |  |
| static

References NULL, spudec_decode_data(), spudec_discontinuity(), spudec_dispose(), spudec_reset(), and xine_event_new_queue().

Referenced by init_spu_decoder_plugin().

## ◆ spudec_reset()

static void spudec_reset | ( | spu_decoder_t * | this_gen | ) |
| static

Referenced by spudec_open_plugin().

## Variable Documentation

## ◆ cc_schemes

const char* const cc_schemes[2+1]
| static

Initial value:
= {
"White/Gray/Translucent",
"White/Black/Solid",
NULL
}
NULL
NULL
Definition: xine_plugin.c:78

Referenced by spucc_cfg_scheme_change(), and spucc_register_cfg_vars().

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_SPU_DECODER, 17, "spucc", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_spu_decoder_plugin
static void * init_spu_decoder_plugin(xine_t *xine, const void *data)
Definition: xine_cc_decoder.c:336
spudec_info
static const decoder_info_t spudec_info
Definition: xine_cc_decoder.c:359
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_SPU_DECODER
#define PLUGIN_SPU_DECODER
Definition: xine_plugin.h:34

## ◆ spudec_info

const decoder_info_t spudec_info
| static

Initial value:
= {
.supported_types = supported_types,
.priority = 1,
}
supported_types
static const uint32_t supported_types[]
Definition: xine_cc_decoder.c:357

## ◆ supported_types

const uint32_t supported_types[] = { BUF_SPU_CC, 0 }
| static