Richard Fuchs
8f6af92d27
MT#55283 check for null return first
...
Don't crash on undecodable packets
Fixes #2004
Change-Id: I138d7c99aaedfea12adf520d0b29ffd70ebfbe69
(cherry picked from commit 2aed497528 )
9 months ago
Richard Fuchs
9f1b740510
MT#55283 fix possible tcp-mixed segfault
...
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
(cherry picked from commit ff5abd4216 )
9 months ago
Richard Fuchs
0548168a0a
MT#55283 use explicit started flag
...
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
10 months ago
Richard Fuchs
14acdb2fb2
MT#62571 don't open TCP when forwarding is not on
...
Change-Id: I04842b98675f5ce88e83a3b61ce29ab01c996169
10 months ago
Richard Fuchs
ceb0639342
MT#62571 wait with mix outputs until metadata
...
closes #2000
Change-Id: I3bb58dff51632e1314300b5c0dc5aa35dec2284e
10 months ago
Richard Fuchs
ed68ee3ca5
MT#61977 add GCS storage option
...
Change-Id: Idc97ea18bae6215379072bbec05a7b5afae73f00
10 months ago
Richard Fuchs
1546d8a23b
MT#61977 add oauth/JWT helpers
...
Change-Id: Ic8e54fb23f0f6403da638adaf5c3600f767caf90
10 months ago
Richard Fuchs
0d1eeddd14
MT#61977 add S3 storage option
...
Change-Id: Ifa84b06a88189440b8e16da7f079a1dbdaf87125
10 months ago
Richard Fuchs
c13c9166e2
MT#61977 add up/download capability to HTTP
...
Change-Id: I50334482c9316aed5315ad5814ae54081856ef90
10 months ago
Richard Fuchs
453ede0913
MT#61977 add http/curl wrappers
...
Change-Id: Iefa4f0acfadabae38ff1da4c20dda51718f9580f
10 months ago
Richard Fuchs
3670f75448
MT#61977 turn DB writing into a notification
...
Change-Id: I7a3d0ad048bc88aa638adfc618c60fe510f254c4
10 months ago
Richard Fuchs
c425a655db
MT#61977 add return value to execute_wrap
...
Change-Id: Ic4188e266f0df323f2a30d7323c7f9a86871b66a
10 months ago
Richard Fuchs
bc9fc1e443
MT#61977 add notification failure handling
...
Change-Id: Ide4d8429d57f53d0f759fa8a1255be9e06d94515
10 months ago
Richard Fuchs
b5019b8725
MT#61977 move notification types
...
Change-Id: I8fb1cc1caf7c5ae887f4c22745d66ef85a354b46
10 months ago
Richard Fuchs
d122b39313
MT#61977 introduce content_t
...
Refcounted object to contain media content
Change-Id: Idd9fe65051cf90930204bd83ee2125d1d4b79237
10 months ago
Richard Fuchs
d484e2d844
MT#61977 generalise notification mechanism
...
Change-Id: I8e72cb617f3da8586ca345d601b92b9bcadb29d7
10 months ago
Richard Fuchs
09c87d5464
MT#61977 move cleanup of notifiers
...
Destroy thread pool only after everything is finished using it
Change-Id: Iab8667b3a80aaf43581b19b03ff6191dfe69c8d6
10 months ago
Richard Fuchs
74bc521eab
MT#61977 use _get_content for notifications
...
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
10 months ago
Richard Fuchs
e8973a6d0c
MT#61977 support output-storage=none
...
Change-Id: I8b689d803326a633d52888fc8ed5607fca514c45
10 months ago
Richard Fuchs
820de80c14
MT#61977 convert notify-record option
...
Turn it into an output-storage option.
Change-Id: Id90be28f827117c0f276f9f44c9d25de8d42a43e
10 months ago
Richard Fuchs
00a6119cff
MT#61977 reverse logic for file open mode
...
Use write-only mode only if file storage and no other storage is
enabled. Use read/write for all other cases.
Change-Id: I3eea79d8a572b3985015b48cda227ab2b8d9e978
10 months ago
Richard Fuchs
c066b69df5
MT#61977 streamline output_close
...
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
10 months ago
Richard Fuchs
b2837eddbc
MT#61977 move unlinking to output_close
...
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
10 months ago
Richard Fuchs
6a939c40f4
MT#61977 split up output_setup
...
Change-Id: I800247cfbf6e4b5ed3f92658d623fad785d192f0
10 months ago
Richard Fuchs
496ae5f535
MT#61977 split up output_config
...
Change-Id: I447a8bb52bd800f2a1a1167e89b363cfa3517bcf
10 months ago
Richard Fuchs
644b66477d
MT#61977 rename functions
...
Change-Id: I362e1753603fb0be57fabb705a10510bf03d0b8a
10 months ago
Richard Fuchs
844a7e018b
MT#61977 remove unused function
...
Change-Id: I171b7eedb1fd3686ce8c5b2b071511daaca3cb36
10 months ago
Richard Fuchs
28884150b7
MT#61977 remove logically dead test
...
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
10 months ago
Richard Fuchs
428999c376
MT#61977 turn output-storage= into list
...
Change-Id: I74bad7993ef213ca374abcb6310b9693a2af13f6
10 months ago
Richard Fuchs
e2e4d8f401
MT#55283 fix DB metadata output
...
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
10 months ago
Richard Fuchs
0c06ed0f3f
MT#61977 fix DB timestamping
...
Change-Id: I538d0b942b889b7018488e546e97f36449991569
10 months ago
Richard Fuchs
59279674bf
MT#55283 make sure DB entry exists
...
Change-Id: I54380be963b3526d2a6330aae64bc3b6e8f41559
10 months ago
Richard Fuchs
1e0c91c372
MT#55283 move option to correct section
...
Change-Id: Ied55e0859f8c8dd3387d2b564ddde09d26b1afef
10 months ago
Richard Fuchs
4cfaf1a3cf
MT#63151 remove duplication of files during make
...
Change-Id: I67f45a52660b089748c4f6f76c564bbc97fa1899
11 months ago
Richard Fuchs
e600a58502
MT#63151 make poller.h override more specific
...
Change-Id: I6ec6fdde8305615dc999021568a1277f22d3e075
11 months ago
Donat Zenichev
03e6b84ebc
MT#61856 recording-daemon: output.c make some of funcs static
...
Just because of only local usage, keep them static.
Change-Id: I0bd3badd3abb6166a7d16aab07a943d7b36594b3
12 months ago
Donat Zenichev
2fd148032c
MT#61856 recording-daemon: update const qualifiers
...
Don't use const in:
- output_avio_mem_write()
- output_avio_write()
`avio_alloc_context()` of avio.h lib wants buf
to be non-constant.
Also it's the only usage of locally defined funcs,
moreover:
- output_avio_write() has fwrite() that protects buf with const
- output_avio_mem_write() casts given buf to `const char*`
Fixes:
output.c: In function ‘output_config’:
output.c:405:39: warning: passing argument 6 of ‘avio_alloc_context’ from incompatible pointer type [-Wincompatible-pointer-types]
405 | NULL, output_avio_write, output_avio_seek);
| ^~~~~~~~~~~~~~~~~
| |
| int (*)(void *, const uint8_t *, int) {aka int (*)(void *, const unsigned char *, int)}
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
from types.h:9,
from output.h:4,
from output.c:1:
/usr/include/x86_64-linux-gnu/libavformat/avio.h:468:25: note: expected ‘int (*)(void *, uint8_t *, int)’
{aka ‘int (*)(void *, unsigned char *, int)’} but argument is of type
‘int (*)(void *, const uint8_t *, int)’ {aka ‘int (*)(void *, const unsigned char *, int)’}
468 | int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int (*)(void *, const uint8_t *, int) {aka int (*)(void *, const unsigned char *, int)}
int (*)(void *, const uint8_t *, int)
output.c:409:39: warning: passing argument 6 of ‘avio_alloc_context’ from incompatible pointer type [-Wincompatible-pointer-types]
409 | NULL, output_avio_mem_write, output_avio_mem_seek);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(void *, const uint8_t *, int) {aka int (*)(void *, const unsigned char *, int)}
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:316,
from types.h:9,
from output.h:4,
from output.c:1:
/usr/include/x86_64-linux-gnu/libavformat/avio.h:468:25: note: expected ‘int (*)(void *, uint8_t *, int)’
{aka ‘int (*)(void *, unsigned char *, int)’} but argument is of type
‘int (*)(void *, const uint8_t *, int)’ {aka ‘int (*)(void *, const unsigned char *, int)’}
468 | int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory '/home/donat/git/sipwise/rtpengine/recording-daemon'
Change-Id: Ied4936fe24d55c241a3f72550e643368a014c181
12 months ago
Richard Fuchs
2845bb1efa
MT#62571 streamline resampling
...
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
12 months ago
Richard Fuchs
ef3b1c2956
MT#62571 support mixed TLS/TCP output
...
Change-Id: I8f2b6372e9379d1845245f95bb69498661fbebf9
12 months ago
Richard Fuchs
549e98e3dc
MT#62571 generalise tls_fwd_new
...
Change-Id: Icfb9487e98bb8c4dfbb728299373327c5693330d
12 months ago
Richard Fuchs
6476b8156e
MT#62571 generic mix sink
...
Change-Id: Ia02ed34cd7d8ddb39b4e3c6f8c051ab92abb355f
12 months ago
Richard Fuchs
15465d0878
MT#62571 allow creation of mix after streams
...
Change-Id: I98a45fb7394e561010a36772e9c56395e80ca26e
12 months ago
Richard Fuchs
7dfe1e30f5
MT#62571 support sending multi channel audio
...
Change-Id: I8e79b7b873308f9ed2bedbe18a4f61a6e7c3ae93
12 months ago
Richard Fuchs
a14c20d04e
MT#62571 turn tls_fwd into sink
...
Change-Id: Ic859d0dd65156761007641ccd3f4e710d7e7fa9f
12 months ago
Richard Fuchs
aa627d78ec
MT#62571 further encapsulate tls_fwd
...
Change-Id: I790ac03ee4f51027d080b9152a4cae8c995e93c1
12 months ago
Richard Fuchs
5ebd94d742
MT#62571 turn tls_fwd into allocated obj
...
Change-Id: Ie766b483a51bca7f2677f7ccf029379302437067
12 months ago
Richard Fuchs
ad063360bd
MT#62571 encapsulate tls_fwd
...
Change-Id: I06b925e2eb2bbdb7a4741a93a64701f495409616
12 months ago
Richard Fuchs
06c89206c1
MT#62571 turn mix output into sink
...
Change-Id: I59140d641679b84ce3831ba1dcad07e38deda46f
12 months ago
Richard Fuchs
316161f6aa
MT#62571 add sink to decode_t
...
Unused at this point except for the resampler
Change-Id: I093d7924c0bcc42a9a5162e1f02a374ea97e1bf3
12 months ago
Richard Fuchs
293b393177
MT#62571 remove output_config from decoder_new
...
Change-Id: I7a15c7657bc3a3492a3e7659b9c3473bb07f5e9a
12 months ago