Using a single pipeline makes implementing encryption easier because we don't
need to duplicate srtpenc and srtpdec elements for each direction.
It also makes it easier to switch to using farstream down the line (see #426).
If the environment variable GST_DEBUG_DUMP_DOT_DIR is set, a graph of the send
and receive pipelines will be written to disk.
To generate a png from the exported dot files graphviz can be used like this:
`dot -Tpng -oimage.png graph.dot`
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
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.
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.
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.
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.
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.
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.
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.