
Data Structures | |
| struct | font_stack_t |
| struct | ft_style_t |
| struct | offscreen_bitmap_t |
| struct | filter_sys_t |
| filter_sys_t: chroma method descriptor More... | |
Defines | |
| #define | DisposeCMProfileIterateUPP(a) DisposeCMProfileIterateUPP(CMProfileIterateUPP userUPP __attribute__((unused))) |
| #define | DisposeCMMIterateUPP(a) DisposeCMMIterateUPP(CMProfileIterateUPP userUPP __attribute__((unused))) |
| #define | __MACHINEEXCEPTIONS__ |
| #define | DEFAULT_FONT "Arial Black" |
| #define | DEFAULT_FONT_COLOR 0xffffff |
| #define | DEFAULT_REL_FONT_SIZE 16 |
| #define | VERTICAL_MARGIN 3 |
| #define | HORIZONTAL_MARGIN 10 |
| #define | FONT_TEXT N_("Font") |
| #define | FONT_LONGTEXT N_("Name for the font you want to use") |
| #define | FONTSIZER_TEXT N_("Relative font size") |
| #define | FONTSIZER_LONGTEXT |
| #define | COLOR_TEXT N_("Text default color") |
| #define | COLOR_LONGTEXT |
Typedefs | |
| typedef struct font_stack_t | font_stack_t |
| typedef struct offscreen_bitmap_t | offscreen_bitmap_t |
Functions | |
| static int | Create (vlc_object_t *) |
| static void | Destroy (vlc_object_t *) |
| static int | LoadFontsFromAttachments (filter_t *p_filter) |
| static int | RenderText (filter_t *, subpicture_region_t *, subpicture_region_t *) |
| static int | RenderHtml (filter_t *, subpicture_region_t *, subpicture_region_t *) |
| static int | GetFontSize (filter_t *p_filter) |
| static int | RenderYUVA (filter_t *p_filter, subpicture_region_t *p_region, CFMutableAttributedStringRef p_attrString) |
| static void | setFontAttibutes (char *psz_fontname, int i_font_size, uint32_t i_font_color, bool b_bold, bool b_italic, bool b_underline, CFRange p_range, CFMutableAttributedStringRef p_attrString) |
| int | vlc_entry__main (module_t *p_module) |
| const char * | vlc_entry_license__main (void) |
| static char * | EliminateCRLF (char *psz_string) |
| static int | PushFont (font_stack_t **p_font, const char *psz_name, int i_size, uint32_t i_color) |
| static int | PopFont (font_stack_t **p_font) |
| static int | PeekFont (font_stack_t **p_font, char **psz_name, int *i_size, uint32_t *i_color) |
| static int | HandleFontAttributes (xml_reader_t *p_xml_reader, font_stack_t **p_fonts, int i_scale) |
| static void | GetAttrStrFromFontStack (font_stack_t **p_fonts, bool b_bold, bool b_italic, bool b_uline, CFRange p_range, CFMutableAttributedStringRef p_attrString) |
| static int | ProcessNodes (filter_t *p_filter, xml_reader_t *p_xml_reader, text_style_t *p_font_style, CFMutableAttributedStringRef p_attrString) |
| static CGContextRef | CreateOffScreenContext (int i_width, int i_height, offscreen_bitmap_t **pp_memory, CGColorSpaceRef *pp_colorSpace) |
| static offscreen_bitmap_t * | Compose (int i_text_align, CFMutableAttributedStringRef p_attrString, unsigned i_width, unsigned i_height, unsigned *pi_textblock_height) |
Variables | |
| static const int | pi_color_values [] |
| static const char *const | ppsz_color_descriptions [] |
| static const int | pi_sizes [] = { 20, 18, 16, 12, 6 } |
| static const char *const | ppsz_sizes_text [] |
| #define __MACHINEEXCEPTIONS__ |
| #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 "Arial Black" |
| #define DEFAULT_FONT_COLOR 0xffffff |
| #define DEFAULT_REL_FONT_SIZE 16 |
Referenced by GetFontSize().
| #define DisposeCMMIterateUPP | ( | a | ) | DisposeCMMIterateUPP(CMProfileIterateUPP userUPP __attribute__((unused))) |
| #define DisposeCMProfileIterateUPP | ( | a | ) | DisposeCMProfileIterateUPP(CMProfileIterateUPP userUPP __attribute__((unused))) |
| #define FONT_LONGTEXT N_("Name for the font you want to use") |
| #define FONT_TEXT N_("Font") |
| #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 overriden." )
| #define FONTSIZER_TEXT N_("Relative font size") |
| #define HORIZONTAL_MARGIN 10 |
Referenced by Compose().
| #define VERTICAL_MARGIN 3 |
Referenced by Compose(), and RenderYUVA().
| typedef struct font_stack_t font_stack_t |
| typedef struct offscreen_bitmap_t offscreen_bitmap_t |
| static offscreen_bitmap_t* Compose | ( | int | i_text_align, | |
| CFMutableAttributedStringRef | p_attrString, | |||
| unsigned | i_width, | |||
| unsigned | i_height, | |||
| unsigned * | pi_textblock_height | |||
| ) | [static] |
References CreateOffScreenContext(), HORIZONTAL_MARGIN, i, gen_builder::line, SUBPICTURE_ALIGN_LEFT, SUBPICTURE_ALIGN_RIGHT, and VERTICAL_MARGIN.
Referenced by RenderYUVA().
| static int Create | ( | vlc_object_t * | p_this | ) | [static] |
References __MAX, __MIN, GetFontSize(), filter_sys_t::i_font_color, filter_sys_t::i_font_opacity, filter_sys_t::i_font_size, filter_sys_t::i_fonts, LoadFontsFromAttachments(), filter_sys_t::p_fonts, filter_t::p_sys, p_sys, filter_sys_t::psz_font_name, RenderHtml(), RenderText(), var_CreateGetInteger, var_CreateGetString, VLC_ENOMEM, and VLC_SUCCESS.
| static CGContextRef CreateOffScreenContext | ( | int | i_width, | |
| int | i_height, | |||
| offscreen_bitmap_t ** | pp_memory, | |||
| CGColorSpaceRef * | pp_colorSpace | |||
| ) | [static] |
| static void Destroy | ( | vlc_object_t * | p_this | ) | [static] |
References filter_sys_t::i_fonts, filter_sys_t::p_fonts, filter_t::p_sys, p_sys, and filter_sys_t::psz_font_name.
| static char* EliminateCRLF | ( | char * | psz_string | ) | [static] |
Referenced by RenderText().
| static void GetAttrStrFromFontStack | ( | font_stack_t ** | p_fonts, | |
| bool | b_bold, | |||
| bool | b_italic, | |||
| bool | b_uline, | |||
| CFRange | p_range, | |||
| CFMutableAttributedStringRef | p_attrString | |||
| ) | [static] |
| static int GetFontSize | ( | filter_t * | p_filter | ) | [static] |
References DEFAULT_REL_FONT_SIZE, filter_t::fmt_out, video_format_t::i_height, and es_format_t::video.
| static int HandleFontAttributes | ( | xml_reader_t * | p_xml_reader, | |
| font_stack_t ** | p_fonts, | |||
| int | i_scale | |||
| ) | [static] |
References i_value, PeekFont(), psz_name, psz_value, PushFont(), strcasecmp(), strdup(), VLC_SUCCESS, xml_ReaderName, xml_ReaderNextAttr, and xml_ReaderValue.
Referenced by ProcessNodes().
| static int LoadFontsFromAttachments | ( | filter_t * | p_filter | ) | [static] |
References FIND_PARENT, input_attachment_t::i_data, filter_sys_t::i_fonts, input_Control(), INPUT_GET_ATTACHMENTS, input_attachment_t::p_data, filter_sys_t::p_fonts, filter_t::p_sys, p_sys, 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.
| static int PeekFont | ( | font_stack_t ** | p_font, | |
| char ** | psz_name, | |||
| int * | i_size, | |||
| uint32_t * | i_color | |||
| ) | [static] |
References font_stack_t::i_color, font_stack_t::i_size, font_stack_t::p_next, font_stack_t::psz_name, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by GetAttrStrFromFontStack(), and HandleFontAttributes().
| static int PopFont | ( | font_stack_t ** | p_font | ) | [static] |
References font_stack_t::p_next, font_stack_t::psz_name, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by ProcessNodes().
| static int ProcessNodes | ( | filter_t * | p_filter, | |
| xml_reader_t * | p_xml_reader, | |||
| text_style_t * | p_font_style, | |||
| CFMutableAttributedStringRef | p_attrString | |||
| ) | [static] |
References GetAttrStrFromFontStack(), HandleFontAttributes(), text_style_t::i_font_alpha, filter_sys_t::i_font_color, text_style_t::i_font_color, filter_sys_t::i_font_size, text_style_t::i_font_size, vlc_value_t::i_int, text_style_t::i_style_flags, filter_t::p_sys, p_sys, PopFont(), filter_sys_t::psz_font_name, text_style_t::psz_fontname, PushFont(), strcasecmp(), STYLE_BOLD, STYLE_ITALIC, STYLE_UNDERLINE, var_Get, VLC_SUCCESS, XML_READER_ENDELEM, XML_READER_NONE, XML_READER_STARTELEM, XML_READER_TEXT, xml_ReaderName, xml_ReaderNodeType, xml_ReaderRead, and xml_ReaderValue.
Referenced by RenderHtml().
| static int PushFont | ( | font_stack_t ** | p_font, | |
| const char * | psz_name, | |||
| int | i_size, | |||
| uint32_t | i_color | |||
| ) | [static] |
References font_stack_t::i_color, font_stack_t::i_size, font_stack_t::p_next, font_stack_t::psz_name, strdup(), VLC_EGENERIC, VLC_ENOMEM, and VLC_SUCCESS.
Referenced by HandleFontAttributes(), and ProcessNodes().
| static int RenderHtml | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region_out, | |||
| subpicture_region_t * | p_region_in | |||
| ) | [static] |
References GetFontSize(), filter_sys_t::i_font_size, subpicture_region_t::i_x, subpicture_region_t::i_y, subpicture_region_t::p_style, filter_t::p_sys, ProcessNodes(), subpicture_region_t::psz_html, RenderYUVA(), strcasecmp(), stream_Delete(), stream_MemoryNew, var_SetBool, VLC_EGENERIC, VLC_OBJECT, VLC_SUCCESS, xml_Create, xml_Delete(), xml_ReaderCreate, xml_ReaderDelete, xml_ReaderName, and xml_ReaderRead.
Referenced by Create().
| static int RenderText | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region_out, | |||
| subpicture_region_t * | p_region_in | |||
| ) | [static] |
References __MAX, __MIN, EliminateCRLF(), GetFontSize(), 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, filter_sys_t::i_font_size, vlc_value_t::i_int, text_style_t::i_style_flags, subpicture_region_t::i_x, subpicture_region_t::i_y, msg_Warn, subpicture_region_t::p_style, filter_t::p_sys, p_sys, filter_sys_t::psz_font_name, subpicture_region_t::psz_text, RenderYUVA(), setFontAttibutes(), STYLE_BOLD, STYLE_ITALIC, STYLE_UNDERLINE, var_Get, VLC_EGENERIC, and VLC_SUCCESS.
| static int RenderYUVA | ( | filter_t * | p_filter, | |
| subpicture_region_t * | p_region, | |||
| CFMutableAttributedStringRef | p_attrString | |||
| ) | [static] |
References __MIN, Compose(), subpicture_region_t::fmt, filter_t::fmt_out, subpicture_region_t::i_align, offscreen_bitmap_t::i_bytesPerPixel, offscreen_bitmap_t::i_bytesPerRow, video_format_t::i_chroma, video_format_t::i_height, i_height, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, video_format_t::i_x_offset, video_format_t::i_y_offset, msg_Err, offscreen_bitmap_t::p_data, subpicture_region_t::p_picture, picture_NewFromFormat(), VERTICAL_MARGIN, es_format_t::video, VLC_CODEC_YUVA, VLC_EGENERIC, and VLC_SUCCESS.
| static void setFontAttibutes | ( | char * | psz_fontname, | |
| int | i_font_size, | |||
| uint32_t | i_font_color, | |||
| bool | b_bold, | |||
| bool | b_italic, | |||
| bool | b_underline, | |||
| CFRange | p_range, | |||
| CFMutableAttributedStringRef | p_attrString | |||
| ) | [static] |
Referenced by GetAttrStrFromFontStack(), and RenderText().
| int vlc_entry__main | ( | module_t * | p_module | ) |
| const char* vlc_entry_license__main | ( | void | ) |
const int pi_color_values[] [static] |
Initial value:
{
0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000,
0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080,
0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }
const int pi_sizes[] = { 20, 18, 16, 12, 6 } [static] |
const char* const ppsz_color_descriptions[] [static] |
const char* const ppsz_sizes_text[] [static] |
1.5.6