libs/gst/base/: Replace gst_pad_get_parent by GST_OBJECT_PARENT inside streaming...
authorStefan Kost <ensonic@users.sourceforge.net>
Thu, 13 Dec 2007 16:49:54 +0000 (16:49 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Thu, 13 Dec 2007 16:49:54 +0000 (16:49 +0000)
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.

ChangeLog
libs/gst/base/gstbasesink.c
libs/gst/base/gstbasesrc.c
libs/gst/base/gstbasetransform.c

index 4e5565a..f0f3a81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
index 629af60..ae0ff22 100644 (file)
@@ -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:
index 23dcaee..a295569 100644 (file)
@@ -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 */
index 57b23ac..3205e52 100644 (file)
@@ -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;
 }