when under load it's possible that a metafile gets updated by rtpengine
while it's still being read by the recording daemon. this can result
in a WARNING being logged and the loop breaking. That section ends up
unprocessed and any changes in it don't get applied.
This change only updates the offset after a successful section read.
Therefore, if a section is incomplete and the loop breaks, the next
inotify event will retry that incomplete section and it should succeed
Closes#2008
Change-Id: Ie48b66e7578597f5b75f957e3b5cc793628282dd
The mix sink points into the tls_fwd object, so we must not free it
during operation, such as when a connection error occurs.
Separate out object creation and connection setup functions. Reset
object state at connection error, but don't free the object.
Make reconnect attempt part of checking the connection state.
Change-Id: Ib551532c47236afe5ec22711fcc161a8535338e4
Metadata might be empty, so we can't rely on that being set as a start
trigger. Use an explicit one.
Follow-up-to: I3bb58dff
Change-Id: I95f02a1179940cedc3f96ce70557658c43e79bdc
Use the new _get_content function to provide the notification content to
cURL in memory instead of making it read a file. This makes it possible
to use it together with DB storage.
This also relieves the notification poster from deleting the file if the
"purge" option is set, making it possible to simply roll it into file
output being disabled.
Retain legacy support for the "purge" option.
Change-Id: Ia1d59018d79777759de894aba1d888c927e5ba00
Use write-only mode only if file storage and no other storage is
enabled. Use read/write for all other cases.
Change-Id: I3eea79d8a572b3985015b48cda227ab2b8d9e978
Introduce output_get_content as a central point to obtain the contents
of a recording, whether stored as a file or in memory.
Cache contents so that we don't have to read a file multiple times.
Delegate closing of the recording file to output_close.
Change-Id: Ic5471b840d86966f547b3b8ea4bac7eca012c474
Return success indicator from db_close_stream and use that to decide
whether to unlink the file. If DB storage failed then we can retain the
recording on file.
Change-Id: I91520f0ded223965a7a9cb1f200b8af06f555427
if ((output_storage & OUTPUT_STORAGE_MEMORY))
goto no_output_file;
jumps over this code, so there's no point in testing for
OUTPUT_STORAGE_MEMORY
Change-Id: I95eec8904714c9ab06f066ac4bb59ec0413e6916
Delay writing of call DB entry until a metadata has been set, even if
empty. This is so that we can know whether "skip DB" was set or not.
Check DB entry status with every event, not just when streams are
created. Stream may get created before all relevant data for DB entries
is there.
Change-Id: I4834c83d83cd367c9570840d7c57e9a3223c195f
Move destination format information into the sink object.
Decode each codec directly to its matching output format and leave
resampling to the sinks.
Move managing of the adjusted multi-channel output format into the mix
context.
Make sure all inputs to a mix outputs use the same audio format.
Change-Id: Ib9f334443bfee26d59f2ede6e13ac80c66c1b57e