GNOME Bugzilla – Bug 305524
Cairo plugin does not compile with cairo 0.5
Last modified: 2005-06-11 14:48:40 UTC
Please describe the problem: The cairo guys changed their API again, which causes the cairo gst-plugin to fail when compiling. I've looked in the source, but couldn't find an easy-fix thing to get it to compile. The new cairo_create() API and the omiting of the set_surface functions makes cairo not compatible with the design the current plugin is implemented. Steps to reproduce: 1. Install cairo 0.5 2. Try to compile gst-plugins with cairo plugin enabled 3. observe error Actual results: gsttimeoverlay.c: In function `gst_timeoverlay_setup': gsttimeoverlay.c:211: error: too few arguments to function `cairo_create' gsttimeoverlay.c:213: warning: implicit declaration of function `cairo_set_rgb_color_REPLACED_BY_cairo_set_source_rgb' gsttimeoverlay.c:215: warning: implicit declaration of function `cairo_select_font_REPLACED_BY_cairo_select_font_face' gsttimeoverlay.c:216: warning: implicit declaration of function `cairo_scale_font_REPLACED_BY_cairo_set_font_size' gsttimeoverlay.c:218: warning: implicit declaration of function `cairo_current_font_extents_REPLACED_BY_cairo_font_extents' gsttimeoverlay.c: In function `gst_timeoverlay_planar411': gsttimeoverlay.c:269: warning: implicit declaration of function `cairo_set_target_image_DEPRECATED_BY_cairo_image_surface_create_for_data' gsttimeoverlay.c:274: warning: implicit declaration of function `cairo_set_alpha_DEPRECATED_BY_cairo_set_source_rgba_OR_cairo_paint_with_alpha' gsttimeoverlay.c:276: error: `CAIRO_OPERATOR_SRC' undeclared (first use in this function) gsttimeoverlay.c:276: error: (Each undeclared identifier is reported only once gsttimeoverlay.c:276: error: for each function it appears in.) Expected results: Does this happen every time? Other information:
*** Bug 307036 has been marked as a duplicate of this bug. ***
*** Bug 307147 has been marked as a duplicate of this bug. ***
http://bugzilla.gnome.org/show_bug.cgi?id=307147 contains a patch.
The patch from #307147 still has a gcc4 related problem: cc1: warnings being treated as errors gsttimeoverlay.c: In function 'gst_timeoverlay_planar411': gsttimeoverlay.c:269: warning: pointer targets in passing argument 1 of 'cairo_image_surface_create_for_data' differ in signedness gsttimeoverlay.c:281: warning: pointer targets in passing argument 2 of 'cairo_text_extents' differ in signedness gsttimeoverlay.c:285: warning: pointer targets in passing argument 2 of 'cairo_show_text' differ in signedness make[3]: *** [libgstcairo_la-gsttimeoverlay.lo] Error 1 make[3]: Leaving directory `/mnt/extra/Sources/gst-plugins/ext/cairo' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/mnt/extra/Sources/gst-plugins/ext' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/mnt/extra/Sources/gst-plugins' make: *** [all] Error 2
Fixed in CVS. I've opened bug #307289 to track the remaining issues. 2005-06-11 Tim-Philipp Müller <tim at centricular dot net> * configure.ac: Require cairo 0.5.x * ext/cairo/gstcairo.c: Change plugin name to 'cairo' - 'timeoverlay' doesn't make much sense and conflicts with the pango timeoverlay plugin. * ext/cairo/gsttextoverlay.c: (gst_cairotextoverlay_get_type), (gst_textoverlay_render_text), (gst_textoverlay_loop), (gst_textoverlay_font_init), (gst_textoverlay_finalize), (gst_textoverlay_init), (gst_textoverlay_set_property): * ext/cairo/gsttextoverlay.h: * ext/cairo/gsttimeoverlay.c: (gst_cairotimeoverlay_get_type), (gst_timeoverlay_class_init), (gst_timeoverlay_setup), (gst_timeoverlay_planar411): * ext/cairo/gsttimeoverlay.h: Make compile and somewhat work with cairo 0.5. The textoverlay plugin is bitrotten and/or unfinished though and needs more work (text positioning, invalid memory access, parse font-desc property properly). Cheers -Tim