Mercurial > mplayer.hg
comparison mplayer.c @ 20477:de4a66d99f41
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
author | eugeni |
---|---|
date | Sat, 28 Oct 2006 15:07:18 +0000 |
parents | 0bc1f3c65d9f |
children | 16b90fde05c9 |
comparison
equal
deleted
inserted
replaced
20476:1fd76553550d | 20477:de4a66d99f41 |
---|---|
702 if (vo_font) free_font_desc(vo_font); | 702 if (vo_font) free_font_desc(vo_font); |
703 vo_font = NULL; | 703 vo_font = NULL; |
704 done_freetype(); | 704 done_freetype(); |
705 #endif | 705 #endif |
706 free_osd_list(); | 706 free_osd_list(); |
707 | |
708 #ifdef USE_ASS | |
709 if(ass_enabled) { | |
710 ass_library_done(ass_library); | |
711 } | |
712 #endif | |
707 | 713 |
708 current_module="exit_player"; | 714 current_module="exit_player"; |
709 | 715 |
710 // free mplayer config | 716 // free mplayer config |
711 if(mconfig) | 717 if(mconfig) |
976 } | 982 } |
977 | 983 |
978 subd = sub_read_file(filename, fps); | 984 subd = sub_read_file(filename, fps); |
979 #ifdef USE_ASS | 985 #ifdef USE_ASS |
980 if (ass_enabled) | 986 if (ass_enabled) |
981 asst = ass_read_file(filename); | 987 #ifdef USE_ICONV |
988 asst = ass_read_file(ass_library, filename, sub_cp); | |
989 #else | |
990 asst = ass_read_file(ass_library, filename, 0); | |
991 #endif | |
982 if (ass_enabled && subd && !asst) | 992 if (ass_enabled && subd && !asst) |
983 asst = ass_read_subdata(subd, fps); | 993 asst = ass_read_subdata(ass_library, subd, fps); |
984 | 994 |
985 if (!asst && !subd && !silent) | 995 if (!asst && !subd && !silent) |
986 #else | 996 #else |
987 if(!subd && !silent) | 997 if(!subd && !silent) |
988 #endif | 998 #endif |
3097 } | 3107 } |
3098 #endif | 3108 #endif |
3099 #endif /* USE_OSD */ | 3109 #endif /* USE_OSD */ |
3100 vo_init_osd(); | 3110 vo_init_osd(); |
3101 | 3111 |
3112 #ifdef USE_ASS | |
3113 if(ass_enabled) { | |
3114 char* path = get_path("fonts"); | |
3115 ass_library = ass_library_init(); | |
3116 ass_set_fonts_dir(ass_library, path); | |
3117 ass_set_extract_fonts(ass_library, extract_embedded_fonts); | |
3118 ass_set_style_overrides(ass_library, ass_force_style_list); | |
3119 free(path); | |
3120 } | |
3121 #endif | |
3122 | |
3102 #ifdef HAVE_RTC | 3123 #ifdef HAVE_RTC |
3103 if(!nortc) | 3124 if(!nortc) |
3104 { | 3125 { |
3105 // seteuid(0); /* Can't hurt to try to get root here */ | 3126 // seteuid(0); /* Can't hurt to try to get root here */ |
3106 if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0) | 3127 if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0) |
3880 #endif | 3901 #endif |
3881 sh_video->vfilter=(void*)append_filters(sh_video->vfilter); | 3902 sh_video->vfilter=(void*)append_filters(sh_video->vfilter); |
3882 | 3903 |
3883 #ifdef USE_ASS | 3904 #ifdef USE_ASS |
3884 if (ass_enabled) | 3905 if (ass_enabled) |
3885 ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, 0); | 3906 ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library); |
3886 #endif | 3907 #endif |
3887 | 3908 |
3888 current_module="init_video_codec"; | 3909 current_module="init_video_codec"; |
3889 | 3910 |
3890 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); | 3911 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); |