• Sigmund Augdal Helberg's avatar
    All: My shot at improving subtitle rendering in vlc. Now each vout uses a... · 14b3f0cf
    Sigmund Augdal Helberg authored
    All: My shot at improving subtitle rendering in vlc. Now each vout uses a "text renderer" module to render text on the video when needed. I decieded to make this a module type, because other api's (win32 and macosx) is supposed to do better than freetype under some circumstances.
    
    include/video_output.h: added some members needed by text renderer modules
    src/video_output/video_output.c: load and unload text renderer module when needed
    src/video_output/video_text.c: implemented some functions to show text on the video
    include/osd.h: exported the functions to show text
    modules/misc/Modules.am, module/misc/freetype.c: new text renderer module, largly based on the old osdtext module.
    modules/video_filter/Modules.am, modules/video_filter/osd_text.c: removed the osdtext module
    configure.ac: changes "osdtext" to "freetype" some places
    modules/codec/spudec/*: when iconv is available, use it to convert textual subtitles from the encoding given by --sub-encoding to utf8. Use new code to render subtitles
    modules/control/lirc/lirc.c: use new code to give feedback on buttons pressed. untested.
    modules/demux/util/sub.c: remove all traces of the ugly old osdtext module
    modules/misc/dummy/*: added a "text renderer" submodule in the dummy module
    src/misc/modules.c: included osd.h as it seems to be needed to export symbols
    
    
    final notes: you need to give a proper value to --freetype-font. This should be the path to a font file freetype2 can handle (almost any format afaik) with a unicode translation table in it. Windows ttf files will do. In linux at least openoffice distributes some fonts that work. I think macosx and beos also has useable fonts.
    
    14b3f0cf
text.c 4.52 KB