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:
@@ -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):
|
||||
|
||||
@@ -484,6 +484,9 @@ class HLS:
|
||||
segmented=True
|
||||
)
|
||||
|
||||
if callable(track.OnSegmentDownloaded):
|
||||
track.OnSegmentDownloaded(out_path)
|
||||
|
||||
download_size = out_path.stat().st_size
|
||||
|
||||
# fix audio decryption on ATVP by fixing the sample description index
|
||||
|
||||
Reference in New Issue
Block a user