20 lines
768 B
C#
20 lines
768 B
C#
namespace VideoDownloader.Core.Dash;
|
|
|
|
public record DashSegment(Uri Url, int Index);
|
|
|
|
/// <summary>하나의 AdaptationSet(비디오 또는 오디오) 최고화질 표현의 세그먼트 묶음.</summary>
|
|
public sealed class DashTrack
|
|
{
|
|
public Uri? InitUrl { get; init; }
|
|
public IReadOnlyList<DashSegment> Segments { get; init; } = Array.Empty<DashSegment>();
|
|
public bool IsFmp4 => InitUrl != null;
|
|
}
|
|
|
|
/// <summary>DASH(MPD) 파싱 결과 — 클리어(비DRM) 비디오(필수) + 오디오(선택) 트랙.</summary>
|
|
public sealed class DashManifest
|
|
{
|
|
public DashTrack? Video { get; init; }
|
|
public DashTrack? Audio { get; init; }
|
|
/// <summary>총 재생시간(초). 진행률 산정용.</summary>
|
|
public double DurationSec { get; init; }
|
|
}
|