[empathy: 13/13] Merge branch 'gnome-3-4'



commit 05649508bf21c519402a049ba5be367430eb58d5
Merge: 26b9e04 bf32eb7
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Mon May 21 15:24:26 2012 +0200

    Merge branch 'gnome-3-4'
    
    Conflicts:
    	NEWS
    	configure.ac
    	src/empathy-audio-src.c

 src/empathy-audio-src.c    |  224 ++++++++++++++++----------------------------
 src/empathy-call-window.c  |  146 +++++++++++++++--------------
 src/empathy-call-window.ui |   48 +++++-----
 3 files changed, 179 insertions(+), 239 deletions(-)
---
diff --cc src/empathy-audio-src.c
index 590c65b,ca08614..79139bc
--- a/src/empathy-audio-src.c
+++ b/src/empathy-audio-src.c
@@@ -74,10 -75,9 +75,9 @@@ struct _EmpathyGstAudioSrcPrivat
  
    gdouble volume;
    gboolean mute;
-   /* the mixer track on src we follow and adjust */
-   GstMixerTrack *track;
+   gboolean have_stream_volume;
  
 -  GMutex *lock;
 +  GMutex lock;
    guint level_idle_id;
    guint volume_idle_id;
  };
@@@ -661,60 -652,8 +653,8 @@@ empathy_audio_src_handle_message (GstBi
          priv->level_idle_id = g_idle_add (
            empathy_audio_src_levels_updated, self);
  
 -      g_mutex_unlock (priv->lock);
 +      g_mutex_unlock (&priv->lock);
      }
-   else if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT &&
-         GST_MESSAGE_SRC (message) == GST_OBJECT (priv->src))
-     {
-       GstMixerTrack *track = NULL;
- 
-       /* Listen for mute or volume changes on the src element */
-       if (gst_mixer_message_get_type (message) ==
-           GST_MIXER_MESSAGE_VOLUME_CHANGED)
-         gst_mixer_message_parse_volume_changed (message, &track,
-             NULL, NULL);
- 
-       if (gst_mixer_message_get_type (message) ==
-           GST_MIXER_MESSAGE_MUTE_TOGGLED)
-         gst_mixer_message_parse_mute_toggled (message, &track, NULL);
- 
-       g_mutex_lock (&priv->lock);
- 
-       if (track != NULL && track == priv->track && priv->volume_idle_id == 0)
-         priv->volume_idle_id = g_idle_add (
-             empathy_audio_src_volume_changed, self);
- 
-       g_mutex_unlock (&priv->lock);
-     }
-   else if  (GST_MESSAGE_TYPE (message) == GST_MESSAGE_STATE_CHANGED &&
-       GST_MESSAGE_SRC (message) == GST_OBJECT (priv->src))
-     {
-       GstState old, new;
- 
-       gst_message_parse_state_changed (message, &old, &new, NULL);
- 
-       /* GstMixer is only available in state >= READY, so only start
-        * controlling the source element when going to ready state and stop
-        * doing so when going below ready. Furthermore once we have mixer read
-        * the current volume level from it and remove the settings done by
-        * Empathy. We want to pick up the level pulseaudio saved */
-       if (old == GST_STATE_NULL && new == GST_STATE_READY)
-         {
-           g_mutex_lock (&priv->lock);
-           priv->track = empathy_audio_src_get_track (priv->src);
-           if (priv->track != NULL)
-             priv->volume_idle_id = g_idle_add (
-               empathy_audio_src_volume_changed, self);
-           g_mutex_unlock (&priv->lock);
-         }
-       else if (old == GST_STATE_READY && new == GST_STATE_NULL)
-         {
-           g_mutex_lock (&priv->lock);
-           priv->track = NULL;
-           g_mutex_unlock (&priv->lock);
-         }
-     }
- 
  out:
     GST_BIN_CLASS (empathy_audio_src_parent_class)->handle_message (bin,
      message);
diff --cc src/empathy-call-window.c
index 1081efa,bd20678..d9641fd
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@@ -71,13 -73,10 +71,13 @@@
  #include "empathy-rounded-texture.h"
  #include "empathy-camera-menu.h"
  
- #define CONTENT_HBOX_BORDER_WIDTH 6
  #define CONTENT_HBOX_SPACING 3
- #define CONTENT_HBOX_CHILDREN_PACKING_PADDING 3
+ #define CONTENT_HBOX_CHILDREN_PACKING_PADDING 0
+ #define OVERLAY_MARGIN 6
  
 +#define REMOTE_VIDEO_DEFAULT_WIDTH 320
 +#define REMOTE_VIDEO_DEFAULT_HEIGHT 240
 +
  #define SELF_VIDEO_SECTION_WIDTH 120
  #define SELF_VIDEO_SECTION_HEIGHT 90
  #define SELF_VIDEO_SECTION_MARGIN 2
@@@ -1655,16 -1657,9 +1657,9 @@@ empathy_call_window_init (EmpathyCallWi
    priv->video_container = gtk_clutter_embed_new ();
  
    gtk_widget_set_size_request (priv->video_container,
 -      EMPATHY_VIDEO_WIDGET_DEFAULT_WIDTH, EMPATHY_VIDEO_WIDGET_DEFAULT_HEIGHT);
 +      REMOTE_VIDEO_DEFAULT_WIDTH, REMOTE_VIDEO_DEFAULT_HEIGHT);
  
-   /* Set the background color to that of the rest of the window */
-   context = gtk_widget_get_style_context (priv->content_hbox);
-   gtk_style_context_get_background_color (context,
-       GTK_STATE_FLAG_NORMAL, &rgba);
-   bg.red = CLAMP (rgba.red * 255.0, 0, 255);
-   bg.green = CLAMP (rgba.green * 255.0, 0, 255);
-   bg.blue = CLAMP (rgba.blue * 255.0, 0, 255);
-   bg.alpha = CLAMP (rgba.alpha * 255.0, 0, 255);
+   /* Set the background black */
    clutter_stage_set_color (
        CLUTTER_STAGE (gtk_clutter_embed_get_stage (
            GTK_CLUTTER_EMBED (priv->video_container))),



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