xine-lib 1.2.11
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
#include <zlib.h>
#include <sys/types.h>
#include <errno.h>
#include <basedir.h>
#include <xine/xine_internal.h>
#include "xine-engine/bswap.h"
#include <xine/xineutils.h>
#include <xine/video_out.h>
#include <xine/osd.h>
#include "xine_private.h"
Data Structures | |
struct | osd_renderer_private_t |
struct | osd_fontchar_s |
struct | osd_font_s |
Macros | |
#define | LOG_MODULE "osd" |
#define | LOG_VERBOSE |
#define | FONT_VERSION 2 |
#define | ALIAS_CHARACTER_CONV '#' |
#define | ALIAS_CHARACTER_FONT '_' |
#define | UCS2_ENCODING "UCS-2LE" |
#define | KERNING_DEFAULT ft_kerning_default |
#define | FT_LOAD_FLAGS (FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING) |
#define | CLIP0MAX(val, max) { int32_t _v = val; if (_v > (int32_t)(max)) _v = max; _v &= ~(_v >> 31); val = _v; } |
#define | FONT_OVERLAP 1/10 /* overlap between consecutive characters */ |
Typedefs | |
typedef struct osd_fontchar_s | osd_fontchar_t |
Functions | |
static void | osd_free_ft2 (osd_object_t *osd __attr_unused) |
static osd_object_t * | osd_new_object (osd_renderer_t *this, int width, int height) |
static void | osd_set_extent (osd_object_t *osd, int extent_width, int extent_height) |
static void | osd_set_video_window (osd_object_t *osd, int window_x, int window_y, int window_width, int window_height) |
static argb_layer_t * | argb_layer_create () |
static void | argb_layer_destroy (argb_layer_t *argb_layer) |
void | set_argb_layer_ptr (argb_layer_t **dst, argb_layer_t *src) |
static int | _osd_hide (osd_object_t *osd, int64_t vpts) |
static int | _osd_show (osd_object_t *osd, int64_t vpts, int unscaled) |
static int | osd_show_scaled (osd_object_t *osd, int64_t vpts) |
static int | osd_show_unscaled (osd_object_t *osd, int64_t vpts) |
static int | osd_hide (osd_object_t *osd, int64_t vpts) |
static void | osd_clear (osd_object_t *osd) |
static void | _update_clipping (osd_object_t *osd, int x1, int y1, int x2, int y2) |
static void | osd_point (osd_object_t *osd, int x, int y, int color) |
static void | osd_line (osd_object_t *osd, int x1, int y1, int x2, int y2, int color) |
static void | osd_filled_rect (osd_object_t *osd, int x1, int y1, int x2, int y2, int color) |
static void | osd_set_palette (osd_object_t *osd, const uint32_t *color, const uint8_t *trans) |
static void | osd_set_text_palette (osd_object_t *osd, int palette_number, int color_base) |
static void | osd_get_palette (osd_object_t *osd, uint32_t *color, uint8_t *trans) |
static void | osd_set_position (osd_object_t *osd, int x, int y) |
static int | osd_renderer_load_font (osd_renderer_t *this, const char *filename) |
static int | osd_renderer_unload_font (osd_renderer_t *this, const char *fontname) |
static int | osd_lookup_native (osd_object_t *osd, const char *fontname, int size) |
static int | osd_set_font (osd_object_t *osd, const char *fontname, int size) |
static int | osd_search (osd_fontchar_t *array, size_t n, uint16_t code) |
static void | osd_free_encoding (osd_object_t *osd) |
static int | osd_set_encoding (osd_object_t *osd, const char *encoding) |
static int | osd_render_text (osd_object_t *osd, int x1, int y1, const char *text, int color_base) |
static int | osd_get_text_size (osd_object_t *osd, const char *text, int *width, int *height) |
static void | osd_free_object (osd_object_t *osd_to_close) |
static void | osd_renderer_close (osd_renderer_t *this_gen) |
static void | update_text_palette (void *this_gen, xine_cfg_entry_t *entry) |
static void | osd_draw_bitmap (osd_object_t *osd, const uint8_t *bitmap, int x1, int y1, int width, int height, const uint8_t *palette_map) |
static void | osd_set_argb_buffer (osd_object_t *osd, uint32_t *argb_buffer, int dirty_x, int dirty_y, int dirty_width, int dirty_height) |
static uint32_t | osd_get_capabilities (osd_object_t *osd) |
osd_renderer_t * | _x_osd_renderer_init (xine_stream_t *stream) |
Variables | |
static const char *const | textpalettes_str [NUMBER_OF_TEXT_PALETTES+1] |
static const clut_t | textpalettes_color [NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] |
static const uint8_t | textpalettes_trans [NUMBER_OF_TEXT_PALETTES][TEXT_PALETTE_SIZE] |
#define ALIAS_CHARACTER_CONV '#' |
#define ALIAS_CHARACTER_FONT '_' |
#define CLIP0MAX | ( | val, | |
max | |||
) | { int32_t _v = val; if (_v > (int32_t)(max)) _v = max; _v &= ~(_v >> 31); val = _v; } |
#define FONT_OVERLAP 1/10 /* overlap between consecutive characters */ |
#define FONT_VERSION 2 |
#define FT_LOAD_FLAGS (FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING) |
#define KERNING_DEFAULT ft_kerning_default |
#define LOG_MODULE "osd" |
#define LOG_VERBOSE |
#define UCS2_ENCODING "UCS-2LE" |
typedef struct osd_fontchar_s osd_fontchar_t |
|
static |
References video_overlay_manager_s::add_event, osd_object_s::handle, lprintf, OVERLAY_EVENT_HIDE, and osd_object_s::renderer.
Referenced by _osd_show(), and osd_hide().
|
static |
References _osd_hide(), xine_ticket_s::acquire, osd_object_s::area_touched, osd_object_s::argb_layer, CLIP0MAX, osd_object_s::display_x, osd_object_s::display_y, osd_object_s::extent_height, osd_object_s::extent_width, osd_object_s::handle, osd_object_s::height, lprintf, NULL, OVERLAY_EVENT_SHOW, xine_private_t::port_ticket, xine_ticket_s::release, osd_object_s::renderer, set_argb_layer_ptr(), osd_object_s::video_window_height, osd_object_s::video_window_width, osd_object_s::video_window_x, osd_object_s::video_window_y, osd_object_s::width, osd_object_s::x1, osd_object_s::x2, osd_object_s::y1, and osd_object_s::y2.
Referenced by osd_show_scaled(), and osd_show_unscaled().
|
static |
References osd_object_s::area_touched, MAX, MIN, osd_object_s::x1, osd_object_s::x2, osd_object_s::y1, and osd_object_s::y2.
Referenced by osd_draw_bitmap(), osd_filled_rect(), osd_line(), and osd_point().
osd_renderer_t * _x_osd_renderer_init | ( | xine_stream_t * | stream | ) |
References _, xine_s::basedir_handle, xine_s::config, osd_font_s::filename, lprintf, osd_font_s::name, osd_font_s::next, NULL, osd_clear(), osd_draw_bitmap(), osd_filled_rect(), osd_free_object(), osd_get_capabilities(), osd_get_palette(), osd_get_text_size(), osd_hide(), osd_line(), osd_new_object(), osd_point(), osd_render_text(), osd_renderer_close(), osd_set_argb_buffer(), osd_set_encoding(), osd_set_extent(), osd_set_font(), osd_set_palette(), osd_set_position(), osd_set_text_palette(), osd_set_video_window(), osd_show_scaled(), osd_show_unscaled(), PACKAGE, config_values_s::register_enum, osd_font_s::size, textpalettes_str, update_text_palette(), xine_stream_s::xine, xine_str2uint32(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by xine_stream_new().
|
static |
References argb_layer_s::mutex, and NULL.
Referenced by osd_set_argb_buffer().
|
static |
References argb_layer_s::mutex.
Referenced by set_argb_layer_ptr().
|
static |
References osd_object_s::area, osd_object_s::area_touched, osd_object_s::argb_layer, osd_object_s::height, lprintf, argb_layer_s::mutex, osd_object_s::width, osd_object_s::x1, argb_layer_s::x1, osd_object_s::x2, argb_layer_s::x2, osd_object_s::y1, argb_layer_s::y1, osd_object_s::y2, and argb_layer_s::y2.
Referenced by _x_osd_renderer_init().
|
static |
References _update_clipping(), osd_object_s::area, height, lprintf, osd_object_s::width, and width.
Referenced by _x_osd_renderer_init(), and vdr_execute_rpc_command().
|
static |
References _update_clipping(), osd_object_s::area, osd_object_s::height, lprintf, MAX, MIN, and osd_object_s::width.
Referenced by _x_osd_renderer_init().
|
static |
References _x_freep(), and iconv_close.
Referenced by osd_free_object(), and osd_set_encoding().
|
inlinestatic |
Referenced by osd_free_object().
|
static |
References _x_freep(), xine_ticket_s::acquire, osd_object_s::argb_layer, osd_object_s::handle, NULL, osd_free_encoding(), osd_free_ft2(), osd_hide(), OVERLAY_EVENT_FREE_HANDLE, xine_private_t::port_ticket, xine_ticket_s::release, osd_object_s::renderer, and set_argb_layer_ptr().
Referenced by _x_osd_renderer_init(), and osd_renderer_close().
|
static |
References xine_ticket_s::acquire, xine_private_t::port_ticket, xine_ticket_s::release, osd_object_s::renderer, VO_CAP_ARGB_LAYER_OVERLAY, VO_CAP_CUSTOM_EXTENT_OVERLAY, VO_CAP_UNSCALED_OVERLAY, VO_CAP_VIDEO_WINDOW_OVERLAY, XINE_OSD_CAP_ARGB_LAYER, XINE_OSD_CAP_CUSTOM_EXTENT, XINE_OSD_CAP_FREETYPE2, XINE_OSD_CAP_UNSCALED, and XINE_OSD_CAP_VIDEO_WINDOW.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::color, and osd_object_s::trans.
Referenced by _x_osd_renderer_init().
|
static |
References _, osd_object_s::font, FONT_OVERLAP, osd_font_s::fontchar, osd_object_s::ft2, height, osd_fontchar_s::height, ICONV_CONST, KERNING_DEFAULT, lprintf, osd_font_s::num_fontchars, osd_search(), osd_object_s::renderer, osd_font_s::size, width, osd_fontchar_s::width, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _x_osd_renderer_init().
|
static |
References _osd_hide(), xine_ticket_s::acquire, xine_private_t::port_ticket, xine_ticket_s::release, and osd_object_s::renderer.
Referenced by _x_osd_renderer_init(), osd_free_object(), and vdr_execute_rpc_command().
|
static |
References _update_clipping(), osd_object_s::area, osd_object_s::height, height, lprintf, osd_object_s::width, and width.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::font, osd_renderer_s::fonts, lprintf, osd_font_s::name, osd_font_s::next, osd_object_s::renderer, and osd_font_s::size.
Referenced by osd_set_font().
|
static |
References osd_object_s::area, osd_object_s::area_touched, osd_object_s::color, osd_object_s::extent_height, osd_object_s::extent_width, osd_object_s::handle, osd_object_s::height, height, lprintf, osd_object_s::next, NULL, osd_object_s::renderer, textpalettes_color, textpalettes_trans, osd_object_s::trans, osd_object_s::video_window_height, osd_object_s::video_window_width, osd_object_s::video_window_x, osd_object_s::video_window_y, osd_object_s::width, width, osd_object_s::x1, osd_object_s::x2, osd_object_s::y1, and osd_object_s::y2.
Referenced by _x_osd_renderer_init().
|
static |
References _update_clipping(), osd_object_s::area, osd_object_s::height, lprintf, and osd_object_s::width.
Referenced by _x_osd_renderer_init().
|
static |
References _, osd_object_s::area, osd_object_s::area_touched, osd_fontchar_s::bmp, osd_fontchar_s::code, osd_object_s::font, FONT_OVERLAP, osd_font_s::fontchar, osd_object_s::ft2, FT_LOAD_FLAGS, osd_object_s::height, height, osd_fontchar_s::height, ICONV_CONST, KERNING_DEFAULT, lprintf, osd_font_s::name, osd_font_s::num_fontchars, osd_search(), OVL_PALETTE_SIZE, osd_object_s::renderer, osd_font_s::size, TEXT_PALETTE_SIZE, osd_object_s::width, osd_fontchar_s::width, osd_object_s::x1, osd_object_s::x2, XINE_VERBOSITY_LOG, xprintf, osd_object_s::y1, and osd_object_s::y2.
Referenced by _x_osd_renderer_init().
|
static |
References _x_freep(), xine_s::config, NULL, osd_free_object(), osd_renderer_unload_font(), and config_values_s::unregister_callbacks.
Referenced by _x_osd_renderer_init().
|
static |
References _, _X_LE_16, osd_fontchar_s::bmp, osd_fontchar_s::code, osd_font_s::data, osd_font_s::filename, FONT_VERSION, osd_font_s::fontchar, osd_fontchar_s::height, osd_font_s::loaded, lprintf, osd_font_s::name, osd_font_s::next, NULL, osd_font_s::num_fontchars, osd_font_s::size, osd_font_s::version, osd_fontchar_s::width, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by osd_set_font().
|
static |
References _x_freep(), osd_fontchar_s::bmp, osd_font_s::data, osd_object_s::font, osd_font_s::fontchar, osd_font_s::loaded, lprintf, osd_font_s::name, osd_object_s::next, osd_font_s::next, NULL, and osd_font_s::num_fontchars.
Referenced by osd_renderer_close().
|
static |
References ALIAS_CHARACTER_FONT, and code.
Referenced by osd_get_text_size(), and osd_render_text().
|
static |
References osd_object_s::argb_layer, argb_layer_create(), argb_layer_s::buffer, osd_object_s::height, MAX, MIN, argb_layer_s::mutex, set_argb_layer_ptr(), osd_object_s::width, osd_object_s::x1, argb_layer_s::x1, osd_object_s::x2, argb_layer_s::x2, osd_object_s::y1, argb_layer_s::y1, osd_object_s::y2, and argb_layer_s::y2.
Referenced by _x_osd_renderer_init().
|
static |
References _, iconv_open, lprintf, NULL, osd_free_encoding(), osd_object_s::renderer, osd_renderer_s::stream, UCS2_ENCODING, xine_stream_s::xine, xine_get_system_encoding(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::extent_height, and osd_object_s::extent_width.
Referenced by _x_osd_renderer_init().
|
static |
References osd_font_s::filename, osd_object_s::font, osd_font_s::loaded, lprintf, NULL, osd_lookup_native(), osd_renderer_s::osd_mutex, osd_renderer_load_font(), and osd_object_s::renderer.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::color, and osd_object_s::trans.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::display_x, and osd_object_s::display_y.
Referenced by _x_osd_renderer_init(), and vdr_execute_rpc_command().
|
static |
References osd_object_s::color, OVL_PALETTE_SIZE, osd_object_s::renderer, TEXT_PALETTE_SIZE, osd_renderer_s::textpalette, textpalettes_color, textpalettes_trans, and osd_object_s::trans.
Referenced by _x_osd_renderer_init().
|
static |
References osd_object_s::video_window_height, osd_object_s::video_window_width, osd_object_s::video_window_x, and osd_object_s::video_window_y.
Referenced by _x_osd_renderer_init().
|
static |
References _osd_show().
Referenced by _x_osd_renderer_init().
|
static |
References _osd_show().
Referenced by _x_osd_renderer_init().
void set_argb_layer_ptr | ( | argb_layer_t ** | dst, |
argb_layer_t * | src | ||
) |
References argb_layer_destroy(), argb_layer_s::mutex, and argb_layer_s::ref_count.
Referenced by _osd_show(), internal_video_overlay_free_handle(), osd_free_object(), osd_set_argb_buffer(), and video_overlay_event().
|
static |
References lprintf, xine_cfg_entry_s::num_value, and textpalettes_str.
Referenced by _x_osd_renderer_init().
|
static |
Referenced by osd_new_object(), and osd_set_text_palette().
|
static |
Referenced by _x_osd_renderer_init(), and update_text_palette().
|
static |
Referenced by osd_new_object(), and osd_set_text_palette().