[empathy] Hook resolution change support



commit d41e4f40e98cca99005a344a738e0468ae3b84bf
Author: Nicolas Dufresne <nicolas dufresne collabora com>
Date:   Wed Jul 6 18:18:58 2011 -0400

    Hook resolution change support

 src/empathy-call-window.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 92e0c43..4def7d8 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2736,6 +2736,35 @@ empathy_call_window_sink_removed_cb (EmpathyCallHandler *handler,
   return FALSE;
 }
 
+static void
+empathy_call_window_framerate_changed_cb (EmpathyCallHandler *handler,
+    guint framerate,
+    EmpathyCallWindow *self)
+{
+  EmpathyCallWindowPriv *priv = GET_PRIV (self);
+
+  DEBUG ("Framerate changed to %u", framerate);
+
+  if (priv->video_input != NULL)
+    empathy_video_src_set_framerate (priv->video_input, framerate);
+}
+
+static void
+empathy_call_window_resolution_changed_cb (EmpathyCallHandler *handler,
+    guint width,
+    guint height,
+    EmpathyCallWindow *self)
+{
+  EmpathyCallWindowPriv *priv = GET_PRIV (self);
+
+  DEBUG ("Resolution changed to %ux%u", width, height);
+
+  if (priv->video_input != NULL)
+    {
+      empathy_video_src_set_resolution (priv->video_input, width, height);
+    }
+}
+
 /* Called with global lock held */
 static GstPad *
 empathy_call_window_get_video_sink_pad (EmpathyCallWindow *self)
@@ -3680,6 +3709,11 @@ empathy_call_window_connect_handler (EmpathyCallWindow *self)
   g_signal_connect (priv->handler, "notify::call-channel",
     G_CALLBACK (call_handler_notify_call_cb), self);
 
+  g_signal_connect (priv->handler, "framerate-changed",
+    G_CALLBACK (empathy_call_window_framerate_changed_cb), self);
+  g_signal_connect (priv->handler, "resolution-changed",
+    G_CALLBACK (empathy_call_window_resolution_changed_cb), self);
+
   g_object_get (priv->handler, "call-channel", &call, NULL);
   if (call != NULL)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]