}
static GstPadLinkReturn
-gst_ogg_mux_sinkconnect (GstPad * pad, GstPad * peer)
+gst_ogg_mux_sinkconnect (GstPad * pad, GstObject * parent, GstPad * peer)
{
GstOggMux *ogg_mux;
- ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
+ ogg_mux = GST_OGG_MUX (parent);
GST_DEBUG_OBJECT (ogg_mux, "sinkconnect triggered on %s", GST_PAD_NAME (pad));
- gst_object_unref (ogg_mux);
-
return GST_PAD_LINK_OK;
}
static GstFlowReturn gst_base_text_overlay_text_chain (GstPad * pad,
GstObject * parent, GstBuffer * buffer);
static GstPadLinkReturn gst_base_text_overlay_text_pad_link (GstPad * pad,
- GstPad * peer);
-static void gst_base_text_overlay_text_pad_unlink (GstPad * pad);
+ GstObject * parent, GstPad * peer);
+static void gst_base_text_overlay_text_pad_unlink (GstPad * pad,
+ GstObject * parent);
static void gst_base_text_overlay_pop_text (GstBaseTextOverlay * overlay);
static void gst_base_text_overlay_update_render_mode (GstBaseTextOverlay *
overlay);
}
static GstPadLinkReturn
-gst_base_text_overlay_text_pad_link (GstPad * pad, GstPad * peer)
+gst_base_text_overlay_text_pad_link (GstPad * pad, GstObject * parent,
+ GstPad * peer)
{
GstBaseTextOverlay *overlay;
- overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
+ overlay = GST_BASE_TEXT_OVERLAY (parent);
if (G_UNLIKELY (!overlay))
return GST_PAD_LINK_REFUSED;
overlay->text_linked = TRUE;
- gst_object_unref (overlay);
-
return GST_PAD_LINK_OK;
}
static void
-gst_base_text_overlay_text_pad_unlink (GstPad * pad)
+gst_base_text_overlay_text_pad_unlink (GstPad * pad, GstObject * parent)
{
GstBaseTextOverlay *overlay;
/* don't use gst_pad_get_parent() here, will deadlock */
- overlay = GST_BASE_TEXT_OVERLAY (GST_PAD_PARENT (pad));
+ overlay = GST_BASE_TEXT_OVERLAY (parent);
GST_DEBUG_OBJECT (overlay, "Text pad unlinked");
}
static GstPadLinkReturn
-gst_subtitle_overlay_subtitle_sink_link (GstPad * pad, GstPad * peer)
+gst_subtitle_overlay_subtitle_sink_link (GstPad * pad, GstObject * parent,
+ GstPad * peer)
{
- GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
+ GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
GstCaps *caps;
GST_DEBUG_OBJECT (pad, "Linking pad to peer %" GST_PTR_FORMAT, peer);
gst_caps_unref (caps);
}
- gst_object_unref (self);
-
return GST_PAD_LINK_OK;
}
static void
-gst_subtitle_overlay_subtitle_sink_unlink (GstPad * pad)
+gst_subtitle_overlay_subtitle_sink_unlink (GstPad * pad, GstObject * parent)
{
- GstSubtitleOverlay *self =
- GST_SUBTITLE_OVERLAY (gst_object_ref (GST_PAD_PARENT (pad)));
+ GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
/* FIXME: Can't use gst_pad_get_parent() here because this is called with
* the object lock from state changes
block_subtitle (self);
block_video (self);
GST_SUBTITLE_OVERLAY_UNLOCK (self);
-
- gst_object_unref (self);
}
static gboolean