Revert of 128e84e and implement for io_uring poller
Turns out that this function is necessary to prevent out-of-order writes
to a streambuf once the connection is open.
Use a simple array to keep track of blocked fds under uring.
Change-Id: I4af2a64071030fd4892dde88547705230aec59fd
Some source strings are `const char *` and we don't have an alternative
`str` type pointing to a const buffer. Strictly speaking some buffers
aren't even char buffers, yet we use the `str` type to manage them. This
eliminates the need to explicitly cast every usage.
Change-Id: Ifd3cdd3d400fc483e6c488a95e9381938e63cc7f
Support a replacement pattern of %{...} to look up arbitrary keys from
the given metadata and use the respective values.
Change-Id: I2cc6c791629ed494b32e3352a555298c3b9cb4fc
Parse out the :| separate list of metadata keys when the metadata is
loaded, and stored it in parsed format, instead of doing when running
the DB update and discarding the result.
Functional no-op.
Change-Id: I96d706d63eb9337ba572a7f17363cbda553745f6
Handle the `output-destination` flag in the same way as the `metadata`
flag, eliminating the need to do it explicitly everywhere it's relevant.
Add a few alternative spellings of `output-destination`.
Rename the member from flags to `recording_file` to make it more clear
what it is.
Add save/restore capabilities of that field to the Redis code.
Unify printing of monologue LABEL into the same function that handles
the metadata.
Update documentation to better explain this option, and use the new
clearer name.
Change-Id: I4496341013b0ccab5b1dec026cf3a1a0ea879018
Fix all instances of argument-less function signatures.
Fix all instances of auto-cleanup variables declared after they need to
be in scope.
Change-Id: I3a005df03ede971e08d4f62d7c7711a1913fda5e
... stream after a reconnect
if we're in the middle of a disconnect then ssrc_tls_state may have destroyed
the streambuf so we need to skip the rest of the function, otherwise the now
null pointer is passed into streambuf_write, which will return immediately and
the metadata will have been marked as sent when it hasn't been
closes#1694
Change-Id: I679fdd0ff9245e4413bc5a5ab40a70ea4f9ef7c0
We need to loop over the read(fd) as we're calling epoll using
edge-triggered semantics.
Reported in #1676
Change-Id: I8f36b76c1ab32cf5c97b3dff1acf4e3e081ea33e
Adopt the logic for flexible output names from single output files also
for mixed output files. Refactor both code paths into a single shared
function.
Updates #1667
Change-Id: I8ff4ea0a169dc39ae384e9c1e601ceded325d5df
Packet processing (decoding, encoding, file writing, etc) happens with
the main parent object (metafile) unlocked and only with the specific
child object (SSRC) locked.
During teardown we close all SSRC objects with the metafile locked,
without locking the SSRC objects. This opens up a race condition during
which SSRC closing can happen at the same time as packet processing.
Fix this by locking each SSRC object during teardown, and also clear out
the SSRC hash table while the metafile is locked, which serves as a
marker to a packet processing thread that processing should be skipped.
Closes#1663
Change-Id: I4e8a6a5abfd678a6cfd794a98470a49d60694207
If the forwarded streams of a call are later combined without the inserted
silence, the resulting mix may end up with them out of sync. This
is already handled when outputting mixed files so the same functionality
from mix.c has been added for tls forwarding
Pandoc is available even on stretch, and unlike ronn is
actively maintained.
Fix -- markdown escaping.
Use __x__ for bold, and *x* for italics.
Remove .8.ronn symlinks.
Change-Id: Iff70e2b405f3b9ede856abf94d42fc51afb9f809
For a compatibility reasons (with other doc files and with RTD)
the `rtpengine.pod` and `rtpengine-recording.pod` file get
converted to the Markdown syntax.
The compilation of MD syntax synopsis files will work
using `ronn` application, which converts them to man pages.
Change-Id: I75b54a712786a0a237c51c702ed1a2cc09e3a033
Due to a unification of the way we store documentation files,
the 'rtpengine-recording.pod' has been moved to the 'docs/' folder.
This 'docs/rtpengine-recording.pod' will be later used for the RTD a source.
Change-Id: I5267bd74358aa46d174ba4778f2f11651c6d0ba6
When the `discard-recording` flag is given in one of the commands to
rtpengine (e.g. in the `delete` command), the metafile is renamed to a
.DISCARD suffix and then deleted.
The recording daemon then, seeing the .DISCARD suffix, proceeds to
immediately close all recordings, delete the files if any, and delete
the entries from the DB.
Change-Id: I3f0cac129f2d56cbccd770d43bf434dea6c0a0db
The `encoder` is actually persistent and only freed when the output is
freed, so testing for its existence is not enough to determine whether
the output is open. The `fmtctx` can be used for that.
Change-Id: I2cc3f00a0e983fafd5915736089a0421385b6ce3
A simple circular audio buffer that allows mixing multiple sources of
audio. Sources are tracked by SSRC and all sources are expected to
provide audio in the same format (same clock rate, channels, sample
format).
Only one consumer per buffer is supported, which is expected to retrieve
buffered audio at regular intervals (ptime) and so continuously empty
the buffer.
The first audio source to write into the buffer at the leading edge of
the circular buffer has its audio simply copied into the buffer, with
the leading edge advanced, while other later sources writing into the
buffer mixed into the existing buffered audio at their respective write
positions.
Change-Id: I0f6642b036944508f2a33420359de488ef8b991c
Debian stretch has an old libcurl which doesn't support MIMEPOST.
Disable the entire feature if libcurl is too old.
Change-Id: Id1d2a4d821671142523af355188f21ff06ad20f1