From 9ddeba24077b919820c0bbff7a8870f71455ce76 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 8 Nov 2010 15:45:48 +0200 Subject: [PATCH] rsvgdec: add some minimal logging to track what it is doing --- ext/rsvg/gstrsvgdec.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ext/rsvg/gstrsvgdec.c b/ext/rsvg/gstrsvgdec.c index 5ceb3525b1..032ea54e98 100644 --- a/ext/rsvg/gstrsvgdec.c +++ b/ext/rsvg/gstrsvgdec.c @@ -188,6 +188,8 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size, gdouble scalex, scaley; const gchar *title = NULL, *comment = NULL; + GST_LOG_OBJECT (rsvg, "parsing svg"); + handle = rsvg_handle_new_from_data (data, size, &error); if (!handle) { GST_ERROR_OBJECT (rsvg, "Failed to parse SVG image: %s", error->message); @@ -199,6 +201,8 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size, comment = rsvg_handle_get_desc (handle); if (title || comment) { + GST_LOG_OBJECT (rsvg, "adding tags"); + if (!rsvg->pending_tags) rsvg->pending_tags = gst_tag_list_new (); @@ -215,6 +219,8 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size, GstCaps *caps1, *caps2, *caps3; GstStructure *s; + GST_LOG_OBJECT (rsvg, "resolution changed, updating caps"); + caps1 = gst_caps_copy (gst_pad_get_pad_template_caps (rsvg->srcpad)); caps2 = gst_pad_peer_get_caps (rsvg->srcpad); if (caps2) { @@ -280,6 +286,8 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size, return ret; } + GST_LOG_OBJECT (rsvg, "render image at %d x %d", rsvg->height, rsvg->width); + surface = cairo_image_surface_create_for_data (GST_BUFFER_DATA (*buffer), CAIRO_FORMAT_ARGB32, rsvg->width, rsvg->height, rsvg->width * 4); @@ -348,6 +356,8 @@ gst_rsvg_dec_chain (GstPad * pad, GstBuffer * buffer) if (completed) { GstBuffer *outbuf = NULL; + GST_LOG_OBJECT (rsvg, "have complete svg of %u bytes", size); + data = gst_adapter_peek (rsvg->adapter, size); ret = gst_rsvg_decode_image (rsvg, data, size, &outbuf); @@ -387,6 +397,8 @@ gst_rsvg_dec_chain (GstPad * pad, GstBuffer * buffer) rsvg->pending_tags = NULL; } + GST_LOG_OBJECT (rsvg, "image rendered okay"); + ret = gst_pad_push (rsvg->srcpad, outbuf); if (ret != GST_FLOW_OK) break; -- 2.34.1