Commit graph

15 commits

Author SHA1 Message Date
cmcpherson274
10ea165c2c
Refactor packet handling with locking mechanism 2026-03-15 14:04:59 -04:00
cmcpherson274
cf1aef6747
Implement buffer reset method for stream transitions
Added a method to reset internal buffers to prevent corruption during stream transitions.
2026-03-15 12:06:32 -04:00
SergeantPanda
fc75a68195 Enhancement: new clients joining an active channel are now positioned a configurable number of seconds behind live rather than a fixed chunk count. The start position is determined by wall-clock chunk receive time (stored as a Redis sorted set alongside the buffer), so the buffer depth is consistent in seconds regardless of stream bitrate. Setting the value to 0 starts clients at live with no buffer. Defaults to 2 seconds. Existing chunk-count gating for the first client connecting to a channel is unchanged. The setting is exposed in Settings → Proxy as "New Client Buffer (seconds)". 2026-03-03 18:12:32 -06:00
SergeantPanda
e78c24aad7 Enhance Redis chunk management in StreamBuffer and StreamGenerator
- Register Lua scripts for optimized chunk retrieval in StreamBuffer.
- Implement atomic Lua binary search to find the oldest available chunk in Redis.
- Update StreamGenerator to handle expired chunks more efficiently, reducing TOCTOU race conditions.
2026-03-03 15:13:46 -06:00
SergeantPanda
74280baa85 Changed read timeout for http connection for the proxy server to 10 secounds to avoid unnecessary timeouts.
Improved try_next_stream to not fail if the returned stream is the same. It will now try a different stream.
Force a client to jump ahead in the buffer if they fall to far behind.
2025-10-11 19:45:21 -05:00
SergeantPanda
b3c4ff8f2d Finding more timers that can be converted to gevents. 2025-05-01 10:43:07 -05:00
SergeantPanda
b7c543b5f5 Use gevent sleep instead of sleep. 2025-04-30 12:48:50 -05:00
SergeantPanda
6ccc2b9a6d Enhance stream retrieval process with error handling and retry logic
- Updated `get_stream` method to return error reasons for better debugging.
- Improved `generate_stream_url` to handle errors and log specific issues.
- Implemented retry mechanism in `stream_ts` view for obtaining streams with exponential backoff.
- Added new configuration options for connection timeout and retry intervals.
2025-04-10 08:38:53 -05:00
SergeantPanda
77002beaac Improved logging to include current component name. 2025-03-22 07:42:46 -05:00
SergeantPanda
569846a687 Lots more refactoring. 2025-03-19 19:45:29 -05:00
SergeantPanda
f03b885d71 Lots more refactoring. 2025-03-19 19:03:33 -05:00
SergeantPanda
8e3c3cb7e8 Fixes timers not releasing on reconnect attempts 2025-03-18 12:10:27 -05:00
SergeantPanda
0be133d341 More refractoring. 2025-03-15 12:09:33 -05:00
SergeantPanda
85bb7aa0ec Even more refractoring. 2025-03-15 11:44:59 -05:00
SergeantPanda
8ed1a36535 Lots of refractoring. 2025-03-15 09:44:38 -05:00