Skip to content
Snippets Groups Projects
Commit 0f09ab56 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #13731: disable video completely when on hold

Unless we decide to send placholder video, this behaviour makes the most
sense for hold.
parent 30ac60ec
Branches
Tags
No related merge requests found
...@@ -963,6 +963,9 @@ SIPVoIPLink::onhold(const std::string& id) ...@@ -963,6 +963,9 @@ SIPVoIPLink::onhold(const std::string& id)
call->setState(Call::HOLD); call->setState(Call::HOLD);
call->getAudioRtp().saveLocalContext(); call->getAudioRtp().saveLocalContext();
call->getAudioRtp().stop(); call->getAudioRtp().stop();
#ifdef SFL_VIDEO
call->getVideoRtp().stop();
#endif
Sdp *sdpSession = call->getLocalSDP(); Sdp *sdpSession = call->getLocalSDP();
...@@ -975,8 +978,8 @@ SIPVoIPLink::onhold(const std::string& id) ...@@ -975,8 +978,8 @@ SIPVoIPLink::onhold(const std::string& id)
#ifdef SFL_VIDEO #ifdef SFL_VIDEO
sdpSession->removeAttributeFromLocalVideoMedia("sendrecv"); sdpSession->removeAttributeFromLocalVideoMedia("sendrecv");
sdpSession->removeAttributeFromLocalVideoMedia("sendonly"); sdpSession->removeAttributeFromLocalVideoMedia("inactive");
sdpSession->addAttributeToLocalVideoMedia("sendonly"); sdpSession->addAttributeToLocalVideoMedia("inactive");
#endif #endif
SIPSessionReinvite(call); SIPSessionReinvite(call);
......
...@@ -334,11 +334,10 @@ render_frame_from_shm(VideoRendererPrivate *priv) ...@@ -334,11 +334,10 @@ render_frame_from_shm(VideoRendererPrivate *priv)
if (!GTK_IS_WIDGET(priv->drawarea)) if (!GTK_IS_WIDGET(priv->drawarea))
return FALSE; return FALSE;
GtkWidget *parent = gtk_widget_get_parent(priv->drawarea); GtkWidget *parent = gtk_widget_get_parent(priv->drawarea);
if (!parent) if (!parent || !CLUTTER_IS_ACTOR(priv->texture))
return FALSE; return FALSE;
const gint parent_width = gtk_widget_get_allocated_width(parent); const gint parent_width = gtk_widget_get_allocated_width(parent);
const gint parent_height = gtk_widget_get_allocated_height(parent); const gint parent_height = gtk_widget_get_allocated_height(parent);
clutter_actor_set_size(priv->texture, parent_width, parent_height); clutter_actor_set_size(priv->texture, parent_width, parent_height);
video_renderer_render_to_texture(priv); video_renderer_render_to_texture(priv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment