add: GST_DEBUG ("Retrieving xoverlay from bin ...");
context: bvw_update_interface_implementations (BaconVideoWidget *bvw){  GstColorBalance *old_balance = bvw->priv->balance;  GstXOverlay *old_xoverlay = bvw->priv->xoverlay;  GConfValue *confvalue;  GstElement *video_sink = NULL;  GstElement *element = NULL;  GstIteratorResult ires;  GstIterator *iter;  gint i;  g_object_get (bvw->priv->play, "video-sink", &video_sink, NULL);  g_assert (video_sink != NULL);  /* We try to get an element supporting XOverlay interface */  if (GST_IS_BIN (video_sink)) {    element = gst_bin_get_by_interface (GST_BIN (video_sink),                                        GST_TYPE_X_OVERLAY);  } else {    element = video_sink;  }  if (GST_IS_X_OVERLAY (element)) {    GST_DEBUG ("Found xoverlay: %s", GST_OBJECT_NAME (element));    bvw->priv->xoverlay = GST_X_OVERLAY (element);  } else {    GST_DEBUG ("No xoverlay found");    bvw->priv->xoverlay = NULL;  }  /* Find best color balance element (using custom iterator so   * we can prefer hardware implementations to software ones) */  /* FIXME: this doesn't work reliably yet, most of the time   * the fold function doesn't even get called, while sometimes   * it does ... */  iter = gst_bin_iterate_all_by_interface (GST_BIN (bvw->priv->play),                                           GST_TYPE_COLOR_BALANCE);  /* naively assume no resync */  element = NULL;  ires = gst_iterator_fold (iter,      (GstIteratorFoldFunction) find_colorbalance_element, NULL, &element);  gst_iterator_free (iter);  if (element) {    bvw->priv->balance = GST_COLOR_BALANCE (element);    GST_DEBUG ("Best colorbalance found: %s",        GST_OBJECT_NAME (bvw->priv->balance));  } else if (GST_IS_COLOR_BALANCE (bvw->priv->xoverlay)) {    bvw->priv->balance = GST_COLOR_BALANCE (bvw->priv->xoverlay);    GST_DEBUG ("Colorbalance backup found: %s",        GST_OBJECT_NAME (bvw->priv->balance));  } else {    GST_DEBUG ("No colorbalance found");    bvw->priv->balance = NULL;  }  /* Setup brightness and contrast */  for (i = 0; i < 4; i++) {    confvalue = gconf_client_get_without_default (bvw->priv->gc,        video_props_str[i], NULL);    if (confvalue != NULL) {      bacon_video_widget_set_video_property (bvw, i,        gconf_value_get_int (confvalue));      gconf_value_free (confvalue);    }  }  if (old_xoverlay)    gst_object_unref (GST_OBJECT (old_xoverlay));  if (old_balance)    gst_object_unref (GST_OBJECT (old_balance));  gst_object_unref (video_sink);}