From: Stefan Kost Date: Thu, 13 Dec 2007 16:49:54 +0000 (+0000) Subject: libs/gst/base/: Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming... X-Git-Tag: RELEASE-0_10_16~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55bfc68e93e56b23e687dd47d8a021210e45d3d4;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4e5565a..f0f3a81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-12-13 Stefan Kost + + * 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 * gst/gstutils.c: (element_find_unconnected_pad): diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 629af60..ae0ff22 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -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: diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 23dcaee..a295569 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -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 */ diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index 57b23ac..3205e52 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -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; }