r32015 - in trunk: eosd.c eosd.h
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 */
On Thu, Aug 26, 2010 at 01:20:51PM +0200, cigaes wrote:
Log: Add #ifdefs to fix build with ASS disabled.
This message does not match ..
--- 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_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 *);
.. these changes. Why did you mix independent changes in one commit? You should never do this and now you should at least update the commit message. Diego
On Sun, Aug 29, 2010 at 12:52:00PM +0200, Diego Biurrun wrote:
On Thu, Aug 26, 2010 at 01:20:51PM +0200, cigaes wrote:
Log: Add #ifdefs to fix build with ASS disabled.
This message does not match ..
--- 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_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 *);
.. these changes.
Why did you mix independent changes in one commit? You should never do this and now you should at least update the commit message.
Well, they were both compilation fixes for the case where ASS is disabled, and both were small, so I think having the together is ok, but it's not so good that the commit message only matches half the commit.
Le duodi 12 fructidor, an CCXVIII, Reimar Döffinger a écrit :
Well, they were both compilation fixes for the case where ASS is disabled, and both were small, so I think having the together is ok, but it's not so good that the commit message only matches half the commit.
Would this be better: ? Fix compilation with ASS disabled. Use pointers to struct instead of typedef types and surround code with #ifdef. Regards, -- Nicolas George
On Sun, Aug 29, 2010 at 09:40:53PM +0200, Nicolas George wrote:
Le duodi 12 fructidor, an CCXVIII, Reimar Döffinger a écrit :
Well, they were both compilation fixes for the case where ASS is disabled, and both were small, so I think having the together is ok, but it's not so good that the commit message only matches half the commit.
Would this be better: ?
Fix compilation with ASS disabled. Use pointers to struct instead of typedef types and surround code with #ifdef.
Yes. Diego
participants (4)
-
cigaes -
Diego Biurrun -
Nicolas George -
Reimar Döffinger