xine-lib 1.2.11
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <ctype.h>
#include <xine/buffer.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/osd.h>
#include "xine-engine/bswap.h"
#include "sputext_demuxer.h"
Data Structures | |
struct | sputext_class_s |
struct | video2wnd_s |
struct | sputext_decoder_s |
Macros | |
#define | LOG_MODULE "libsputext" |
#define | LOG_VERBOSE |
#define | SUB_MAX_TEXT 5 /* lines */ |
#define | SUB_BUFSIZE 256 /* chars per line */ |
#define | ALIGN_LEFT 1 |
#define | ALIGN_CENTER 2 |
#define | ALIGN_RIGHT 3 |
#define | ALIGN_BOTTOM 0 |
#define | ALIGN_TOP 4 |
#define | ALIGN_MIDDLE 8 |
#define | GET_X_ALIGNMENT(a) ((a) & 3) |
#define | GET_Y_ALIGNMENT(a) ((a) - ((a) & 3)) |
#define | SPU_PROJECTION_X 384 |
#define | SPU_PROJECTION_Y 288 |
#define | rgb2yuv(R, G, B) ((((((66*R+129*G+25*B+128)>>8)+16)<<8)|(((112*R-94*G-18*B+128)>>8)+128))<<8|(((-38*R-74*G+112*B+128)>>8)+128)) |
Typedefs | |
typedef struct sputext_class_s | sputext_class_t |
typedef struct video2wnd_s | video2wnd_t |
typedef struct sputext_decoder_s | sputext_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 int | update_font (sputext_decoder_t *this) |
static const char * | get_font (sputext_decoder_t *this) |
static void | update_font_size (sputext_decoder_t *this, int force_update) |
static void | update_output_size (sputext_decoder_t *this) |
static int | parse_utf8_size (const void *buf) |
static int | ogm_render_line_internal (sputext_decoder_t *this, int x, int y, const char *text, int render) |
static int | ogm_get_width (sputext_decoder_t *this, char *text) |
static void | ogm_render_line (sputext_decoder_t *this, int x, int y, char *text) |
static void | read_ssa_tag (sputext_decoder_t *this, const char *text, int *alignment, int *sub_x, int *sub_y, int *max_width) |
static int | is_cjk_encoding (const char *enc) |
static void | draw_subtitle (sputext_decoder_t *this, int64_t sub_start, int64_t sub_end) |
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 *class_gen, xine_cfg_entry_t *entry) |
static void | update_osd_font (void *class_gen, xine_cfg_entry_t *entry) |
static void | update_subtitle_size (void *class_gen, xine_cfg_entry_t *entry) |
static void | update_use_unscaled (void *class_gen, xine_cfg_entry_t *entry) |
static spu_decoder_t * | sputext_class_open_plugin (spu_decoder_class_t *class_gen, xine_stream_t *stream) |
static void | sputext_class_dispose (spu_decoder_class_t *class_gen) |
static void | update_src_encoding (void *class_gen, xine_cfg_entry_t *entry) |
static void * | init_spu_decoder_plugin (xine_t *xine, const void *data) |
Variables | |
static const uint32_t | sub_palette [22] |
static const uint8_t | sub_trans [22] |
static const uint32_t | supported_types [] = { BUF_SPU_TEXT, BUF_SPU_OGM, 0 } |
static const decoder_info_t | spudec_info |
const plugin_info_t xine_plugin_info[] | EXPORTED |
#define ALIGN_BOTTOM 0 |
#define ALIGN_CENTER 2 |
#define ALIGN_LEFT 1 |
#define ALIGN_MIDDLE 8 |
#define ALIGN_RIGHT 3 |
#define ALIGN_TOP 4 |
#define GET_X_ALIGNMENT | ( | a | ) | ((a) & 3) |
#define GET_Y_ALIGNMENT | ( | a | ) | ((a) - ((a) & 3)) |
#define LOG_MODULE "libsputext" |
#define LOG_VERBOSE |
#define rgb2yuv | ( | R, | |
G, | |||
B | |||
) | ((((((66*R+129*G+25*B+128)>>8)+16)<<8)|(((112*R-94*G-18*B+128)>>8)+128))<<8|(((-38*R-74*G+112*B+128)>>8)+128)) |
#define SPU_PROJECTION_X 384 |
#define SPU_PROJECTION_Y 288 |
#define SUB_BUFSIZE 256 /* chars per line */ |
#define SUB_MAX_TEXT 5 /* lines */ |
typedef struct sputext_class_s sputext_class_t |
typedef struct sputext_decoder_s sputext_decoder_t |
typedef struct video2wnd_s video2wnd_t |
enum subtitle_size |
|
static |
References _x_assert, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, get_font(), GET_X_ALIGNMENT, GET_Y_ALIGNMENT, height, is_cjk_encoding(), lprintf, NULL, ogm_get_width(), ogm_render_line(), OSD_TEXT1, OSD_TEXT2, read_ssa_tag(), SUB_BUFSIZE, SUB_MAX_TEXT, sub_palette, sub_trans, update_font(), update_font_size(), width, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by spudec_decode_data().
|
inlinestatic |
References update_font().
Referenced by draw_subtitle(), and update_font_size().
|
static |
References _, xine_s::config, sputext_class_s::font, sputext_class_s::font_name_mutex, lprintf, N_, NULL, config_values_s::register_bool, config_values_s::register_enum, config_values_s::register_filename, config_values_s::register_num, config_values_s::register_string, sputext_class_dispose(), sputext_class_open_plugin(), sputext_class_s::src_encoding, update_osd_font(), update_src_encoding(), update_subtitle_size(), update_use_unscaled(), update_vertical_offset(), sputext_class_s::use_unscaled, sputext_class_s::vertical_offset, sputext_class_s::xine, XINE_CONFIG_STRING_IS_FILENAME, and xine_guess_spu_encoding().
|
static |
Referenced by draw_subtitle().
|
inlinestatic |
References ogm_render_line_internal().
Referenced by draw_subtitle().
|
inlinestatic |
References ogm_render_line_internal().
Referenced by draw_subtitle().
|
static |
References OSD_TEXT1, OSD_TEXT2, OSD_TEXT3, and parse_utf8_size().
Referenced by ogm_get_width(), and ogm_render_line().
|
static |
Referenced by ogm_render_line_internal().
|
static |
References ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, GET_X_ALIGNMENT, height, width, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by draw_subtitle().
|
static |
References _x_get_current_info(), _X_ME_32, _x_spu_decoder_sleep(), BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_SPECIAL_CHARSET_ENCODING, BUF_SPU_OGM, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::decoder_info_ptr, draw_subtitle(), extra_info_s::frame_number, height, extra_info_s::input_normpos, extra_info_s::input_time, lprintf, METRONOM_SPU_OFFSET, NULL, OSD_TEXT1, SUB_BUFSIZE, SUB_MAX_TEXT, buf_element_s::type, update_output_size(), VO_PROP_DISCARD_FRAMES, extra_info_s::vpts, width, xine_get_status(), XINE_STATUS_PLAY, xine_usec_sleep(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by sputext_class_open_plugin().
|
static |
Referenced by sputext_class_open_plugin().
|
static |
References _x_freep(), and NULL.
Referenced by sputext_class_open_plugin().
|
static |
References height, lprintf, and width.
Referenced by sputext_class_open_plugin().
|
static |
References _x_freep().
Referenced by init_spu_decoder_plugin().
|
static |
References NULL, spudec_decode_data(), spudec_discontinuity(), spudec_dispose(), and spudec_reset().
Referenced by init_spu_decoder_plugin().
|
inlinestatic |
Referenced by draw_subtitle(), and get_font().
|
static |
References get_font(), height, SUBTITLE_SIZE_NUM, and width.
Referenced by draw_subtitle(), and update_output_size().
|
static |
References sputext_class_s::class, xine_cfg_entry_s::str_value, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by init_spu_decoder_plugin().
|
static |
|
static |
References sputext_class_s::class, sputext_class_s::src_encoding, xine_cfg_entry_s::str_value, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by init_spu_decoder_plugin().
|
static |
References xine_cfg_entry_s::num_value, and sputext_class_s::subtitle_size.
Referenced by init_spu_decoder_plugin().
|
static |
References xine_cfg_entry_s::num_value, and sputext_class_s::use_unscaled.
Referenced by init_spu_decoder_plugin().
|
static |
References xine_cfg_entry_s::num_value, and sputext_class_s::vertical_offset.
Referenced by init_spu_decoder_plugin().
const plugin_info_t xine_plugin_info [] EXPORTED |
|
static |
|
static |
Referenced by draw_subtitle().
|
static |
Referenced by draw_subtitle().
|
static |