mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
gst: Update for link/unlink function API change
This commit is contained in:
parent
1795039dad
commit
b19944d1e4
3 changed files with 15 additions and 21 deletions
|
@ -281,16 +281,14 @@ gst_ogg_mux_ogg_pad_destroy_notify (GstCollectData * data)
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,8 +332,9 @@ static gboolean gst_base_text_overlay_text_event (GstPad * pad,
|
|||
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);
|
||||
|
@ -1680,11 +1681,12 @@ invalid_frame:
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -1692,18 +1694,16 @@ gst_base_text_overlay_text_pad_link (GstPad * pad, GstPad * peer)
|
|||
|
||||
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");
|
||||
|
||||
|
|
|
@ -1993,9 +1993,10 @@ out:
|
|||
}
|
||||
|
||||
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);
|
||||
|
@ -2022,16 +2023,13 @@ gst_subtitle_overlay_subtitle_sink_link (GstPad * pad, GstPad * 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
|
||||
|
@ -2046,8 +2044,6 @@ gst_subtitle_overlay_subtitle_sink_unlink (GstPad * pad)
|
|||
block_subtitle (self);
|
||||
block_video (self);
|
||||
GST_SUBTITLE_OVERLAY_UNLOCK (self);
|
||||
|
||||
gst_object_unref (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue