Exemplo n.º 1
0
 VideoWidget::~VideoWidget()
 {
     if (notifier_ && video_playback_bin_ && on_element_added_g_signal_)
     {
         fs_element_added_notifier_remove(notifier_, GST_BIN(video_playback_bin_));
         g_signal_handler_disconnect(notifier_, on_element_added_g_signal_);
     }
     if (bus_ && on_sync_message_g_signal_)
         g_signal_handler_disconnect(bus_, on_sync_message_g_signal_);
     if (bus_)
     {
         g_object_unref(bus_);
         bus_ = 0;
     }
     if (video_playback_bin_)
     {
         g_object_unref(video_playback_bin_);
         video_playback_bin_ = 0;
     }
     if (video_playback_element_)
         video_playback_element_ = 0;
     if (video_overlay_)
         video_overlay_ = 0;
 }
Exemplo n.º 2
0
static gboolean
skype_audio_stream_deinit_stream (SkypeBaseStream *self, gpointer stream)
{
  SkypeAudioStreamPrivate *priv = SKYPE_AUDIO_STREAM (self)->priv;
  FsuConference *fsuconf;
  gboolean ret = TRUE;

  g_object_get (G_OBJECT (stream), "fsu-conference", &fsuconf, NULL);

  if (fsuconf != NULL)
    {
      FsConference *fsconf;

      g_object_get (G_OBJECT (fsuconf), "fs-conference", &fsconf, NULL);

      g_object_unref (fsuconf);

      if (fsconf == NULL)
        {
          g_warning ("Error fetching FsConference");
          ret = FALSE;
        }
      else
        {
          fs_element_added_notifier_remove (priv->notifier, GST_BIN (fsconf));

          g_object_unref (fsconf);
        }
    }
  else
    {
      g_warning ("Error fetching FsuConference");
      ret = FALSE;
    }

  if (priv->volume_id != NULL)
    {
      FsuFilterManager *manager;

      g_object_get (G_OBJECT (stream),
          "filter-manager", &manager, NULL);

      if (manager == NULL)
        {
          g_warning ("Error fetching FsuFilterManager");
          ret = FALSE;
        }
      else
        {
          if (!fsu_filter_manager_remove_filter (manager,
              priv->volume_id))
            {
              g_warning ("Error removing volume filter");
              ret = FALSE;
            }

          g_object_unref (manager);
          priv->volume_id = NULL;
        }
    }

  if (priv->event_queue != NULL)
    {
      while (!g_queue_is_empty (priv->event_queue))
        {
          g_slice_free (DTMFQueueEvent, g_queue_pop_head (priv->event_queue));
        }

      g_queue_free (priv->event_queue);
      priv->event_queue = NULL;
    }

  if (priv->dtmfsrc != NULL)
    {
      gst_object_unref (priv->dtmfsrc);
      priv->dtmfsrc = NULL;
    }

  g_object_unref (priv->stream);
  priv->stream = NULL;
  return ret;
}