From 0f09ab56cbe2eb1f9ff500b3d82c4e6dde4b2e5a Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Tue, 24 Jul 2012 11:42:31 -0400 Subject: [PATCH] * #13731: disable video completely when on hold Unless we decide to send placholder video, this behaviour makes the most sense for hold. --- daemon/src/sip/sipvoiplink.cpp | 7 +++++-- gnome/src/video/video_renderer.c | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 9004fe986f..a4dfda8b47 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -963,6 +963,9 @@ SIPVoIPLink::onhold(const std::string& id) call->setState(Call::HOLD); call->getAudioRtp().saveLocalContext(); call->getAudioRtp().stop(); +#ifdef SFL_VIDEO + call->getVideoRtp().stop(); +#endif Sdp *sdpSession = call->getLocalSDP(); @@ -975,8 +978,8 @@ SIPVoIPLink::onhold(const std::string& id) #ifdef SFL_VIDEO sdpSession->removeAttributeFromLocalVideoMedia("sendrecv"); - sdpSession->removeAttributeFromLocalVideoMedia("sendonly"); - sdpSession->addAttributeToLocalVideoMedia("sendonly"); + sdpSession->removeAttributeFromLocalVideoMedia("inactive"); + sdpSession->addAttributeToLocalVideoMedia("inactive"); #endif SIPSessionReinvite(call); diff --git a/gnome/src/video/video_renderer.c b/gnome/src/video/video_renderer.c index c535184432..e06b7585cd 100644 --- a/gnome/src/video/video_renderer.c +++ b/gnome/src/video/video_renderer.c @@ -334,11 +334,10 @@ render_frame_from_shm(VideoRendererPrivate *priv) if (!GTK_IS_WIDGET(priv->drawarea)) return FALSE; GtkWidget *parent = gtk_widget_get_parent(priv->drawarea); - if (!parent) + if (!parent || !CLUTTER_IS_ACTOR(priv->texture)) return FALSE; const gint parent_width = gtk_widget_get_allocated_width(parent); const gint parent_height = gtk_widget_get_allocated_height(parent); - clutter_actor_set_size(priv->texture, parent_width, parent_height); video_renderer_render_to_texture(priv); -- GitLab