Files
VDownload/VDownload.Core/Interfaces/IVideoService.cs

48 lines
1.2 KiB
C#
Raw Normal View History

using System;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using VDownload.Core.Enums;
2022-03-07 14:59:11 +01:00
using VDownload.Core.Structs;
using Windows.Storage;
namespace VDownload.Core.Interfaces
{
public interface IVideoService
{
#region PROPERTIES
2022-02-26 14:32:34 +01:00
// VIDEO PROPERTIES
string ID { get; }
2022-02-26 14:32:34 +01:00
Uri VideoUrl { get; }
2022-03-07 14:59:11 +01:00
Metadata Metadata { get; }
BaseStream[] BaseStreams { get; }
#endregion
#region METHODS
// GET VIDEO METADATA
2022-02-26 14:32:34 +01:00
Task GetMetadataAsync(CancellationToken cancellationToken = default);
// GET VIDEO STREAMS
2022-02-26 14:32:34 +01:00
Task GetStreamsAsync(CancellationToken cancellationToken = default);
// DOWNLOAD VIDEO
2022-03-07 14:59:11 +01:00
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, BaseStream baseStream, MediaFileExtension extension, MediaType mediaType, TimeSpan trimStart, TimeSpan trimEnd, CancellationToken cancellationToken = default);
#endregion
#region EVENT HANDLERS
2022-03-07 14:59:11 +01:00
event EventHandler<EventArgs.ProgressChangedEventArgs> DownloadingProgressChanged;
event EventHandler<EventArgs.ProgressChangedEventArgs> ProcessingProgressChanged;
#endregion
}
}