After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582810 - When we stop receiving video in a call, we should not see the last video frame.
When we stop receiving video in a call, we should not see the last video frame.
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
2.26.x
Other All
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks: 580777
 
 
Reported: 2009-05-15 19:22 UTC by Jonathan Tellier
Modified: 2009-08-03 15:28 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch v1 (17.74 KB, patch)
2009-05-25 20:23 UTC, Jonathan Tellier
reviewed Details | Review
Fixed a bug which would sometime cause the application to crash when closing the call window (7.12 KB, patch)
2009-05-27 14:21 UTC, Jonathan Tellier
reviewed Details | Review
patch (4.53 KB, patch)
2009-06-15 20:23 UTC, Jonathan Tellier
committed Details | Review

Description Jonathan Tellier 2009-05-15 19:22:21 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.
Comment 1 Jonathan Tellier 2009-05-25 20:23:14 UTC
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(-)
Comment 2 Jonathan Tellier 2009-05-27 14:21:22 UTC
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(-)
Comment 3 Guillaume Desmottes 2009-06-04 11:13:55 UTC
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)
Comment 4 Guillaume Desmottes 2009-06-15 09:51:01 UTC
Now that #571989 has been merged, could you please rebase this branch on top of current master please?
Comment 5 Jonathan Tellier 2009-06-15 20:23:04 UTC
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(-)
Comment 6 Guillaume Desmottes 2009-06-16 09:55:19 UTC
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?

Comment 7 Guillaume Desmottes 2009-06-16 10:04:22 UTC
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?

Comment 8 Jonathan Tellier 2009-06-16 12:38:17 UTC
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.
Comment 9 Guillaume Desmottes 2009-06-16 14:27:24 UTC
I merged your branch to master. Please open another bug about the stream direction issue.
Comment 10 Max Kanat-Alexander 2009-08-03 15:21:21 UTC
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 11 Max Kanat-Alexander 2009-08-03 15:28:22 UTC
Comment on attachment 136662 [details] [review]
patch

Original description was too long for the soon-to-be-upgraded Bugzilla.