From 44513b912e9a3e55f2455a74fb4c04d5803d78ca Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Sat, 6 Jul 2013 21:27:30 +0200
Subject: [PATCH] move incoming and outgoing video stream in chat window when
 we receive the video call.

---
 src/dialogs.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/dialogs.py b/src/dialogs.py
index befb367974..09c13b670e 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -5238,6 +5238,23 @@ class VoIPCallReceivedDialog(object):
             if audio and not audio.negotiated:
                 ctrl.set_audio_state('connecting', self.sid)
             if video and not video.negotiated:
+                video_hbox = ctrl.xml.get_object('video_hbox')
+                video_hbox.set_no_show_all(False)
+                if gajim.config.get('video_see_self'):
+                    fixed = ctrl.xml.get_object('outgoing_fixed')
+                    fixed.set_no_show_all(False)
+                video_hbox.show_all()
+                in_xid = ctrl.xml.get_object('incoming_drawingarea').window.xid
+                out_xid = ctrl.xml.get_object('outgoing_drawingarea').window.xid
+                content = session.get_content('video')
+                # move outgoing stream to chat window
+                if gajim.config.get('video_see_self'):
+                    b = content.pipeline.get_by_name('bin2')
+                    c = b.get_by_name('autovideosink0')
+                    d = c.get_by_name('autovideosink0-actual-sink-xvimage')
+                    d.set_xwindow_id(out_xid)
+                    content.out_xid = out_xid
+                content.in_xid = in_xid
                 ctrl.set_video_state('connecting', self.sid)
             # Now, accept the content/sessions.
             # This should be done after the chat control is running
-- 
GitLab