mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
libs/gst/base/: Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming thread. Correct log message in gstba...
Original commit message from CVS: * libs/gst/base/gstbasesink.c: * libs/gst/base/gstbasesrc.c: * libs/gst/base/gstbasetransform.c: Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming thread. Correct log message in gstbasesrc.c.
This commit is contained in:
parent
988e0b2da8
commit
55bfc68e93
4 changed files with 14 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
|||
2007-12-13 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* libs/gst/base/gstbasesink.c:
|
||||
* libs/gst/base/gstbasesrc.c:
|
||||
* libs/gst/base/gstbasetransform.c:
|
||||
Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming
|
||||
thread. Correct log message in gstbasesrc.c.
|
||||
|
||||
2007-12-13 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/gstutils.c: (element_find_unconnected_pad):
|
||||
|
|
|
@ -2584,7 +2584,7 @@ gst_base_sink_chain (GstPad * pad, GstBuffer * buf)
|
|||
GstBaseSink *basesink;
|
||||
GstFlowReturn result;
|
||||
|
||||
basesink = GST_BASE_SINK (gst_pad_get_parent (pad));
|
||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
||||
|
||||
if (G_UNLIKELY (basesink->pad_mode != GST_ACTIVATE_PUSH))
|
||||
goto wrong_mode;
|
||||
|
@ -2594,8 +2594,6 @@ gst_base_sink_chain (GstPad * pad, GstBuffer * buf)
|
|||
GST_PAD_PREROLL_UNLOCK (pad);
|
||||
|
||||
done:
|
||||
gst_object_unref (basesink);
|
||||
|
||||
return result;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -2623,7 +2621,7 @@ gst_base_sink_loop (GstPad * pad)
|
|||
GstBuffer *buf = NULL;
|
||||
GstFlowReturn result;
|
||||
|
||||
basesink = GST_BASE_SINK (gst_pad_get_parent (pad));
|
||||
basesink = GST_BASE_SINK (GST_OBJECT_PARENT (pad));
|
||||
|
||||
g_assert (basesink->pad_mode == GST_ACTIVATE_PULL);
|
||||
|
||||
|
@ -2645,8 +2643,6 @@ gst_base_sink_loop (GstPad * pad)
|
|||
if (G_UNLIKELY (result != GST_FLOW_OK))
|
||||
goto paused;
|
||||
|
||||
gst_object_unref (basesink);
|
||||
|
||||
return;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -2665,7 +2661,6 @@ paused:
|
|||
("stream stopped, reason %s", gst_flow_get_name (result)));
|
||||
}
|
||||
}
|
||||
gst_object_unref (basesink);
|
||||
return;
|
||||
}
|
||||
no_buffer:
|
||||
|
|
|
@ -1948,12 +1948,10 @@ gst_base_src_pad_check_get_range (GstPad * pad)
|
|||
GstBaseSrc *src;
|
||||
gboolean res;
|
||||
|
||||
src = GST_BASE_SRC (gst_pad_get_parent (pad));
|
||||
src = GST_BASE_SRC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
res = gst_base_src_check_get_range (src);
|
||||
|
||||
gst_object_unref (src);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1968,7 +1966,7 @@ gst_base_src_loop (GstPad * pad)
|
|||
|
||||
eos = FALSE;
|
||||
|
||||
src = GST_BASE_SRC (gst_pad_get_parent (pad));
|
||||
src = GST_BASE_SRC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
GST_LIVE_LOCK (src);
|
||||
if (src->priv->flushing)
|
||||
|
@ -2056,13 +2054,12 @@ gst_base_src_loop (GstPad * pad)
|
|||
}
|
||||
|
||||
if (eos) {
|
||||
GST_INFO_OBJECT (src, "pausing after EOS");
|
||||
GST_INFO_OBJECT (src, "pausing after end of segment");
|
||||
ret = GST_FLOW_UNEXPECTED;
|
||||
goto pause;
|
||||
}
|
||||
|
||||
done:
|
||||
gst_object_unref (src);
|
||||
return;
|
||||
|
||||
/* special cases */
|
||||
|
|
|
@ -1570,7 +1570,7 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstClockTime last_stop = GST_CLOCK_TIME_NONE;
|
||||
GstBuffer *outbuf = NULL;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
||||
trans = GST_BASE_TRANSFORM (GST_OBJECT_PARENT (pad));
|
||||
|
||||
/* calculate end position of the incoming buffer */
|
||||
if (GST_BUFFER_TIMESTAMP (buffer) != GST_CLOCK_TIME_NONE) {
|
||||
|
@ -1613,8 +1613,6 @@ gst_base_transform_chain (GstPad * pad, GstBuffer * buffer)
|
|||
ret = GST_FLOW_OK;
|
||||
}
|
||||
|
||||
gst_object_unref (trans);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue