Add new Track Event, OnSegmentDownloaded

Like OnDownloaded but called every time a DASH or HLS segment is downloaded. The path to the downloaded segment file is passed to the callable.
This commit is contained in:
rlaphoenix
2024-02-10 18:10:09 +00:00
parent 87779f4e7d
commit cd194e3192
3 changed files with 8 additions and 0 deletions

View File

@@ -565,6 +565,9 @@ class DASH:
segmented=True
)
if callable(track.OnSegmentDownloaded):
track.OnSegmentDownloaded(out_path)
# fix audio decryption on ATVP by fixing the sample description index
# TODO: Should this be done in the video data or the init data?
if isinstance(track, Audio):