Commit graph

1630 commits

Author SHA1 Message Date
Thulinma
b01df1f3f1 Spun out generalized segment reader class from HLS input 2024-09-24 15:07:24 +02:00
Thulinma
1dd27f215a Spun out MP4 parser into new mp4_stream.cpp; updated MP4 input to use it; added support for fMP4 to this new MP4 Stream library 2024-09-24 15:07:24 +02:00
Thulinma
7a3fd0c280 Only when running in Cygwin, auto-wipe shared memory files when the controller does its first boot, but skip on reboots and updates 2024-07-29 16:16:31 +02:00
Thulinma
2f57dcd65a Fixup for track resizing code 2024-07-22 15:47:16 +02:00
Thulinma
eed71b66d4 (M)JPG HTTP output support 2024-07-22 15:47:15 +02:00
Thulinma
ecd7e324dd Fix segfault in HTTP output when attempting to start a stream without source config 2024-07-22 15:31:59 +02:00
Thulinma
e17ae62751 Add nowms to stream info JSON responses 2024-07-22 15:31:59 +02:00
Thulinma
9fd34c95fa WebRTC improvements:
- Return ICE headers for WHIP/WHEP/WISH OPTIONS requests already to help clients that cannot change ICE servers post-SDP-request-generation
- Fixes to WebRTC WHIP/WHEP GET param parsing
- Added "constant" GET param for forcing constant-rate playback
- Use correct syntax for WebRTC Link headers
2024-07-22 10:17:21 +02:00
Thulinma
19f2388500 Document new track wait parameters correctly 2024-07-19 23:59:53 +02:00
Thulinma
a5d092c768 WebRTC: merge ICE sessions in into a single ICE session for all tracks 2024-07-15 11:53:20 +02:00
Thulinma
729b75ac2a Fix segfault when using a blank or extremely short source parameter with external writer 2024-07-15 11:47:26 +02:00
Thulinma
78a30e212e Added RTMPS listening port support 2024-07-15 11:47:26 +02:00
Thulinma
470e4fc631 Allow auto-resizing of track list, start off with a mere 4 instead of 100 and double it every time we run out of space 2024-07-15 11:47:26 +02:00
Thulinma
d0374812e4 Prevent race condition when grim_reaper thread is already trying to lock while the thread is being asked to shut down 2024-07-15 11:47:26 +02:00
Thulinma
3235006ae0 Fix segfault when destroying uninitialized Comms class 2024-07-15 11:35:40 +02:00
Marco van Dijk
95c25fe966 Fix MP4 input getting stuck when reading a 0 byte input 2024-07-15 11:35:40 +02:00
Thulinma
1c539fbcd9 Fix division by zero causing eternal loops 2024-07-11 11:26:16 +02:00
Marco van Dijk
2ee0259483 Various output fixes:
- Fixed several possible segfaults when selecting non-existing tracks in HLS
- Fixed error when requesting a stream with no compatible HLS tracks
- Fix a possible segfault when playing back an invalid track
- Fixed HLS cache control logic
- Fixed slow lookup of blank hostnames (now skips lookup entirely)
- HLS output replies with 204 rather than 200 for OPTIONS requests
- Removed out-of-the-box compatibility with iOS 10 and lower in the HTML output, in favor of better iOS 11+ support.
2024-07-10 16:21:47 +02:00
Thulinma
456fd2d555 Fix SRT input shutdown issues 2024-07-09 13:17:10 +02:00
Marco van Dijk
f009856b64 V4L2 camera support, raw pixel video support, added MistProcAV, improved MistProcFFMPEG
Co-authored-by: Thulinma <jaron@vietors.com>
Co-authored-by: Balder <balder.vietor@ddvtech.com>
2024-07-04 16:13:07 +02:00
Thulinma
03685fa3bd Improve invalid TS data detection 2024-07-04 14:41:44 +02:00
Thulinma
110c1a0013 Fixes? 2024-07-04 14:41:44 +02:00
Thulinma
f96a7201cf Do the thing™ 2024-07-04 14:41:44 +02:00
Balder
be8a348998 remove spam for UDP 2024-07-04 14:13:55 +02:00
Thulinma
7b18307981 Fix segfault in MistInRTSP when connection to buffer lost 2024-07-03 12:04:32 +02:00
Thulinma
8846c35b1b Change metadata to make afreecatv happy 2024-07-03 12:04:32 +02:00
Thulinma
5c8e91b07b Dozens of hours of debugging, yet only 1 character of changed code. 😩 2024-07-03 12:03:11 +02:00
Thulinma
6eec3661ca Add support for non-URL-compatible parameter parsing (taking + to not mean space, not encoding as such either) and uses it for RTMP auth 2024-07-03 12:02:53 +02:00
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