better way to set outgoing video in chat window

This commit is contained in:
Yann Leboulanger 2013-07-31 19:15:42 +02:00
parent c8aea07b45
commit 786584a669
2 changed files with 18 additions and 7 deletions

View File

@ -2271,9 +2271,13 @@ class ChatControl(ChatControlBase):
if gajim.config.get('video_see_self'):
fixed = self.xml.get_object('outgoing_fixed')
fixed.set_no_show_all(False)
video_hbox.show_all()
out_xid = self.xml.get_object(
'outgoing_drawingarea').get_window().xid
else:
out_xid = None
video_hbox.show_all()
in_xid = self.xml.get_object('incoming_drawingarea').window.xid
out_xid = self.xml.get_object('outgoing_drawingarea').window.xid
in_xid = self.xml.get_object('incoming_drawingarea').get_window().xid
sid = gajim.connections[self.account].start_video(
self.contact.get_full_jid(), in_xid, out_xid)
else:

View File

@ -5366,11 +5366,18 @@ class VoIPCallReceivedDialog(object):
if gajim.config.get('video_see_self'):
out_xid = ctrl.xml.get_object('outgoing_drawingarea').\
get_window().xid
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
b = content.src_bin
found = False
for e in b.elements():
if e.get_name().startswith('autovideosink'):
found = True
break
if found:
found = False
for f in e.elements():
if f.get_name().startswith('autovideosink'):
f.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.