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 663124 - improvements to pulsesink/pulsesrc usage
improvements to pulsesink/pulsesrc usage
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-31 20:50 UTC by Arun Raghavan
Modified: 2011-11-30 03:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-element-properties-Set-proper-latency-values-on-puls.patch (1.35 KB, patch)
2011-10-31 20:51 UTC, Arun Raghavan
none Details | Review
0002-audio-src-Add-a-caps-filter-to-select-appropriate-in.patch (2.03 KB, patch)
2011-10-31 20:51 UTC, Arun Raghavan
none Details | Review
0002-audio-src-Add-a-caps-filter-to-select-appropriate-in.patch (2.37 KB, patch)
2011-11-01 08:31 UTC, Arun Raghavan
committed Details | Review
audio-src,audio-sink: Use lower latency values on pulsesrc/pulsesink (1.54 KB, patch)
2011-11-07 04:56 UTC, Arun Raghavan
needs-work Details | Review

Description Arun Raghavan 2011-10-31 20:50:51 UTC
I'm attaching two patches to fix how Empathy uses pulsesink/pulsesrc. The first adjusts latency parameters. The second fixes the sample format that we request from PA in pulsesrc.
Comment 1 Arun Raghavan 2011-10-31 20:51:17 UTC
Created attachment 200366 [details] [review]
0001-element-properties-Set-proper-latency-values-on-puls.patch
Comment 2 Arun Raghavan 2011-10-31 20:51:30 UTC
Created attachment 200367 [details] [review]
0002-audio-src-Add-a-caps-filter-to-select-appropriate-in.patch
Comment 3 Guillaume Desmottes 2011-11-01 08:18:53 UTC
Review of attachment 200366 [details] [review]:

element-properties is not used any more in empathy-call. I think we rely on Farstream's default settings, so probably best to make this change there.
Comment 4 Guillaume Desmottes 2011-11-01 08:19:45 UTC
Review of attachment 200367 [details] [review]:

::: src/empathy-audio-src.c
@@ +230,3 @@
   gst_bin_add (GST_BIN (obj), priv->src);
 
+  caps = gst_caps_new_simple ("audio/x-raw-int",

Can you please add a comment here explaining (briefly) the reason on this caps filter.
Comment 5 Arun Raghavan 2011-11-01 08:30:08 UTC
(In reply to comment #3)
> Review of attachment 200366 [details] [review]:
> 
> element-properties is not used any more in empathy-call. I think we rely on
> Farstream's default settings, so probably best to make this change there.

Thinking about it, this change might not make sense at all. The changes should likely go into empathy-audio-{src,sink}.c where the elements are instantiated.
Comment 6 Arun Raghavan 2011-11-01 08:31:19 UTC
Created attachment 200385 [details] [review]
0002-audio-src-Add-a-caps-filter-to-select-appropriate-in.patch

Added a comment about why we add the capsfilter as requested in comment #4.
Comment 7 Arun Raghavan 2011-11-01 08:45:08 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Review of attachment 200366 [details] [review] [details]:
> > 
> > element-properties is not used any more in empathy-call. I think we rely on
> > Farstream's default settings, so probably best to make this change there.
> 
> Thinking about it, this change might not make sense at all. The changes should
> likely go into empathy-audio-{src,sink}.c where the elements are instantiated.

Okay, took a closer look at the code and I was wrong. I've filed a bug against farstream to add this to element-properties there too -- https://bugs.freedesktop.org/show_bug.cgi?id=42460
Comment 8 Sjoerd Simons 2011-11-01 11:23:07 UTC
(In reply to comment #3)
> Review of attachment 200366 [details] [review]:
> 
> element-properties is not used any more in empathy-call. I think we rely on
> Farstream's default settings, so probably best to make this change there.

Farstream handles payloaders/codecs. Empathy sources/sinks atm, so we should:
0: Directly set these properties on pulsesrc and pulsesink
1: remove all usage of the element-properties file in empathy and just load the farstream default
    & rely on latest farstream

Ofcourse for this bug doing 0 is enough. Btw, is 50ms for the src and 25ms for the sink not a bit high (e.g. why not both 20ms?)
Comment 9 Arun Raghavan 2011-11-07 04:56:51 UTC
Created attachment 200861 [details] [review]
audio-src,audio-sink: Use lower latency values on pulsesrc/pulsesink

This sets the pulsesink and pulsesrc buffer/latency parameters to be
lower and more voip-friendly. If the system cannot provide or keep up
with these values, PulseAudio will automatically try to adapt and
provide larger values that are achievable.
Comment 10 Arun Raghavan 2011-11-07 04:58:39 UTC
Attached an updated patch that directly sets the buffer-time and latency-time values on pulsesrc/pulsesink. Also dropped to a lower value (20ms) as suggested, since PA will automatically adjust if the system can't cope.
Comment 11 Arun Raghavan 2011-11-10 07:52:11 UTC
Comment on attachment 200861 [details] [review]
audio-src,audio-sink: Use lower latency values on pulsesrc/pulsesink

Looking at the buffer-time/latency-time values and how they cause PA to behave, this needs a bit more work. buffer-time = 2*latency-time is not good.
Comment 12 Arun Raghavan 2011-11-21 18:23:38 UTC
Fixed up the latency values to 40ms buffer-time and 10ms latency-time for sink and 20ms buffer-time for the source and pushed, so all done.
Comment 13 Raluca-Elena Podiuc 2011-11-30 03:51:01 UTC
I've hit an issue that I bisected to this patch:

   audio-src,audio-sink: Use lower latency values on pulsesrc/pulsesink (1.54 KB, patch) 

You may wish to check out/comment this bug: https://bugzilla.gnome.org/show_bug.cgi?id=665171