Commit graph

1602 commits

Author SHA1 Message Date
Thulinma
8664daeb9a Improve and robustify local UDP port handling 2024-07-03 12:00:12 +02:00
Thulinma
c6c20c3e7c 🤦 2024-07-03 12:00:12 +02:00
Thulinma
9dc9bf64ee Added X-Attempt header to HEAD and POST requests in Downloader 2024-07-03 12:00:12 +02:00
Thulinma
d1e518ae9b Added trigger instance ID and instance name headers 2024-07-03 11:03:28 +02:00
Thulinma
3422b1dbcd Remove Windows-specific shared memory implementation 2024-06-27 10:45:54 +02:00
Thulinma
e75381ae39 Improve logging when running in cygwin 2024-06-27 00:09:41 +02:00
Thulinma
6118a005f7 Robustify logging code 2024-06-27 00:07:28 +02:00
Ivan Tivonenko
7a8e90e1a2 show process name on all platforms 2024-06-27 00:07:14 +02:00
Thulinma
a84e1ef4b4 Fix segfault when target for a push is smaller than the smallest extension
Change-Id: Ifbfb89828030f72b05f919265c4dc57f1ed32325
2024-06-10 15:44:50 +02:00
Thulinma
b103353cf9 Improve WebRTC things, fix CPU usage 2024-05-23 13:50:52 +02:00
Alex Henrie
ea47e19129 Fix spelling mistakes identified by Lintian
Co-authored-by: Thulinma <jaron@vietors.com>
2024-05-16 17:28:03 +02:00
Alex Henrie
a1fbb9e186 Allow any RTP/AVP payload type to be dynamically assigned
The Bosch FLEXIDOME 4000i camera sets the RTP payload type to 35 for
H264, which causes MistServer to output "FAIL: Payload type 35 not
supported!"

The camera probably uses 35 for H264 because the ATSC standard requires
it. A/153 Part 7 states: [1]

> In addition, for RTP packets that carry AVC video elementary stream,
> the payload_type field in the RTP header shall have value 35.

The camera also sends "a=rtpmap:35 H264/90000" to explicitly map the
value 35 to H264. This is perfectly valid; although payload types 96
through 127 are recommended for dynamic use, the RTP protocol allows any
AVP payload type to be dynamically reassigned. The relevant section of
RFC 3551 states: [2]

> This profile reserves payload type numbers in the range 96-127
> exclusively for dynamic assignment.  Applications SHOULD first use
> values in this range for dynamic payload types.  Those applications
> which need to define more than 32 dynamic payload types MAY bind
> codes below 96, in which case it is RECOMMENDED that unassigned
> payload type numbers be used first.  However, the statically assigned
> payload types are default bindings and MAY be dynamically bound to
> new encodings if needed.  Redefining payload types below 96 may cause
> incorrect operation if an attempt is made to join a session without
> obtaining session description information that defines the dynamic
> payload types.

If the payload type is not recognized, assume that an rtpmap line will
follow that defines it. If in the end there is no rtpmap line, error out
in the same way whether the payload type is between 96 and 127 inclusive
or whether it is outside of that range.

[1] https://prdatsc.wpenginepowered.com/wp-content/uploads/2021/04/A153-Part-7-2012.pdf#page=14
[2] https://datatracker.ietf.org/doc/html/rfc3551#page-6
2024-05-16 16:39:13 +02:00
Thulinma
dbafa808b8 Fix Cygwin compilation:
- Fix various incompatibilities and differences between Linux and Cygwin builds
- Make usrsctp an optional dependency
- Fix building without SSL
- Add new secure random bytes function, use it for websockets
- Switch to libsrtp2 v2.6.0 (currently latest release)
- Add patch that makes latest libsrtp2 build in latest Cygwin
- Add patch that makes srt build in latest Cygwin
- Correctly allow linking libsrtp2 and srt to local mbedtls version
2024-04-25 12:44:38 +02:00
Thulinma
db30be38c5 Fix header includes to be a bit more consistent 2024-04-25 12:44:38 +02:00
Gijs Peskens
ebe783666f Support for upstream mbedtls versions 2 and 3 when compiled with SRTP support
Co-authored-by: Thulinma <jaron@vietors.com>
2024-02-22 17:45:47 +01:00
Thulinma
3987cfec3f Support for WebRTC data tracks (output only, for now), rewrite of dTLS integration (now part of socket lib), support for multi-path WebRTC connections 2024-02-22 17:45:44 +01:00
Thulinma
6bec4066a9 Added stream tagging support 2023-12-20 15:42:27 +01:00
Thulinma
ac58015e02 Added Meta::packetTimeToUnixMs, fixed datetimes in m3u8 recordings 2023-12-13 16:00:31 +01:00
Marco van Dijk
d2d4b0acbe Segmenter: added noendlist url param to omit the ENDLIST tag 2023-12-13 16:00:18 +01:00
Marco van Dijk
d040421df9 WHIP: packet pacing fixup for WHIP/WHEP output 2023-12-13 12:58:13 +01:00
Thulinma
b9819eb40f MistInHLS improvements and speedups, part 4/2 2023-11-27 15:02:12 +01:00
Marco van Dijk
382e1eec03 MistInHLS improvements and speedups, part 3/2 2023-11-27 15:02:12 +01:00
Thulinma
26746c139d Fix buffer behaviour after changes for MistInHLS 2023-11-27 14:18:16 +01:00
Marco van Dijk
9e30444476 MistInHLS improvements and speedups, part 2/2 2023-10-23 14:21:45 +02:00
Thulinma
4d3f86aec1 Fixes to MistOutSanityCheck utility 2023-10-17 00:13:45 +02:00
Marco van Dijk
5af441d16b Fixes for segfaults when the connection to the metadata gets lost
Set stream RelAccx pages to null pointers if we cannot reload those pages
2023-10-17 00:13:45 +02:00
Balder
d63190387a Fixes to better support Safari/MacOS/iOS playback of MP4 output
Co-authored-by: Marco van Dijk <marco@stronk.rocks>
Co-authored-by: Thulinma <jaron@vietors.com>
2023-10-17 00:13:45 +02:00
Thulinma
7dbd60b208 Support limiting output range for most outputs and outgoing pushes 2023-10-17 00:13:45 +02:00
Thulinma
3e2a17ff93 Various metadata-related features and improvements:
- Added support for new "NowMs" field that holds up to where no new packets are guaranteed to show up, in order to lower latency.
- Added support for JSON tracks over all TS-based protocols (input and output)
- Added support for AMF metadata conversion to JSON (RTMP/FLV input)
- Fixed MP4 input subtitle tracks
- Generalized websocket-based outputs to all support the same commands and run the same core logic
- Added new "JSONLine" protocol that allows for generic direct line-by-line ingest of subtitles and/or JSON metadata tracks over a TCP socket or console standard input.
2023-09-26 17:10:23 +02:00
Thulinma
f3ba13d6bb Change controller calls that use stream metadata to instantly time out if unavailable, rather than waiting for availability 2023-08-31 15:39:20 +02:00
Marco
b0d4422d27 Added machine readable exit reasons, INPUT_END trigger, OUTPUT_END trigger, and updated RECORDING_END trigger to include all of these. 2023-08-23 10:55:53 +02:00
Thulinma
41cf557b48 TSSRT and TSRIST outputs in listen mode will now request not to be killed by the Comms library, since they handle multiple users 2023-07-24 10:37:42 +02:00
Thulinma
0ec2800894 Split out jitter timer to be one per metadata, clear out jitter data when clearing as well 2023-07-20 10:39:43 +02:00
Thulinma
a9abfa531e Support for AV1 MP4 input and output 2023-07-17 18:46:16 +02:00
Thulinma
8b8a28c4ec Added some HTTP parser unit tests, fixed HTTP support for zero content length, added gcovr file for coverage reports 2023-07-17 18:22:03 +02:00
Thulinma
9a599a06de Fix local file path writing 2023-07-17 18:17:35 +02:00
Thulinma
b7d5964512 Keep capabilities and protocol config around after close, retry opening pages for ~50ms, no longer warn in save situations of SHM re-use 2023-07-17 18:10:23 +02:00
Marco van Dijk
e0eb624e53 Change "always on" behaviour to simulate always having viewers rather than forcibly keeping inputs active 2023-07-06 13:06:18 +02:00
Thulinma
b3a0e28159 Fix broken UTF-8/UTF-16 conversion in JSON library 2023-07-06 10:56:36 +02:00
Thulinma
b8caa9c398 Fix segfault when using a blank or extremely short source parameter 2023-06-19 17:29:40 +02:00
Thulinma
d7ec340d7e Fix local file targets when pushing to non-full-path 2023-06-19 17:25:08 +02:00
Thulinma
2a8f2f75d3 Implemented UDP socket packet send pacing, WebRTC now makes use of this new feature. 2023-06-15 12:34:25 +02:00
Thulinma
a1232d56af RTP library fixes and improvements.
- Fixes marker bit bug in H264 output over RTP-based protocols
- Fixes RTCP packets going over the wrong channel in TCP-based RTSP
- Fixes RTSP RTCP packets having wrong timestamps
- Fixes payload padding parser bug in H264, H265, VP8 and VP9 RTP-based inputs.
- Cleans up WebRTC's needless use of thisPacket.getTime() to use thisTime instead
2023-06-15 12:33:24 +02:00
Thulinma
132e59db51 Support for reloading config from disk, writing config to disk after 60 seconds of no changes, reloading config from disk on API call request 2023-06-12 11:47:28 +02:00
Thulinma
cac86fff57 Various small fixes to SRT sockets and SRT socket statistics 2023-06-08 17:31:39 +02:00
Thulinma
0af85de22d UDP API port is now stored in and read from global config 2023-05-01 15:21:10 +02:00
Thulinma
a784b63f36 Added "bframes" stream selector 2023-04-13 10:09:14 +02:00
Thulinma
f29d48154f URIReader support for TS input 2023-04-10 15:13:20 +02:00
Thulinma
1df76eff16 URIReader optimizations/improvements, support for getHost/getBinHost functions, socket lib improvements + related improvements 2023-04-10 14:31:26 +02:00
Thulinma
4df771eb02 Optimization that allows Socket::Buffer to write directly to a Util::ResizeablePointer 2023-04-10 14:31:26 +02:00