Use provided macros for initrialise str objects everywhere instead of
manually setting .s and .len. This allows for flexibility to extend str
objects.
Change-Id: I5ebca0bc82b348301c2c8e94b974c7acbf249b82
... so that the desired wav channel can be controlled when producing a
mixed audio file
When a mixed wav file is created, the channels in the wav container are
currently allocated in the same order as each SSRC is received, meaning
it is impossible to know which channels have been allocated to the offer
or answer side of the call. Furthermore if there is a reinvite or media
file played, these are also allocated in the order that SSRC is received
- so an "answer" could end up sharing a channel with an "offer" with no
way of knowing this.
This patch allows you to specify how many channel slots should be
allocated within the mixer, and allows you to then specify which slot is
assigned to each media in the call (this will usually be 2 slots in
total, slot 1 for answer, slot 2 for offer or vice versa).
Ported from https://github.com/sipwise/rtpengine/pull/1852Closes#1857Closes#1852
Change-Id: I010208427cabc3a48d6ef7bd3a84e9a5bdcfd492
... from meta_free to meta_destroy
This change would ensure that the output media file is properly closed
and the MP3 file is correctly formatted
Closes#1853
Change-Id: I3dacea5257854b3cda19fa2fa38d6806b11d2783
... after file is opened
- Relocated chmod and chown operations from output_shutdown to output_config.
- Ensures file permissions and ownership are set immediately after file is opened.
Closes#1853
Change-Id: I1b60ce73fc44c9ac91400e7a234c30a697c48fcb
... to control output buffer flushing behavior
This commit introduces a new configuration flag `flush_packets`,
allowing control over whether the output buffer is flushed after each
packet during recording. When enabled, the file will grow continuously,
reducing latency and ensuring immediate availability for processing.
Closes#1848
Change-Id: I842bd1b2d6e6cf321cfda4cc3520bab47dafcaf4
Obsolete str_init(), rename STR_INIT() to just STR(), and replace all
instances of str_init() with STR().
no-op
Change-Id: I981529063ad2ea26089add467f7a84b638dbf423
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