Implement Discontinuity Index for Live Streaming Enhancements
Added a DiscontinuityIndex property to ScheduleEntry and related DTOs to track the cumulative number of discontinuities in live streaming. Updated the LiveWindowCalculator to utilize this index for generating accurate EXT-X-DISCONTINUITY-SEQUENCE values, ensuring compatibility with ffmpeg-based players. Enhanced the WriteEntriesAsync method to calculate and persist the discontinuity index during entry creation. Updated relevant tests and documentation to reflect these changes, improving the reliability of live streaming functionality.
This commit is contained in:
@@ -54,7 +54,8 @@ public class TelegramBotTests
|
||||
ScheduleEntryKind.Program,
|
||||
start,
|
||||
start.AddMinutes(minutes),
|
||||
new ScheduleEntryOrigin(showId, 0, null, null, null)
|
||||
new ScheduleEntryOrigin(showId, 0, null, null, null),
|
||||
0
|
||||
);
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -49,7 +49,8 @@ public class TelegramNotifierTests
|
||||
ScheduleEntryKind.Program,
|
||||
start,
|
||||
start.AddMinutes(minutes),
|
||||
new ScheduleEntryOrigin(showId, 0, null, null, null)
|
||||
new ScheduleEntryOrigin(showId, 0, null, null, null),
|
||||
0
|
||||
);
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -92,7 +92,8 @@ public class EntryTraceTests
|
||||
slot.Id,
|
||||
JsonSerializer.Serialize(trace, TraceJson),
|
||||
collection.Id
|
||||
)
|
||||
),
|
||||
0
|
||||
);
|
||||
|
||||
await using (var seed = fixture.New())
|
||||
@@ -150,7 +151,8 @@ public class EntryTraceTests
|
||||
ScheduleEntryKind.Program,
|
||||
T0,
|
||||
T0.AddMinutes(90),
|
||||
new ScheduleEntryOrigin(show.Id, 1, null, traceJson)
|
||||
new ScheduleEntryOrigin(show.Id, 1, null, traceJson),
|
||||
0
|
||||
);
|
||||
|
||||
await using (var seed = fixture.New())
|
||||
@@ -200,7 +202,8 @@ public class EntryTraceTests
|
||||
ScheduleEntryKind.Program,
|
||||
T0,
|
||||
T0.AddMinutes(30),
|
||||
new ScheduleEntryOrigin(null, null, null, JsonSerializer.Serialize(trace, TraceJson))
|
||||
new ScheduleEntryOrigin(null, null, null, JsonSerializer.Serialize(trace, TraceJson)),
|
||||
0
|
||||
);
|
||||
|
||||
await using (var seed = fixture.New())
|
||||
|
||||
Reference in New Issue
Block a user