gst/playback/gstplaybin.c: Remove playbin's override of the set_clock vmethod. It...
authorJan Schmidt <thaytan@mad.scientist.com>
Thu, 22 Mar 2007 17:43:52 +0000 (17:43 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Thu, 22 Mar 2007 17:43:52 +0000 (17:43 +0000)
Original commit message from CVS:
* gst/playback/gstplaybin.c: (gst_play_bin_class_init):
Remove playbin's override of the set_clock vmethod. It's irrelevant
after Wim's commit on the 19th.

ChangeLog
gst/playback/gstplaybin.c

index 32ad8bd..b17159a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-22  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * gst/playback/gstplaybin.c: (gst_play_bin_class_init):
+       Remove playbin's override of the set_clock vmethod. It's irrelevant
+       after Wim's commit on the 19th.
+
 2007-03-22  Wim Taymans  <wim@fluendo.com>
 
        * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_get_size),
index a3b9180..fff5eff 100644 (file)
@@ -337,8 +337,6 @@ static void gst_play_bin_get_property (GObject * object, guint prop_id,
 
 static gboolean gst_play_bin_send_event (GstElement * element,
     GstEvent * event);
-static gboolean gst_play_bin_set_clock_func (GstElement * element,
-    GstClock * clock);
 static GstStateChangeReturn gst_play_bin_change_state (GstElement * element,
     GstStateChange transition);
 
@@ -441,7 +439,6 @@ gst_play_bin_class_init (GstPlayBinClass * klass)
   gstelement_klass->change_state =
       GST_DEBUG_FUNCPTR (gst_play_bin_change_state);
   gstelement_klass->send_event = GST_DEBUG_FUNCPTR (gst_play_bin_send_event);
-  gstelement_klass->set_clock = GST_DEBUG_FUNCPTR (gst_play_bin_set_clock_func);
 
   gstbin_klass->handle_message =
       GST_DEBUG_FUNCPTR (gst_play_bin_handle_message);
@@ -1692,42 +1689,6 @@ gst_play_bin_send_event (GstElement * element, GstEvent * event)
   return res;
 }
 
-/* Override the set_clock function, we don't want to set a clock on the sinks
- * when we are live pipeline so that they don't synchronize until this is
- * fixed in core. */
-static gboolean
-gst_play_bin_set_clock_func (GstElement * element, GstClock * clock)
-{
-  GList *children;
-  GstBin *bin;
-  GstPlayBin *play_bin;
-  gboolean res = TRUE;
-  GstElement *asink, *vsink;
-
-  bin = GST_BIN (element);
-  play_bin = GST_PLAY_BIN (element);
-
-  asink = g_hash_table_lookup (play_bin->cache, "audio_sink");
-  vsink = g_hash_table_lookup (play_bin->cache, "video_sink");
-
-  GST_DEBUG_OBJECT (play_bin, "setting clock, is_live %d", play_bin->is_live);
-
-  GST_OBJECT_LOCK (bin);
-  if (element->clock != clock) {
-    for (children = bin->children; children; children = g_list_next (children)) {
-      GstElement *child = GST_ELEMENT (children->data);
-
-      if (play_bin->is_live && (child == asink || child == vsink))
-        res &= gst_element_set_clock (child, NULL);
-      else
-        res &= gst_element_set_clock (child, clock);
-    }
-  }
-  GST_OBJECT_UNLOCK (bin);
-
-  return res;
-}
-
 static void
 value_list_append_structure_list (GValue * list_val, GstStructure ** first,
     GList * structure_list)