Commit graph

406 commits

Author SHA1 Message Date
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
0af85de22d UDP API port is now stored in and read from global config 2023-05-01 15:21:10 +02:00
Marco van Dijk
9779940c76 Segmenter: do not split if this results in a tiny segment at the end, added flag for adjusting split time, always adjust targetDuration upwards to the largest segment found 2023-04-13 09:53:57 +02:00
Thulinma
c979acff52 Fixing all of the things. 😩 2023-04-10 14:15:00 +02:00
Thulinma
69f84d4409 Cleaner exit when stream source shuts down 2023-04-10 14:15:00 +02:00
Thulinma
d6e2da90f5 No longer reconnect to metadata - happens automatically as-needed. 2023-04-10 14:15:00 +02:00
Thulinma
6b88525e2f Generic input page loading re-prioritization edit 2023-04-10 14:15:00 +02:00
Thulinma
c2bb0e62b7 Bugfix: don't get stuck waiting for requests when pushing out fails to connect to input 2023-03-08 10:26:30 +01:00
Thulinma
e9ea839996 32-bit fixes 2023-02-27 10:43:02 +01:00
Marco van Dijk
2b18a414b4 Added support for external writers 2023-02-22 13:25:42 +01:00
Marco van Dijk
211d9eac30 Various fixes to generic segmenter code
Segmenter: when using the external writer, do not re-open a playlist to adjust the target duration
Segmenter: edit comments and fix logic for opening the playlist with streams which are live and vod at the same time
Segmenter: fix init of playlist data when using an external writer
2023-02-17 03:38:20 +01:00
Marco van Dijk
ea25d4b74b Scheduled Pushes
Change-Id: I3d3a75f4a45d96e6a7849b14634caedd0899ac69
2023-02-09 17:51:45 +01:00
Alex Kordic
39af304e0c size_t != uint64_t
Change-Id: Idf7137a7e385dec6600fe73be5d978af2fde76f0
2023-01-26 19:43:55 +01:00
Marco
03771ccac2 Changed HTTPTS-based playlist writer into a generic format-agnostic playlist writer
Change-Id: I503110bca3a557342ce9a21c64824a916725a79b
2023-01-24 02:17:28 +01:00
Thulinma
877216efd0 connectToFile edit that allows for custom socket passing
Change-Id: Id5da9d9c50d1997f997c9e738d8f680098901509
2023-01-24 01:40:41 +01:00
Marco van Dijk
67168b9644 Fix segfault when all selectable tracks dissappear
Change-Id: Ia3a80face7e3e08aa0c7e04fd30e4cf261337573
2023-01-05 14:24:29 +01:00
AlexKordic
1aaaeebb24 Hard to reproduce & hard to spot race condition. (#136)
In case shared memory was resized, under `loadPageForKey()`, `loadPageForKey()` was looking at outdated data set.
2022-12-12 20:24:38 +01:00
Thulinma
0864a6324b Fix edge case in seeking where seek happens at exact time of packet header write 2022-12-12 20:24:38 +01:00
Thulinma
b571d1c0c5 Removed extraKeepAway value, superseded by MinKeepAway from track metadata 2022-12-12 20:24:38 +01:00
Thulinma
4181b52857 Silence more compile warnings, fix compilation on MacOS 2022-10-27 14:50:38 +02:00
Thulinma
0674443066 Fix push outputs to use the correct remote addresses 2022-10-10 14:16:48 +02:00
Marco van Dijk
8ac486b815 Completed new sessions system
Co-authored-by: Thulinma <jaron@vietors.com>
2022-10-05 03:13:52 +02:00
Ramkoemar
074e757028 Sessions rework 2022-10-05 03:09:58 +02:00
Thulinma
4084768a3e Improved incoming push accept timing 2022-08-08 10:57:22 +02:00
Thulinma
35a54dbd61 Fixed auto-seeking when adding tracks to an existing track selection 2022-03-10 10:32:00 +01:00
Thulinma
c3a09f5fe2 Fix RTMP push delay, specifically 2022-02-11 17:25:34 +01:00
Thulinma
4d1046f72a Fix pushdelay option 2022-02-09 12:15:12 +01:00
Thulinma
0951758d2f Fix track dropping if userSelect empty but buffer is not 2022-01-24 16:07:54 +01:00
Thulinma
10b134d062 Allow waiting for specific track counts with specific timeouts 2022-01-23 00:18:27 +01:00
Thulinma
f560b88bfe Several fixes:
- Fixed bug in stream health function causing loop if track not active
- Fixed DTSC pulls ignoring data before the live point
- Improved async buffers (deque mode) to spread the tracks more fairly
- DTSC pull now implements "ping" and "error" commands
- DTSC pulls report suspicious keyframe intervals to the origin and ask for confirmation
- DTSC output now accepts these reports and disconnects if there is no match in keyframe intervals
- Outputs in async mode now keep the seek point in all tracks when reselecting
- Outputs in async mode now default to a starting position in each track that is at a keyframe roughly halfway in the buffer
- Outputs in async mode now ignore playback rate (always fastest possible)
- Removed code duplication in prepareNext function
- Reordered the prepareNext function somewhat to be easier to follow for humans
- DTSC output no longer overrides initialSeek function, now uses default implementation
- Sanitycheck output now supports both sync and async modes, supports printing multiple timestamps for multiple tracks
2022-01-23 00:03:54 +01:00
Thulinma
b89875ea37 No longer print warning for page load failures caused by a user disconnect 2022-01-23 00:02:50 +01:00
Thulinma
72cfc82a9f Robustified disconnect/reconnect functions in Output 2022-01-23 00:00:42 +01:00
Thulinma
200e1e4a1c WS/MP4 reliability edits:
- Stream selecting now obeys new "maxdelay" capa entry
- Output::liveSeek now takes an optional bool argument to indicate only rate control should be applied (no seeking)
- dataWaitTimeout is now configurable per-output, defaults to the old 25s
- WS/MP4 uses the new liveSeek with rate-control only
- WS/MP4 uses the new dataWaitTimeout and sets it to 4.5s
- WS/MP4 uses the new maxdelay capa, sets it to 5s
- WS/MP4 will now auto-reselect tracks if a track is dropped for data wait timeout or disappeared from metadata reasons
- Added support for jitter information in WS/MP4 protocol
- Robustify sendWebsocketCodecData being ran when sendHeader is ran
- Fix race condition when switching video tracks before previous video track has sent a single frame
2022-01-22 23:59:09 +01:00
Marco van Dijk
3d9ed39396 setstreamVodField and streamLiveField no longer mutually exclusive
Removed curPage map from IO. bufferFrame now creates this variable locally and passes it to bufferStart, bufferFinalize and bufferNext
Fix keyNum selection with mixed live & VoD data
Fix bufferframe to handle mixed VoD and live
Added check to bufferFrame to not start the countdown timer for removing live pages
Fixed countdown timer being set using keyNum rather than pageNumber, which resulted in the wrong pages being deleted
livePage variable moved from static to private variable to correctly handle multithreaded inputs

# Conflicts:
#	src/io.cpp
#	src/output/output.cpp
2021-11-22 15:38:58 +01:00
Thulinma
6733bf2a20 Fixed all ARM-related issues/warnings/etc 2021-11-04 18:49:27 +01:00
Thulinma
dae32ede11 Added Util::packetSorter with async/sync modes, set DTSC outputs to use async mode 2021-11-03 14:15:52 +01:00
Thulinma
6042c1ea70 Added per-protocol default track sorting option 2021-11-03 14:15:46 +01:00
Thulinma
f8251cc115 Fix fallback stream, added support for stream variables in fallback stream 2021-10-27 15:39:34 +02:00
Marco
8b59c9abe7 Fix recstart/recstop parameters 2021-10-19 22:29:42 +02:00
Thulinma
4358215692 Removed target not changed message 2021-10-19 22:29:42 +02:00
Thulinma
3c09b085c0 Fix recursing flag not being false in initial doSync 2021-10-19 22:29:42 +02:00
Thulinma
0a3c399a98 Ensure key and page numbers are all 32 bits, robustify/fix packet handling internals 2021-10-19 22:29:42 +02:00
Thulinma
209cd4c0fc Process system updates:
All processes:
- Added process status system and relevant API calls
- Added ability to set track masks for input/output in processes
- Added support for unmasking tracks when there is a push target, by the "unmask" parameter.
- Added track unmasking support for processes on exit/error
- Make processes start faster, if possible, in the first few seconds of a stream
- Delay stream ready state if there are processes attempting to start

Livepeer process updates:
- Added Content-Resolution header to MistProcLivepeer as per Livepeer's request
- Renamed transcode from "Mist Transcode" to source stream name
- Added ability to send audio to livepeer
- Robustified livepeer timing code, shutdown code, and improved GUI
- Prevent "audio keyframes" from starting segments in MistProcLivepeer
- Multithreaded (2 upload threads) livepeer process
- Stricter downloader/uploader timeout behaviour
- Robustness improvements
- Fix small segment size 😒
- Streamname correction
- Prevent getting stuck when transcoding multiple qualities and they are not equal length
- Corrected log message print error
- Race condition fix
- Now always waits for at least 1 video track
2021-10-19 22:29:41 +02:00
Thulinma
9417fa8dc2 MP4/WS protocol support.
Approx. 10% of code originally written by Roxlu, but keeping it split up during cleanup before merge proved practically impossible, so it's all merged into a single commit.
2021-10-19 22:29:41 +02:00
Thulinma
6276d03522 Fixed track switching mid-stream, improved clarity of related debug messages 2021-10-19 22:29:41 +02:00
Thulinma
764ad599e8 Tweaked debug message verbosity 2021-10-19 22:29:41 +02:00
Thulinma
5a40225046 CMAF debug session 2021-02-04 2021-10-19 22:29:41 +02:00
Thulinma
4080d141f8 Fix bug in Output::seek() when seeking to a timestamp that is between the last part of a key and the first part of the next key 2021-10-19 22:29:41 +02:00
Thulinma
6f035f3bc6 A few extra status for process status 2021-10-19 22:29:41 +02:00
Thulinma
926c5108b4 Fixed nextKeyTime() function 2021-10-19 22:29:41 +02:00