GNOME Bugzilla – Bug 582810
When we stop receiving video in a call, we should not see the last video frame.
Last modified: 2009-08-03 15:28:22 UTC
Currently, in a video call, when the distant side stops sending video (either because the connection is closed or because the user manually stopped sending video), the video output widget shows the last frame received. Instead, the video widget should be reset.
Created attachment 135346 [details] [review] patch v1 libempathy-gtk/empathy-video-widget.c | 4 +- libempathy-gtk/empathy-video-widget.h | 3 + libempathy/empathy-call-handler.c | 22 ++++- libempathy/empathy-tp-call.c | 37 ++++++ libempathy/empathy-tp-call.h | 2 + src/empathy-call-window.c | 198 +++++++++++++++++++++++++++++++-- 6 files changed, 255 insertions(+), 11 deletions(-)
Created attachment 135439 [details] [review] Fixed a bug which would sometime cause the application to crash when closing the call window libempathy/empathy-call-handler.c | 22 +++++++++++++++ libempathy/empathy-tp-call.c | 37 ++++++++++++++++++++++++++ libempathy/empathy-tp-call.h | 2 + src/empathy-call-window.c | 52 +++++++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 0 deletions(-)
TP_MEDIA_STREAM_DIRECTION_* are flags as you can see in their definitions: typedef enum { TP_MEDIA_STREAM_DIRECTION_NONE = 0, TP_MEDIA_STREAM_DIRECTION_SEND = 1, TP_MEDIA_STREAM_DIRECTION_RECEIVE = 2, TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL = 3, } TpMediaStreamDirection; so instead of doing + return priv->video->direction == TP_MEDIA_STREAM_DIRECTION_RECEIVE || + priv->video->direction == TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL; you just have to check if the RECEIVE flag is set: priv->video->direction & TP_MEDIA_STREAM_DIRECTION_RECEIVE The same apply in empathy_tp_call_is_sending_video of course. + if (empathy_tp_call_is_sending_video (call)) + { + gtk_widget_hide (priv->self_user_avatar_widget); + gtk_widget_show (priv->video_preview); + } + else + { + gtk_widget_hide (priv->video_preview); + gtk_widget_show (priv->self_user_avatar_widget); + } The visibility of the video preview should depend on the "View preview" menu item, not the sending state (bug 571989)
Now that #571989 has been merged, could you please rebase this branch on top of current master please?
Created attachment 136662 [details] [review] patch libempathy/empathy-call-handler.c | 4 +++- libempathy/empathy-tp-call.c | 6 ++++-- src/empathy-call-window.c | 31 ++++++++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 6 deletions(-)
I tested your branch and experienced this problem: - A starts an audio call with B - A's call window displays B's avatar - A hits the "send video button" - A's call window now displays a black square (B is not sending video) Is that because of the stream direction bug you mentionned?
Does the change in empathy_call_handler_new_for_channel means that if you accept an intial-video call, you'll start sending video as soon the call is connected? Why + gtk_action_set_sensitive (priv->show_preview, FALSE); in empathy_call_window_disconnected? Does it harm to be able to see the preview when the call is disconnected?
Regarding comment #6, yes, this issue is because of the stream direction problem I've mentioned. As for comment #7, unless I've misunderstood, that's what we have agreed to do in our IRC conversation. I asked you if, when disconnected, it was worth it to recreate the pipeline just to be able to see the preview. You told me that in that case, we should just disable it by hiding it and disabling the "Show Preview" menu item.
I merged your branch to master. Please open another bug about the stream direction issue.
Comment on attachment 135346 [details] [review] patch v1 Original description (too long for the soon-to-be-upgraded Bugzilla): Branch containing the fix: http://git.collabora.co.uk/?p=user/jtellier/empathy.git;a=shortlog;h=refs/heads/video-call-stop-showing-last-frame. In order to work properly, this branch had to be merged with the one for Bug 582774 (When no video is being sent, the video output and preview should show an icon instead of being black).
Comment on attachment 136662 [details] [review] patch Original description was too long for the soon-to-be-upgraded Bugzilla.