1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-07-07 09:29:30 +00:00
Commit graph

25 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras 94fa13af4c settings: Convert to the singleton pattern
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
2022-05-13 19:58:07 +02:00
Evangelos Ribeiro Tzaras 7ac862155b Uncrustify sources
Ran `find src plugins -iname '*.[c|h]' -print0 | xargs -0 uncrustify --no-backup`
with some minimal manual intervention.
2022-04-24 12:59:42 +02:00
Evangelos Ribeiro Tzaras 849f298609 sip: media-pipeline: Remove lport-rtp and lport-rtcp property
We're not setting the desired ports from the outside anymore, but rather
querying the ports that have been allocated by the operating system.

Therefore the lport-rtp and lport-rtcp property have become superfluous and are
being removed. We also adapt to changes outside of the pipeline code.
2022-03-05 23:02:15 +01:00
Evangelos Ribeiro Tzaras 7033c1cd75 media manager: Manage and hand out available pipelines
The media manager will always try to have a pipeline ready.
2022-03-05 23:02:15 +01:00
Evangelos Ribeiro Tzaras 30d6c71826 sip: media-manager: Remove unused code
It has outlived its usefulness since 7d113d4180
Also PCMA was never the "best" codec to begin with.
2022-03-01 18:24:04 +01:00
Evangelos Ribeiro Tzaras a78a2f3daf sip: media-manager: Initialize GStreamer if it's not already initialized 2022-03-01 18:04:18 +01:00
Evangelos Ribeiro Tzaras a99755424f media-manager: Don't run deinitialize GStreamer in finalize()
This makes running tests harder as we cannot call gst_init() after gst_deinit()
has been called.

This is what the API reference has to say about it at
https://gstreamer.freedesktop.org/documentation/gstreamer/gst.html?gi-language=c#gst_deinit

It is normally not needed to call this function in a normal application as the
resources will automatically be freed when the program terminates. This function
is therefore mostly used by testsuites and other memory profiling tools.
2022-03-01 18:04:18 +01:00
Evangelos Ribeiro Tzaras 876f12df95 sip: media-manager: Don't include sofia-sip/nua.h in public header
It isn't needed in the implementation either. It was only useful because it
included system headers like sys/types.h and sys/socket.h which we should now
include directly.

This will make it easier to move the media manager into the core sources.
2022-03-01 16:31:44 +01:00
Evangelos Ribeiro Tzaras 38f9e0b608 sip: media-manager: Get rid of global session IP
Since we're now passing the IP to be used to retrieve the capabilities
for the SDP message body, this has become dead code.
2022-01-08 21:25:09 +00:00
Evangelos Ribeiro Tzaras 8b126484cb sip: Use per origin IP instead of a global IP
Sofia detects a NAT by presence of the "received" parameter in the Via header in
the response to a REGISTER. Sofia will then update the Contact header to use the
IP as reported by the registrar.

The "received" parameter MUST be included in the response according to
https://datatracker.ietf.org/doc/html/rfc3261#section-18.2.1
when the registrar detects a difference between the domain part of the top Via
header and the packet source address but practice has shown that this will not
always be the case.

Addditionally this change allows us to have origins bound to different network
interfaces which would be useful when a registrar can only be accessed through a
VPN.

This also fixes an issue with SDP introduced in
36880c3d34 which was only seen on some SIP
providers:

The session name ("s=") line is not relevant for establishing a connection,
the connection data (c=") line is.

See https://datatracker.ietf.org/doc/html/rfc4566 section 5.3 and 5.7
2022-01-08 21:25:09 +00:00
Evangelos Ribeiro Tzaras 8575adf998 media-manager: Take preferred audio codecs into account for SDP
Fixes #349
2021-12-21 15:05:47 +01:00
Evangelos Ribeiro Tzaras 36880c3d34 sip: Gather public IP from REGISTER response and use it in SDP
Fixes #335
2021-10-06 13:43:04 +00:00
Evangelos Ribeiro Tzaras 24040c2122 sip: media: Fix gtk-doc transfer annotation 2021-09-20 02:14:27 +00:00
Evangelos Ribeiro Tzaras 96a7d901c1 Fix old-style warnings all over the codebase
As caught by compiling with `-Wold-style-definition` and `-Wstrict-prototypes`.
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras 5ed24c4ed7 doc: Fix gtk-doc transfer annotations 2021-04-27 11:38:26 +02:00
Evangelos Ribeiro Tzaras 7ed1ee2502 sip: codestyle changes
Shuffle the code around and make use of docstrings to conform to
the newly introduced coding style as described in `HACKING.md`

This commit also introduces docstrings describing each source file.
2021-04-16 00:39:42 +00:00
Evangelos Ribeiro Tzaras 63cc6507e7 sip: media-manager: fix SDP message when there is no supported codec 2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras 7d8be1d68d sip: media-manager: fix G_LOG_DOMAIN 2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras c2bd6e9344 sip: media: rework codec negotiation
introduce `calls_sip_media_manager_get_capabilities ()` which takes
a GList of MediaCodecInfo's as input to generate a SDP message.
If using in an SDP answer we simply feed it a list of the common codecs
as gathered from the SDP offer.
2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras 157dc1fffb sip: media: use number types for payload id and clock rate
This is needed for the next commits where we check the received SDP
offers/answers.
2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras 7d113d4180 media: manager: support multiple codecs SDP wise
static capabilities are now supporting multiple codecs and generate correct SDP
messages. This only relates to SDP offers. When we are answering an offer we
must take the offer from the other party into account when creating the answer.

Hence why we differentiate between "static" and "dynamic" (not implemented yet)
capability strings.
2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras af3cda9c5c media-manager: codestyle
move public function `get_best_codec ()` to the bottom
2021-04-12 08:38:24 +00:00
Evangelos Ribeiro Tzaras dcff7538f2 sip: media: improve SDP offer/answer handling 2021-04-03 00:08:31 +02:00
Evangelos Ribeiro Tzaras 7b54855f5e sip: media: change default codec to PCMA 2021-04-03 00:08:31 +02:00
Evangelos Ribeiro Tzaras 967f30d688 sip: Add media manager and sipify origin
* pipeline: we should bind the used socket of our udpsink to the socket udpsrc
2021-04-03 00:08:31 +02:00