
Data Structures | |
| struct | line_desc_t |
| struct | ft_style_t |
| struct | filter_sys_t |
| filter_sys_t: chroma method descriptor More... | |
Defines | |
| #define | FT_FLOOR(X) ((X & -64) >> 6) |
| #define | FT_CEIL(X) (((X + 63) & -64) >> 6) |
| #define | FT_MulFix(v, s) (((v)*(s))>>16) |
| #define | DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf" |
| #define | FC_DEFAULT_FONT "Serif Bold" |
| #define | FONT_TEXT N_("Font") |
| #define | FONT_LONGTEXT N_("Font file for the font you want to use") |
| #define | FONTSIZE_TEXT N_("Font size in pixels") |
| #define | FONTSIZE_LONGTEXT |
| #define | OPACITY_TEXT N_("Opacity") |
| #define | OPACITY_LONGTEXT |
| #define | COLOR_TEXT N_("Text default color") |
| #define | COLOR_LONGTEXT |
| #define | FONTSIZER_TEXT N_("Relative font size") |
| #define | FONTSIZER_LONGTEXT |
| #define | YUVP_TEXT N_("Use YUVP renderer") |
| #define | YUVP_LONGTEXT |
| #define | EFFECT_TEXT N_("Font Effect") |
| #define | EFFECT_LONGTEXT |
| #define | EFFECT_BACKGROUND 1 |
| #define | EFFECT_OUTLINE 2 |
| #define | EFFECT_OUTLINE_FAT 3 |
| #define | UCHAR uint32_t |
| #define | TR_DEFAULT_FONT p_sys->psz_fontfamily |
| #define | TR_FONT_STYLE_PTR ft_style_t * |
| #define | face p_sys->p_face |
| #define | glyph face->glyph |
Typedefs | |
| typedef struct line_desc_t | line_desc_t |
Functions | |
| static int | Create (vlc_object_t *) |
| static void | Destroy (vlc_object_t *) |
| int | vlc_entry__main (module_t *p_module) |
| const char * | vlc_entry_license__main (void) |
| static int | RenderText (filter_t *p_filter, subpicture_region_t *p_region_out, subpicture_region_t *p_region_in) |
| This function renders a text subpicture region into another one. | |
| static int | LoadFontsFromAttachments (filter_t *p_filter) |
| static int | GetFontSize (filter_t *p_filter) |
| static int | SetFontSize (filter_t *, int) |
| static void | YUVFromRGB (uint32_t i_argb, uint8_t *pi_y, uint8_t *pi_u, uint8_t *pi_v) |
| static line_desc_t * | NewLine (int) |
| static int | Render (filter_t *, subpicture_region_t *, line_desc_t *, int, int) |
| static void | FreeLines (line_desc_t *) |
| static void | FreeLine (line_desc_t *) |
| static void | UnderlineGlyphYUVA (int i_line_thickness, int i_line_offset, bool b_ul_next_char, FT_BitmapGlyph p_this_glyph, FT_Vector *p_this_glyph_pos, FT_BitmapGlyph p_next_glyph, FT_Vector *p_next_glyph_pos, int i_glyph_tmax, int i_align_offset, uint8_t i_y, uint8_t i_u, uint8_t i_v, subpicture_region_t *p_region) |
| static void | DrawBlack (line_desc_t *p_line, int i_width, subpicture_region_t *p_region, int xoffset, int yoffset) |
| static int | RenderYUVA (filter_t *p_filter, subpicture_region_t *p_region, line_desc_t *p_line, int i_width, int i_height) |
| static void | SetupLine (filter_t *p_filter, const char *psz_text_in, uint32_t **psz_text_out, uint32_t *pi_runs, uint32_t **ppi_run_lengths, ft_style_t ***ppp_styles, ft_style_t *p_style) |
| static ft_style_t * | GetStyleFromFontStack (filter_sys_t *p_sys, font_stack_t **p_fonts, bool b_bold, bool b_italic, bool b_uline, bool b_through) |
Variables | |
| static const int | pi_sizes [] = { 20, 18, 16, 12, 6 } |
| static const char *const | ppsz_sizes_text [] |
| static int const | pi_effects [] = { 1, 2, 3 } |
| static const char *const | ppsz_effects_text [] |
| static const int | pi_color_values [] |
| static const char *const | ppsz_color_descriptions [] |
| #define COLOR_LONGTEXT |
Value:
N_("The color of the text that will be rendered on "\ "the video. This must be an hexadecimal (like HTML colors). The first two "\ "chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\ " #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" )
| #define COLOR_TEXT N_("Text default color") |
| #define DEFAULT_FONT "/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf" |
| #define EFFECT_BACKGROUND 1 |
Referenced by RenderYUVA().
| #define EFFECT_LONGTEXT |
Value:
N_("It is possible to apply effects to the rendered " \ "text to improve its readability." )
| #define EFFECT_OUTLINE 2 |
Referenced by RenderYUVA().
| #define EFFECT_OUTLINE_FAT 3 |
Referenced by RenderYUVA().
| #define EFFECT_TEXT N_("Font Effect") |
| #define face p_sys->p_face |
Referenced by RenderText().
| #define FC_DEFAULT_FONT "Serif Bold" |
| #define FONT_LONGTEXT N_("Font file for the font you want to use") |
| #define FONT_TEXT N_("Font") |
| #define FONTSIZE_LONGTEXT |
Value:
N_("This is the default size of the fonts " \ "that will be rendered on the video. " \ "If set to something different than 0 this option will override the " \ "relative font size." )
| #define FONTSIZE_TEXT N_("Font size in pixels") |
| #define FONTSIZER_LONGTEXT |
Value:
N_("This is the relative default size of the " \ "fonts that will be rendered on the video. If absolute font size is set, "\ "relative size will be overridden." )
| #define FONTSIZER_TEXT N_("Relative font size") |
| #define FT_CEIL | ( | X | ) | (((X + 63) & -64) >> 6) |
| #define FT_FLOOR | ( | X | ) | ((X & -64) >> 6) |
| #define FT_MulFix | ( | v, | |||
| s | ) | (((v)*(s))>>16) |
| #define glyph face->glyph |
Referenced by FT2Font::drawString(), and RenderText().
| #define OPACITY_LONGTEXT |
Value:
N_("The opacity (inverse of transparency) of the " \ "text that will be rendered on the video. 0 = transparent, " \ "255 = totally opaque. " )
| #define OPACITY_TEXT N_("Opacity") |
| #define TR_DEFAULT_FONT p_sys->psz_fontfamily |
Referenced by ProcessNodes().
| #define TR_FONT_STYLE_PTR ft_style_t * |
| #define UCHAR uint32_t |
Referenced by ProcessNodes().
| #define YUVP_LONGTEXT |
Value:
N_("This renders the font using \"paletized YUV\". " \ "This option is only needed if you want to encode into DVB subtitles" )
| #define YUVP_TEXT N_("Use YUVP renderer") |
| typedef struct line_desc_t line_desc_t |
| static int Create | ( | vlc_object_t * | p_this | ) | [static] |
References _, __MAX, __MIN, asprintf(), dialog_ProgressCreate, dialog_ProgressDestroy(), dialog_ProgressSet(), filter_sys_t::i_default_font_size, filter_sys_t::i_display_height, filter_sys_t::i_effect, filter_sys_t::i_font_attachments, filter_sys_t::i_font_color, filter_sys_t::i_font_opacity, filter_sys_t::i_font_size, filter_sys_t::i_use_kerning, LoadFontsFromAttachments(), mdate(), msg_Dbg, msg_Err, filter_sys_t::p_face, filter_sys_t::p_library, filter_t::p_sys, p_sys, filter_sys_t::pp_font_attachments, RenderHtml(), RenderText(), SetFontSize(), strdup(), var_Create, var_CreateGetInteger, var_CreateGetString, VLC_EGENERIC, VLC_ENOMEM, VLC_SUCCESS, VLC_VAR_DOINHERIT, and VLC_VAR_INTEGER.
| static void Destroy | ( | vlc_object_t * | p_this | ) | [static] |
| static void DrawBlack | ( | line_desc_t * | p_line, | |
| int | i_width, | |||
| subpicture_region_t * | p_region, | |||
| int | xoffset, | |||
| int | yoffset | |||
| ) | [static] |
| static void FreeLine | ( | line_desc_t * | p_line | ) | [static] |
| static void FreeLines | ( | line_desc_t * | p_lines | ) | [static] |
| static int GetFontSize | ( | filter_t * | p_filter | ) | [static] |
References filter_t::fmt_out, filter_sys_t::i_default_font_size, filter_sys_t::i_display_height, video_format_t::i_height, vlc_value_t::i_int, msg_Warn, filter_t::p_sys, var_Get, es_format_t::video, and VLC_SUCCESS.
Referenced by Create(), RenderHtml(), RenderText(), and SetFontSize().
| static ft_style_t* GetStyleFromFontStack | ( | filter_sys_t * | p_sys, | |
| font_stack_t ** | p_fonts, | |||
| bool | b_bold, | |||
| bool | b_italic, | |||
| bool | b_uline, | |||
| bool | b_through | |||
| ) | [static] |
| static int LoadFontsFromAttachments | ( | filter_t * | p_filter | ) | [static] |
References FIND_PARENT, input_attachment_t::i_data, filter_sys_t::i_font_attachments, input_Control(), INPUT_GET_ATTACHMENTS, input_attachment_t::p_data, filter_t::p_sys, p_sys, filter_sys_t::pp_font_attachments, input_attachment_t::psz_mime, VLC_EGENERIC, VLC_ENOMEM, vlc_input_attachment_Delete(), vlc_object_find, VLC_OBJECT_INPUT, vlc_object_release, and VLC_SUCCESS.
Referenced by Create().
| static line_desc_t * NewLine | ( | int | i_count | ) | [static] |
References line_desc_t::b_new_color_mode, line_desc_t::i_height, line_desc_t::i_width, line_desc_t::p_bg_rgb, line_desc_t::p_fg_bg_ratio, line_desc_t::p_fg_rgb, line_desc_t::p_glyph_pos, line_desc_t::p_next, line_desc_t::pi_underline_offset, line_desc_t::pi_underline_thickness, and line_desc_t::pp_glyphs.
Referenced by RenderText().
| static int Render | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region, | |||
| line_desc_t * | p_line, | |||
| int | i_width, | |||
| int | i_height | |||
| ) | [static] |
References __MAX, subpicture_region_t::fmt, i, subpicture_region_t::i_align, line_desc_t::i_alpha, line_desc_t::i_blue, video_format_t::i_chroma, video_palette_t::i_entries, line_desc_t::i_green, video_format_t::i_height, line_desc_t::i_red, video_format_t::i_visible_height, video_format_t::i_visible_width, line_desc_t::i_width, video_format_t::i_width, video_format_t::i_x_offset, video_format_t::i_y_offset, p_dst, line_desc_t::p_glyph_pos, line_desc_t::p_next, video_format_t::p_palette, subpicture_region_t::p_picture, video_palette_t::palette, pi_gamma, picture_NewFromFormat(), line_desc_t::pp_glyphs, SUBPICTURE_ALIGN_LEFT, SUBPICTURE_ALIGN_RIGHT, VLC_CODEC_YUVP, VLC_EGENERIC, VLC_SUCCESS, and VLC_UNUSED.
| static int RenderText | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region_out, | |||
| subpicture_region_t * | p_region_in | |||
| ) | [static] |
This function renders a text subpicture region into another one.
It also calculates the size needed for this string, and renders the needed glyphs into memory. It is used as pf_add_string callback in the vout method by this module
References __MAX, __MIN, face, filter_t::fmt_out, FreeLine(), FreeLines(), glyph, i, filter_sys_t::i_default_font_size, text_style_t::i_font_alpha, filter_sys_t::i_font_color, text_style_t::i_font_color, filter_sys_t::i_font_opacity, text_style_t::i_font_size, vlc_value_t::i_int, filter_sys_t::i_use_kerning, video_format_t::i_visible_width, line_desc_t::i_width, subpicture_region_t::i_x, subpicture_region_t::i_y, gen_builder::line, msg_Dbg, msg_Err, msg_Warn, NewLine(), line_desc_t::p_next, subpicture_region_t::p_style, filter_t::p_sys, p_sys, subpicture_region_t::psz_text, Render(), RenderYUVA(), SetFontSize(), var_Get, var_InheritBool, es_format_t::video, VLC_EGENERIC, vlc_iconv(), vlc_iconv_close(), vlc_iconv_open(), and VLC_SUCCESS.
| static int RenderYUVA | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region, | |||
| line_desc_t * | p_line, | |||
| int | i_width, | |||
| int | i_height | |||
| ) | [static] |
References __MAX, line_desc_t::b_new_color_mode, DrawBlack(), EFFECT_BACKGROUND, EFFECT_OUTLINE, EFFECT_OUTLINE_FAT, subpicture_region_t::fmt, i, subpicture_region_t::i_align, line_desc_t::i_alpha, line_desc_t::i_blue, video_format_t::i_chroma, filter_sys_t::i_effect, line_desc_t::i_green, video_format_t::i_height, line_desc_t::i_red, video_format_t::i_visible_height, video_format_t::i_visible_width, line_desc_t::i_width, video_format_t::i_width, video_format_t::i_x_offset, video_format_t::i_y_offset, line_desc_t::p_bg_rgb, line_desc_t::p_fg_bg_ratio, line_desc_t::p_fg_rgb, line_desc_t::p_glyph_pos, line_desc_t::p_next, subpicture_region_t::p_picture, filter_t::p_sys, line_desc_t::pi_underline_offset, line_desc_t::pi_underline_thickness, picture_NewFromFormat(), line_desc_t::pp_glyphs, SUBPICTURE_ALIGN_LEFT, SUBPICTURE_ALIGN_RIGHT, UnderlineGlyphYUVA(), VLC_CODEC_YUVA, VLC_EGENERIC, VLC_SUCCESS, and YUVFromRGB().
Referenced by RenderHtml(), and RenderText().
| static int SetFontSize | ( | filter_t * | p_filter, | |
| int | i_size | |||
| ) | [static] |
References GetFontSize(), filter_sys_t::i_font_size, msg_Dbg, msg_Err, filter_sys_t::p_face, filter_t::p_sys, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by Create(), and RenderText().
| static void SetupLine | ( | filter_t * | p_filter, | |
| const char * | psz_text_in, | |||
| uint32_t ** | psz_text_out, | |||
| uint32_t * | pi_runs, | |||
| uint32_t ** | ppi_run_lengths, | |||
| ft_style_t *** | ppp_styles, | |||
| ft_style_t * | p_style | |||
| ) | [static] |
| static void UnderlineGlyphYUVA | ( | int | i_line_thickness, | |
| int | i_line_offset, | |||
| bool | b_ul_next_char, | |||
| FT_BitmapGlyph | p_this_glyph, | |||
| FT_Vector * | p_this_glyph_pos, | |||
| FT_BitmapGlyph | p_next_glyph, | |||
| FT_Vector * | p_next_glyph_pos, | |||
| int | i_glyph_tmax, | |||
| int | i_align_offset, | |||
| uint8_t | i_y, | |||
| uint8_t | i_u, | |||
| uint8_t | i_v, | |||
| subpicture_region_t * | p_region | |||
| ) | [static] |
| int vlc_entry__main | ( | module_t * | p_module | ) |
| const char* vlc_entry_license__main | ( | void | ) |
| static void YUVFromRGB | ( | uint32_t | i_argb, | |
| uint8_t * | pi_y, | |||
| uint8_t * | pi_u, | |||
| uint8_t * | pi_v | |||
| ) | [static] |
const int pi_color_values[] [static] |
Initial value:
{
0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000,
0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080,
0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }
int const pi_effects[] = { 1, 2, 3 } [static] |
const int pi_sizes[] = { 20, 18, 16, 12, 6 } [static] |
const char* const ppsz_color_descriptions[] [static] |
const char* const ppsz_effects_text[] [static] |
const char* const ppsz_sizes_text[] [static] |
1.5.6