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

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
cmml_decoder.c File Reference
`#include <xine/xine_internal.h>`

## Data Structures
struct | spucmml_class_s
struct | cmml_anchor_s
struct | spucmml_decoder_s

## Macros
#define | LOG_MODULE "libspucmml"
#define | LOG_VERBOSE
#define | LOG_OSD 0
#define | LOG_SCHEDULING 0
#define | LOG_WIDTH 0
#define | SUB_BUFSIZE 1024
#define | SUB_MAX_TEXT 5

## Typedefs
typedef struct spucmml_class_s | spucmml_class_t
typedef struct cmml_anchor_s | cmml_anchor_t
typedef struct spucmml_decoder_s | spucmml_decoder_t

## Enumerations
enum | subtitle_size { SUBTITLE_SIZE_SMALL = 0 , SUBTITLE_SIZE_NORMAL , SUBTITLE_SIZE_LARGE , SUBTITLE_SIZE_NUM , SUBTITLE_SIZE_TINY = 0 , SUBTITLE_SIZE_SMALL , SUBTITLE_SIZE_NORMAL , SUBTITLE_SIZE_LARGE , SUBTITLE_SIZE_VERY_LARGE , SUBTITLE_SIZE_HUGE , SUBTITLE_SIZE_NUM }

## Functions
static void | update_font_size (spucmml_decoder_t *this)
static int | get_width (spucmml_decoder_t *this, char *text)
static void | render_line (spucmml_decoder_t *this, int x, int y, char *text)
static void | draw_subtitle (spucmml_decoder_t *this, int64_t sub_start)
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 void | update_vertical_offset (void *this_gen, xine_cfg_entry_t *entry)
static void | update_osd_font (void *this_gen, xine_cfg_entry_t *entry)
static spu_decoder_t * | spucmml_class_open_plugin (spu_decoder_class_t *class_gen, xine_stream_t *stream)
static void | update_src_encoding (void *this_gen, xine_cfg_entry_t *entry)
static void | spu_decoder_class_dispose (spu_decoder_class_t *this_gen)
static void * | init_spu_decoder_plugin (xine_t *xine, const void *data)

## Variables
static const uint32_t | supported_types [] = { BUF_SPU_CMML, 0 }
static const decoder_info_t | spudec_info
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "libspucmml"

## ◆ LOG_OSD

#define LOG_OSD 0

## ◆ LOG_SCHEDULING

#define LOG_SCHEDULING 0

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ LOG_WIDTH

#define LOG_WIDTH 0

## ◆ SUB_BUFSIZE

#define SUB_BUFSIZE 1024

## ◆ SUB_MAX_TEXT

#define SUB_MAX_TEXT 5

## Typedef Documentation

## ◆ cmml_anchor_t

typedef struct cmml_anchor_s cmml_anchor_t

## ◆ spucmml_class_t

typedef struct spucmml_class_s spucmml_class_t

## ◆ spucmml_decoder_t

typedef struct spucmml_decoder_s spucmml_decoder_t

## Enumeration Type Documentation

## ◆ subtitle_size

enum subtitle_size

Enumerator
SUBTITLE_SIZE_SMALL |
SUBTITLE_SIZE_NORMAL |
SUBTITLE_SIZE_LARGE |
SUBTITLE_SIZE_NUM |
SUBTITLE_SIZE_TINY |
SUBTITLE_SIZE_SMALL |
SUBTITLE_SIZE_NORMAL |
SUBTITLE_SIZE_LARGE |
SUBTITLE_SIZE_VERY_LARGE |
SUBTITLE_SIZE_HUGE |
SUBTITLE_SIZE_NUM |

## Function Documentation

## ◆ draw_subtitle()

static void draw_subtitle | ( | spucmml_decoder_t * | this,
|  | int64_t | sub_start
| ) |  |
| static

References get_width(), llprintf, LOG_SCHEDULING, OSD_TEXT1, render_line(), and SUB_MAX_TEXT.

Referenced by spudec_decode_data().

## ◆ get_width()

static int get_width | ( | spucmml_decoder_t * | this,
|  | char * | text
| ) |  |
| static

References llprintf, LOG_WIDTH, and width.

Referenced by draw_subtitle().

## ◆ init_spu_decoder_plugin()

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

References _, xine_s::config, N_, NULL, config_values_s::register_string, spu_decoder_class_dispose(), spucmml_class_open_plugin(), and update_src_encoding().

## ◆ render_line()

static void render_line | ( | spucmml_decoder_t * | this,
|  | int | x,
|  | int | y,
|  | char * | text
| ) |  |
| static

References OSD_TEXT1.

Referenced by draw_subtitle().

## ◆ spu_decoder_class_dispose()

static void spu_decoder_class_dispose | ( | spu_decoder_class_t * | this_gen | ) |
| static

Referenced by init_spu_decoder_plugin().

## ◆ spucmml_class_open_plugin()

static spu_decoder_t * spucmml_class_open_plugin | ( | spu_decoder_class_t * | class_gen,
|  | xine_stream_t * | stream
| ) |  |
| static

References _, lprintf, NULL, spudec_decode_data(), spudec_discontinuity(), spudec_dispose(), spudec_reset(), update_osd_font(), update_vertical_offset(), xine_stream_s::video_out, xine_event_create_listener_thread(), and xine_event_new_queue().

Referenced by init_spu_decoder_plugin().

## ◆ spudec_decode_data()

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

References _x_meta_info_set(), xml_node_s::child, buf_element_s::content, xml_node_s::data, draw_subtitle(), lprintf, xml_property_s::name, xml_node_s::name, xml_property_s::next, xml_node_s::next, NULL, xml_node_s::props, buf_element_s::pts, xine_ui_data_t::str, xine_ui_data_t::str_len, SUB_BUFSIZE, xine_event_t::type, update_font_size(), xml_property_s::value, xine_event_send(), XINE_EVENT_UI_SET_TITLE, XINE_META_INFO_TITLE, xml_parser_build_tree_r(), XML_PARSER_CASE_INSENSITIVE, xml_parser_finalize_r(), xml_parser_init_r(), and XML_PARSER_OK.

Referenced by spucmml_class_open_plugin().

## ◆ spudec_discontinuity()

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

Referenced by spucmml_class_open_plugin().

## ◆ spudec_dispose()

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

References xine_s::config, NULL, config_values_s::unregister_callback, config_values_s::xine, and xine_event_dispose_queue().

Referenced by spucmml_class_open_plugin().

## ◆ spudec_reset()

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

Referenced by spucmml_class_open_plugin().

## ◆ update_font_size()

static void update_font_size | ( | spucmml_decoder_t * | this | ) |
| static

References llprintf, LOG_OSD, SUB_MAX_TEXT, and SUBTITLE_SIZE_NUM.

Referenced by spudec_decode_data(), and update_vertical_offset().

## ◆ update_osd_font()

static void update_osd_font | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::str_value.

Referenced by spucmml_class_open_plugin().

## ◆ update_src_encoding()

static void update_src_encoding | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::str_value.

Referenced by init_spu_decoder_plugin().

## ◆ update_vertical_offset()

static void update_vertical_offset | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry
| ) |  |
| static

References xine_cfg_entry_s::num_value, and update_font_size().

Referenced by spucmml_class_open_plugin().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_SPU_DECODER, 17, "spucmml", 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: cmml_decoder.c:523
spudec_info
static const decoder_info_t spudec_info
Definition: cmml_decoder.c:551
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_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: cmml_decoder.c:549

## ◆ supported_types

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