1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-07-05 00:19:28 +00:00
Commit graph

27 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras 0e3a07aabf sip: media-pipeline: Setup socket reuse for RTP and RTCP during initialization
Now that initialization is split per pipeline and that the OS handles port
allocation we can move setting up socket reuse into the pipeline initialization
step instead of setting it up when starting the media pipelines.

This makes the calls_sip_media_pipeline_start() method a bit simpler.

We're also now reusing sockets for RTCP.

Closes #315
2022-03-05 23:02:15 +01: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 c4aa8d45e8 sip: media-pipeline: Don't implement GInitable
We don't expect the initialization to be able to fail. The only thing that could
potentially fail is setting up codecs and this has been delayed until after
initialization.
2022-03-05 23:02:13 +01:00
Evangelos Ribeiro Tzaras fe6951c938 sip: media-pipeline: Keep track of pipeline state
This can be used by the media manager to dispose of pipelines which are done.
2022-03-05 23:00:56 +01:00
Evangelos Ribeiro Tzaras 53d6082d64 sip: media-pipeline: Let the OS allocate sockets for udpsrc
First of we get rid of the bindings between from "lport-rtp" and "lport-rtcp" to
the "port" property of the udpsrc elements. The properties themselves will get
removed a little later as the required changes are rather intrusive and we need
some more infrastructure in place before we can do the switch.
2022-03-05 23:00:22 +01:00
Evangelos Ribeiro Tzaras f3a6c15e6a sip: media-pipeline: Allow new pipeline without codec set 2022-03-05 23:00:22 +01:00
Evangelos Ribeiro Tzaras 29742a5f8d sip: media-pipeline: Check codec availability before setup 2022-03-05 23:00:22 +01:00
Evangelos Ribeiro Tzaras 02e271b04a sip: media-pipeline: Delay setting codec
After the refactoring this is as simple as delay setting the codec property.
2022-03-05 23:00:22 +01:00
Evangelos Ribeiro Tzaras 792e90516a sip: media-pipeline: Split initialization per GstPipeline
This is the first step in getting rid of the requirement to have the codec set
during object construction. The goal is to have pipelines prepared in advance so
that the codec can be plugged in once negotiation is complete.

Having the pipelines prepared in advance let's us grab allocated local ports of
udpsrc elements for RTP and RTCP instead of setting those and hoping they're not
yet in use.
2022-03-05 23:00:21 +01:00
Evangelos Ribeiro Tzaras 86e76380c2 sip: media-pipeline: Allow pausing pipeline
We want to pause a pipeline in the multi call scenario.
2022-03-05 19:59:08 +01:00
Evangelos Ribeiro Tzaras 92c8a69e17 sip: media-pipeline: Initialize GStreamer if it's not already initialized 2022-03-01 18:04:18 +01:00
Evangelos Ribeiro Tzaras fee633e78b sip: media-pipeline: Prefix overriden GObjectClass methods
Purely cosmetical change to be in line with our style guide.
2022-03-01 18:04:18 +01:00
Evangelos Ribeiro Tzaras bf428f0fa6 sip: media-pipeline: Remove comment about preexisting linked pads
Since we're not reusing pipelines we don't have to check for any existing linked
pads.
2022-03-01 18:04:18 +01:00
Evangelos Ribeiro Tzaras 8c0d135298 media-pipeline: Put deprecated GStreamer function behind version check macro
gst_element_get_request_pad() is marked as deprecated in GStreamer 1.20.0 in
favour of gst_element_request_pad_simple()
2022-02-12 23:49:30 +00:00
Evangelos Ribeiro Tzaras 2520a9a555 sip: Avoid g_error for non-fatal issues
The media pipeline acting up does not warrant crashing the application.
2021-08-26 12:23:19 +02:00
Evangelos Ribeiro Tzaras 7988ddf85b sip: media-pipeline: Don't shadow props variable
As caught by compiling with `-Wshadow`
2021-06-03 19:46:45 +00:00
Evangelos Ribeiro Tzaras d6916b3510 sip: media-pipeline: Do not set the stream properties prematurely 2021-05-04 05:57:06 +02:00
Evangelos Ribeiro Tzaras 06076a864a sip: media-pipeline: Fix memory leak in error path 2021-05-02 02:36:31 +02:00
Evangelos Ribeiro Tzaras 9cd13ca681 sip: media-pipeline: Fix memory leak 2021-05-02 02:36:25 +02:00
Evangelos Ribeiro Tzaras 2ee6b23475 sip: media-pipeline: Allow overriding audio elements from environment
This is useful for tests where "pulsesrc" and "pulsesink" GstElements may not
be available (for example in CI).

Additionally only set the echo cancellation and buffer properties for the
pulse GstElements.
2021-04-20 09:47:16 +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 765cd2ebb9 sip: pipeline: Only inform of unhandled bus massages when debugging
These messages are mainly useful for development. This part will be rewritten
once we introduce structured logging. For the moment this will just add noise.
2021-04-16 00:39:42 +00:00
Evangelos Ribeiro Tzaras e6b730b805 sip: pipeline: clean up in finalize () 2021-04-03 00:46:29 +02:00
Evangelos Ribeiro Tzaras 19e7f8f119 sip-media: enable echo cancellation
by setting "filter.want" to "echo-cancel" for the pulsesink and pulsesrc
GStElement's.
2021-04-03 00:08:31 +02:00
Evangelos Ribeiro Tzaras cadaa6a3e0 sip: use g_return_if_fail and friends only for public functions 2021-04-03 00:08:31 +02:00
Evangelos Ribeiro Tzaras 017af5ec8b sip: pipeline: bind sockets for RTP
Add debugging information for used sockets
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