Baseline: WPF/Avalonia/Cli/Core + plans (BROWSER_FEATURES_PLAN v2, MOBILE_PLAN v1)
This commit is contained in:
commit
21b7c4d8bd
60 changed files with 6581 additions and 0 deletions
8
VideoDownloader.Core/Models/DownloadProgress.cs
Normal file
8
VideoDownloader.Core/Models/DownloadProgress.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace VideoDownloader.Core.Models;
|
||||
|
||||
/// <summary>다운로드 진행 상태. Stage: downloading / merging / remuxing / done</summary>
|
||||
public record DownloadProgress(int Completed, int Total, string Stage, double OverridePercent = -1, string? Detail = null)
|
||||
{
|
||||
// HLS: Completed/Total 로 계산 / 직링크: OverridePercent 사용
|
||||
public double Percent => OverridePercent >= 0 ? OverridePercent : (Total > 0 ? Completed * 100.0 / Total : 0);
|
||||
}
|
||||
21
VideoDownloader.Core/Models/PlaylistModels.cs
Normal file
21
VideoDownloader.Core/Models/PlaylistModels.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
namespace VideoDownloader.Core.Models;
|
||||
|
||||
public enum PlaylistType { Master, Media }
|
||||
|
||||
/// <summary>마스터 재생목록의 변환(화질) 항목</summary>
|
||||
public record Variant(Uri Url, int Bandwidth, string Resolution, string Codecs);
|
||||
|
||||
/// <summary>HLS AES-128 키 정보 (EXT-X-KEY)</summary>
|
||||
public record KeyInfo(Uri? KeyUri, string? Iv);
|
||||
|
||||
/// <summary>미디어 세그먼트</summary>
|
||||
public record Segment(Uri Url, int Index, long Sequence, KeyInfo? Key);
|
||||
|
||||
/// <summary>m3u8 파싱 결과</summary>
|
||||
public record ParsedPlaylist
|
||||
{
|
||||
public PlaylistType Type { get; init; }
|
||||
public IReadOnlyList<Variant> Variants { get; init; } = Array.Empty<Variant>();
|
||||
public IReadOnlyList<Segment> Segments { get; init; } = Array.Empty<Segment>();
|
||||
public Uri? InitSegment { get; init; } // #EXT-X-MAP (fMP4 초기화 세그먼트)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue