Allows setting up cryptographic parameters with
calls_sip_media_pipeline_set_crypto() and use them to set GstCaps for
GstSrtpDec and GObject properties for GstSrtpEnc
by adding functions to the public API which determine if state changes
should be shown to the user and use them (instead of duplicating similar
logic).
When trying to go online/offline we're always waiting for confirmation
from the stack (even if it's a timeout) so the delayed pattern is a good choice.
Brings some UI tweaks, encryption indicator that is bound to calls
`encrypted` property, fixes a small issue with libcallaudio usage and
lots of updated or added translations.
Closes#452
When setting up a binding between GSettings and GObject properties the
CallsSetting used to set the value from the GSetting to the property and
back to the GSetting.
While the value was still the default value it was marked as non default
because it had explicitly been set without any user interaction.
This breaks the settings binding cycle for the "autoload-plugins" and
"preferred-audio-codecs" settings which went something like this:
g_settings_bind () is used with
G_SETTINGS_BIND_DEFAULT (G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET).
It grabs the value of our setting and sets it for the bound property.
This emits the notify signal causing the same value to be set for the
setting.
In effect this caused the setting to be marked as non-default because
Calls had changed the setting without user action. This caused updated
defaults not to apply for existing installations.
We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.
This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory
Because g_autoptr () is considered a function call we also need to set
nl_func_var_def_blk to zero because any occurence of g_autoptr () would
be considered the end of a block of variable declarations.
The rtpbin will request GstSrtpDec and GstSrtpEnc elements using the
"request-{rtp,rtcp}-{de,en}coder" family of signals.
The newly added boolean use_srtp controls whether the srtp elements are
returned in the signal handler and thus decides if SRTP is used or not.
Ust GST_DEBUG_BIN_TO_DOT_FILE to generate a dot graph of a pipeline for
debugging purposes when SIGUSR2 is received.
Note the same signal is also used within the dummy plugin to simulate an
incoming call from an unknown number, so when testing you probably want either
the sip plugin or the dummy plugin, but not both.
We were using two distinct pipelines, one for receiving and one for
sending. The receive pipeline was set to the playing state to allocate
the sockets which we would reuse for the sending direction for our NAT
traversal scheme.
The rework to a single pipeline broke reusing sockets subtly.
This happened because the state of the GstUDPSrc could be reset leading
to newly allocated sockets once the pipeline is set to play.
This is now fixed by locking the state of the GstUDPSrc in the ready
state during socket reuse setup and while the pipeline is paused.
Additionally get rid of the "close-socket" property on the udp sources
because it was never needed.
Fixes aa446f82
sq