mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
rsvg: Stop using deprecated API when compiling with RSVG 2.35.0 or newer
This commit is contained in:
parent
a6be944da9
commit
a04d8a0d42
4 changed files with 9 additions and 30 deletions
|
@ -1495,7 +1495,13 @@ AG_GST_CHECK_FEATURE(PVR, [pvrvideosink], pvr, [
|
|||
dnl *** rsvg ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_RSVG, true)
|
||||
AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [
|
||||
PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.14 cairo, HAVE_RSVG="yes", [
|
||||
PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.14 cairo, [
|
||||
HAVE_RSVG="yes"
|
||||
PKG_CHECK_MODULES(RSVG_2_35_0, librsvg-2.0 >= 2.35.0, HAVE_RSVG_2_35_0="yes", HAVE_RSVG_2_35_0="no")
|
||||
if test "x$HAVE_RSVG_2_35_0" = "xyes"; then
|
||||
AC_DEFINE(HAVE_RSVG_2_35_0, [1], [Have RSVG 2.35.0 or newer])
|
||||
fi
|
||||
], [
|
||||
HAVE_RSVG="no"
|
||||
])
|
||||
AC_SUBST(RSVG_CFLAGS)
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
#ifndef HAVE_RSVG_2_35_0
|
||||
rsvg_init ();
|
||||
#endif
|
||||
|
||||
return (gst_element_register (plugin, "rsvgoverlay",
|
||||
GST_RANK_NONE, GST_TYPE_RSVG_OVERLAY)
|
||||
|
|
|
@ -150,11 +150,6 @@ gst_rsvg_dec_reset (GstRsvgDec * dec)
|
|||
g_list_foreach (dec->pending_events, (GFunc) gst_mini_object_unref, NULL);
|
||||
g_list_free (dec->pending_events);
|
||||
dec->pending_events = NULL;
|
||||
|
||||
if (dec->pending_tags) {
|
||||
gst_tag_list_free (dec->pending_tags);
|
||||
dec->pending_tags = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#define CAIRO_UNPREMULTIPLY(a,r,g,b) G_STMT_START { \
|
||||
|
@ -198,7 +193,6 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size,
|
|||
GError *error = NULL;
|
||||
RsvgDimensionData dimension;
|
||||
gdouble scalex, scaley;
|
||||
const gchar *title = NULL, *comment = NULL;
|
||||
|
||||
GST_LOG_OBJECT (rsvg, "parsing svg");
|
||||
|
||||
|
@ -209,23 +203,6 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, const guint8 * data, guint size,
|
|||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
title = rsvg_handle_get_title (handle);
|
||||
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 ();
|
||||
|
||||
if (title && *title)
|
||||
gst_tag_list_add (rsvg->pending_tags, GST_TAG_MERGE_REPLACE_ALL,
|
||||
GST_TAG_TITLE, title, NULL);
|
||||
if (comment && *comment)
|
||||
gst_tag_list_add (rsvg->pending_tags, GST_TAG_MERGE_REPLACE_ALL,
|
||||
GST_TAG_COMMENT, comment, NULL);
|
||||
}
|
||||
|
||||
rsvg_handle_get_dimensions (handle, &dimension);
|
||||
if (rsvg->width != dimension.width || rsvg->height != dimension.height) {
|
||||
GstCaps *caps1, *caps2, *caps3;
|
||||
|
@ -429,11 +406,6 @@ gst_rsvg_dec_chain (GstPad * pad, GstBuffer * buffer)
|
|||
rsvg->pending_events = NULL;
|
||||
}
|
||||
|
||||
if (rsvg->pending_tags) {
|
||||
gst_element_found_tags (GST_ELEMENT_CAST (rsvg), rsvg->pending_tags);
|
||||
rsvg->pending_tags = NULL;
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (rsvg, "image rendered okay");
|
||||
|
||||
ret = gst_pad_push (rsvg->srcpad, outbuf);
|
||||
|
|
|
@ -55,7 +55,6 @@ struct _GstRsvgDec
|
|||
gint width, height;
|
||||
|
||||
GList *pending_events;
|
||||
GstTagList *pending_tags;
|
||||
|
||||
gint fps_n, fps_d;
|
||||
GstClockTime first_timestamp;
|
||||
|
|
Loading…
Reference in a new issue