Beispiel #1
0
void
empathy_call_handler_bus_message (EmpathyCallHandler *handler,
  GstBus *bus, GstMessage *message)
{
  EmpathyCallHandlerPriv *priv = GET_PRIV (handler);

  if (priv->tfchannel == NULL)
    return;

  tf_channel_bus_message (priv->tfchannel, message);
}
Beispiel #2
0
 // Link bus events to tf_channel_
 gboolean FarsightChannel::busWatch(GstBus *bus, GstMessage *message, FarsightChannel *self)
 {
     try
     {
         if(self->tf_channel_ == NULL) 
         {
             LogWarning("CommunicationModule: receiving bus message when tf_channel_ is NULL");
             return FALSE;
         }
         tf_channel_bus_message(self->tf_channel_, message);
         return TRUE;
     } catch(...)
     {
         LogWarning("CommunicationModule: passing gstreamer bus message to telepathy-farsight failed");
         return FALSE;
     }
 }
static gboolean
mex_telepathy_channel_on_bus_watch (GstBus     *bus,
                                    GstMessage *message,
                                    gpointer    user_data)
{
  MexTelepathyChannel *self = MEX_TELEPATHY_CHANNEL (user_data);
  MexTelepathyChannelPrivate *priv = self->priv;

  if (priv->tf_channel != NULL)
    tf_channel_bus_message (priv->tf_channel, message);

  if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR)
    {
      GError *error = NULL;
      gchar *debug = NULL;
      gst_message_parse_error (message, &error, &debug);
      MEX_ERROR ("ERROR from element %s: %s\n",
                 GST_OBJECT_NAME (message->src), error->message);
      MEX_ERROR ("Debugging info: %s\n", (debug) ? debug : "none");
      g_error_free (error);
      g_free (debug);
    }
  return TRUE;
}
void
empathy_call_handler_bus_message (EmpathyCallHandler *handler,
  GstBus *bus, GstMessage *message)
{
  EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
  const GstStructure *s = gst_message_get_structure (message);

  if (priv->tfchannel == NULL)
    return;

  if (s != NULL &&
      gst_structure_has_name (s, "farsight-send-codec-changed"))
    {
      const GValue *val;
      FsCodec *codec;
      FsSession *session;

      DEBUG ("farsight-send-codec-changed");

      val = gst_structure_get_value (s, "codec");
      codec = g_value_get_boxed (val);

      val = gst_structure_get_value (s, "session");
      session = g_value_get_object (val);

      update_sending_codec (handler, codec, session);
    }
  else if (s != NULL &&
      gst_structure_has_name (s, "farsight-recv-codecs-changed"))
    {
      const GValue *val;
      GList *codecs;
      FsStream *stream;

      DEBUG ("farsight-recv-codecs-changed");

      val = gst_structure_get_value (s, "codecs");
      codecs = g_value_get_boxed (val);

      val = gst_structure_get_value (s, "stream");
      stream = g_value_get_object (val);

      update_receiving_codec (handler, codecs, stream);
    }
  else if (s != NULL &&
      gst_structure_has_name (s, "farsight-new-active-candidate-pair"))
    {
      const GValue *val;
      FsCandidate *remote_candidate, *local_candidate;
      FsStream *stream;

      DEBUG ("farsight-new-active-candidate-pair");

      val = gst_structure_get_value (s, "remote-candidate");
      remote_candidate = g_value_get_boxed (val);

      val = gst_structure_get_value (s, "local-candidate");
      local_candidate = g_value_get_boxed (val);

      val = gst_structure_get_value (s, "stream");
      stream = g_value_get_object (val);

      update_candidates (handler, remote_candidate, local_candidate, stream);
    }

  tf_channel_bus_message (priv->tfchannel, message);
}