[MPlayer-cvslog] r32015 - in trunk: eosd.c eosd.h
cigaes
subversion at mplayerhq.hu
Thu Aug 26 13:20:51 CEST 2010
Author: cigaes
Date: Thu Aug 26 13:20:50 2010
New Revision: 32015
Log:
Add #ifdefs to fix build with ASS disabled.
Modified:
trunk/eosd.c
trunk/eosd.h
Modified: trunk/eosd.c
==============================================================================
--- trunk/eosd.c Wed Aug 25 18:34:39 2010 (r32014)
+++ trunk/eosd.c Thu Aug 26 13:20:50 2010 (r32015)
@@ -26,6 +26,7 @@
#include "libass/ass_mp.h"
#include "eosd.h"
+#ifdef CONFIG_ASS
static ASS_Renderer *ass_renderer;
int prev_visibility;
@@ -35,6 +36,7 @@ void eosd_ass_init(ASS_Library *ass_libr
if (!ass_renderer) return;
ass_configure_fonts(ass_renderer);
}
+#endif
void eosd_init(vf_instance_t *vf)
{
@@ -43,28 +45,34 @@ void eosd_init(vf_instance_t *vf)
void eosd_configure(mp_eosd_res_t *res, int hinting)
{
+#ifdef CONFIG_ASS
double dar = (double) (res->w - res->ml - res->mr) / (res->h - res->mt - res->mb);
if (ass_renderer) {
ass_configure(ass_renderer, res->w, res->h, hinting);
ass_set_margins(ass_renderer, res->mt, res->mb, res->ml, res->mr);
ass_set_aspect_ratio(ass_renderer, dar, (double)res->srcw/res->srch);
}
+#endif
}
ASS_Image *eosd_render_frame(double ts, int *changed)
{
ASS_Image *r = NULL;
+#ifdef CONFIG_ASS
if (sub_visibility && ass_renderer && ass_track && ts != MP_NOPTS_VALUE) {
r = ass_mp_render_frame(ass_renderer, ass_track, (ts+sub_delay) * 1000 + .5, changed);
if (!prev_visibility && changed)
*changed = 2;
}
prev_visibility = sub_visibility;
+#endif
return r;
}
void eosd_uninit(void)
{
+#ifdef CONFIG_ASS
if (ass_renderer)
ass_renderer_done(ass_renderer);
+#endif
}
Modified: trunk/eosd.h
==============================================================================
--- trunk/eosd.h Wed Aug 25 18:34:39 2010 (r32014)
+++ trunk/eosd.h Thu Aug 26 13:20:50 2010 (r32015)
@@ -25,9 +25,9 @@
void eosd_init(vf_instance_t *);
void eosd_configure(mp_eosd_res_t *, int);
-ASS_Image *eosd_render_frame(double, int *);
+struct ass_image *eosd_render_frame(double, int *);
void eosd_uninit(void);
-void eosd_ass_init(ASS_Library *);
+void eosd_ass_init(struct ass_library *);
#endif /* MPLAYER_EOSD_H */
More information about the MPlayer-cvslog
mailing list