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 599166 - Add a "details" pane in the sidebar
Add a "details" pane in the sidebar
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
2.28.x
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-21 11:13 UTC by Guillaume Desmottes
Modified: 2010-07-14 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Desmottes 2009-10-21 11:13:53 UTC
It would be useful to have a "details/info" section in the side pane displaying info on the call: codecs used, codecs supported by both side, if a relay is used, bandwith used, etc.
Comment 1 André Klapper 2009-10-28 17:16:39 UTC
Currently 17 Empathy tickets are set as GNOME 2.30 blockers, hence mass-removing.
Guillaume: Please use normal Target Milestones instead. If you really think that this specific issue here is a 2.30 blocker then please restore the GNOME target and set corresponding importance values.
Comment 2 Guillaume Desmottes 2009-12-17 13:53:12 UTC
Let's think about the things we want to display in this pane:

- audio codec used: should we get that from Farsight or the GStreamer pipeline?
- video codec: same question
- codecs supported: how can we get that?
- Relay used. Do we have API for that?
Comment 3 Olivier Crête 2009-12-23 15:46:15 UTC
(In reply to comment #2)
> - audio codec used: should we get that from Farsight or the GStreamer pipeline?

You can get the codec received from the "current-recv-codecs" property of FsStream (with change notification in the "farsight-recv-codecs-changed" message GstBus message. Which is also notified to the CM by the "CodecChoice" method

You can get the sent codec with "current-send-codec" property of FsSession and changes are notified by the "farsight-send-codec-changed" message. 

I guess I could expose it somehow from tp-fs instead of having to go fish in farsight.

> - video codec: same question

Same answer ;)

> - codecs supported: how can we get that?

From the "codecs-without-config" property of FsSession (change notification from "farsight-codecs-changed".. ). I could also expose that.

> - Relay used. Do we have API for that?

There is no API (in libnice) to know which relay is used.. But you can guess if one is used or not by the selected candidates from the "farsight-new-active-candidate-pair" message (that said, there is no matching property.. maybe there should be). And the type of candidate (relayed or host or reflexive).

We may also want to extract other kinds of stats from rtpbin, like the average bitrate, jitter, packet loss, etc. Farsight2 doesn't have an API for that, but I can either add one or just fish it out of rtpbin directly.
Comment 4 Guillaume Desmottes 2010-07-09 10:04:06 UTC
(In reply to comment #3)
> I guess I could expose it somehow from tp-fs instead of having to go fish in
> farsight.

Yeah that would be cool. I opened https://bugs.freedesktop.org/show_bug.cgi?id=28975
Comment 5 Guillaume Desmottes 2010-07-12 15:56:04 UTC
Here is a first version addiing the encoding and decoding codecs:
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/debug-av-599166

I think this branch can already be reviewed; we'll add more info later.
Comment 6 Guillaume Desmottes 2010-07-12 16:07:39 UTC
(In reply to comment #3)
> > - Relay used. Do we have API for that?
> 
> There is no API (in libnice) to know which relay is used.. But you can guess if
> one is used or not by the selected candidates from the
> "farsight-new-active-candidate-pair" message (that said, there is no matching
> property.. maybe there should be). And the type of candidate (relayed or host
> or reflexive).

So, which information are worth displaying from the  FsCandidate?
The ip and port?

The type? How should we display it?
  FS_CANDIDATE_TYPE_HOST : "host" ?
  FS_CANDIDATE_TYPE_SRFLX : "server reflexive" ? (no idea what that means)
  FS_CANDIDATE_TYPE_PRFLX : "peer reflexive " ?
  FS_CANDIDATE_TYPE_RELAY:    "external stream relay" ?
  FS_CANDIDATE_TYPE_MULTICAST: "multicast" ?

> We may also want to extract other kinds of stats from rtpbin, like the average
> bitrate, jitter, packet loss, etc. Farsight2 doesn't have an API for that, but
> I can either add one or just fish it out of rtpbin directly.

I think the bitrate at least is worth displaying. How can I get it? Do you think it should be exposed in the FS2 API?
Comment 7 Olivier Crête 2010-07-12 16:19:16 UTC
Review:

- You also want to listen to the "farsight-recv-codecs-changed" message.
- You probably also want to look at the recently added "secondary-codecs" property of the "farsight-send-codec-changed" message (ie, its not there in older versions of fs2).. It contains information about DTMF and CN if they are used.
- You want to display the codecs as "encoding_name/clock_rate".. There is a fs_codec_to_string() function that prints everything that is in the code, but it may be too verbose for our needs.
- For the recv codecs, you want to use GString and g_string_append_printf()

The rest looks fine to me.
Comment 8 Olivier Crête 2010-07-12 16:28:25 UTC
(In reply to comment #6)
> So, which information are worth displaying from the  FsCandidate?
> The ip and port?

For each component, you want to give the ip/port/type I guess

> The type? How should we display it?
>   FS_CANDIDATE_TYPE_HOST : "host" ?

That's the local ip of the machine as seen by the machine (ie what you see in ifconfig)

>   FS_CANDIDATE_TYPE_SRFLX : "server reflexive" ? (no idea what that means)

That's the IP/port returned by the stun server (so would be the IP of the router if there is a NAT)

>   FS_CANDIDATE_TYPE_PRFLX : "peer reflexive " ?

That's a IP/port that we see when receiving packets from an unknown ip/port (for NATs that give a different port every time like Linux).

>   FS_CANDIDATE_TYPE_RELAY:    "external stream relay" ?

That's a turn server...

>   FS_CANDIDATE_TYPE_MULTICAST: "multicast" ?

This is only used with the multicast transmitter (and is the only type valid in that case), it's the IP of the multicast group (and a port).


> > We may also want to extract other kinds of stats from rtpbin, like the average
> > bitrate, jitter, packet loss, etc. Farsight2 doesn't have an API for that, but
> > I can either add one or just fish it out of rtpbin directly.
> 
> I think the bitrate at least is worth displaying. How can I get it? Do you
> think it should be exposed in the FS2 API?

It's a bit annoying to get it out of Farsight2, I'll add apis for that.. To the FsStream.
Comment 9 Guillaume Desmottes 2010-07-13 07:35:38 UTC
(In reply to comment #7)
> Review:
> 
> - You also want to listen to the "farsight-recv-codecs-changed" message.

I do, see empathy_call_handler_bus_message().

> - You probably also want to look at the recently added "secondary-codecs"
> property of the "farsight-send-codec-changed" message (ie, its not there in
> older versions of fs2).. It contains information about DTMF and CN if they are
> used.

I'd rather focus on only the main codecs for now and add more info in another branch.

> - You want to display the codecs as "encoding_name/clock_rate".. There is a
> fs_codec_to_string() function that prints everything that is in the code, but
> it may be too verbose for our needs.

Indeed. I just printed "encoding_name/clock_rate" as you suggested.

> - For the recv codecs, you want to use GString and g_string_append_printf()

Of course, done.
Comment 10 Guillaume Desmottes 2010-07-13 07:40:22 UTC
(In reply to comment #8)
> > > We may also want to extract other kinds of stats from rtpbin, like the average
> > > bitrate, jitter, packet loss, etc. Farsight2 doesn't have an API for that, but
> > > I can either add one or just fish it out of rtpbin directly.
> > 
> > I think the bitrate at least is worth displaying. How can I get it? Do you
> > think it should be exposed in the FS2 API?
> 
> It's a bit annoying to get it out of Farsight2, I'll add apis for that.. To the
> FsStream.

I opened https://bugs.freedesktop.org/show_bug.cgi?id=29038
Comment 11 Guillaume Desmottes 2010-07-13 10:31:12 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > So, which information are worth displaying from the  FsCandidate?
> > The ip and port?
> 
> For each component, you want to give the ip/port/type I guess

Yeah but I don't want to display all the candidates, only the one actually used to stream the data. How can I get this one?
Comment 12 Xavier Claessens 2010-07-13 10:33:51 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > (In reply to comment #6)
> > > So, which information are worth displaying from the  FsCandidate?
> > > The ip and port?
> > 
> > For each component, you want to give the ip/port/type I guess
> 
> Yeah but I don't want to display all the candidates, only the one actually used
> to stream the data. How can I get this one?

In the case the codec negociation failed, it would be interesting to display the candidate list. Like that we know which codec to install to be interop with the contact.
Comment 13 Olivier Crête 2010-07-13 13:26:24 UTC
(In reply to comment #11)
> Yeah but I don't want to display all the candidates, only the one actually used
> to stream the data. How can I get this one?

Wait for the "farsight-new-active-candidate-pair" message that will contain the two candidates used.

(In reply to comment #12)
> In the case the codec negociation failed, it would be interesting to display
> the candidate list. Like that we know which codec to install to be interop with
> the contact.

You mean if connection failed.. I guess in that case you can print all the candidates (local and remote). You can also notice (with joy) that there is no property to get all the candidates (they're only in the messages).
Comment 14 Guillaume Desmottes 2010-07-14 10:00:44 UTC
I merged the first branch so closing this bug. I'll open more bugs for adding extra info to the pane.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 15 Guillaume Desmottes 2010-07-14 13:57:28 UTC
I opened bug #624344 and bug  #624345 regarding future enhancements.