diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-28 15:07:18 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-28 15:07:18 +0000 |
commit | efea99c2c9e8ea1f5a96a1cb86aa30ef05b6b828 (patch) | |
tree | d51dab1b5c89a9d2b15e52cdcc987c2d71f7ae44 /mplayer.c | |
parent | a383ad29ea73bb4383d088d04265ec53d931f257 (diff) | |
download | mpv-efea99c2c9e8ea1f5a96a1cb86aa30ef05b6b828.tar.bz2 mpv-efea99c2c9e8ea1f5a96a1cb86aa30ef05b6b828.tar.xz |
Libass interface reworked:
- ass_instance_t renamed to ass_renderer_t
- ass_library_t introduced
- use of mplayer-specific global variables limited to ass_mp.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20493 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -705,6 +705,12 @@ static void exit_player_with_rc(const char* how, int rc){ #endif free_osd_list(); +#ifdef USE_ASS +if(ass_enabled) { + ass_library_done(ass_library); +} +#endif + current_module="exit_player"; // free mplayer config @@ -978,9 +984,13 @@ void add_subtitles(char *filename, float fps, int silent) subd = sub_read_file(filename, fps); #ifdef USE_ASS if (ass_enabled) - asst = ass_read_file(filename); +#ifdef USE_ICONV + asst = ass_read_file(ass_library, filename, sub_cp); +#else + asst = ass_read_file(ass_library, filename, 0); +#endif if (ass_enabled && subd && !asst) - asst = ass_read_subdata(subd, fps); + asst = ass_read_subdata(ass_library, subd, fps); if (!asst && !subd && !silent) #else @@ -3099,6 +3109,17 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ #endif /* USE_OSD */ vo_init_osd(); +#ifdef USE_ASS +if(ass_enabled) { + char* path = get_path("fonts"); + ass_library = ass_library_init(); + ass_set_fonts_dir(ass_library, path); + ass_set_extract_fonts(ass_library, extract_embedded_fonts); + ass_set_style_overrides(ass_library, ass_force_style_list); + free(path); +} +#endif + #ifdef HAVE_RTC if(!nortc) { @@ -3882,7 +3903,7 @@ sh_video->vfilter=(void*)append_filters(sh_video->vfilter); #ifdef USE_ASS if (ass_enabled) - ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, 0); + ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library); #endif current_module="init_video_codec"; |