2022-02-16 03:15:41 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using VDownload.Core.Enums;
|
2022-02-19 01:38:37 +01:00
|
|
|
|
using VDownload.Core.Objects;
|
2022-02-16 03:15:41 +01:00
|
|
|
|
using Windows.Storage;
|
|
|
|
|
|
|
|
|
|
|
|
namespace VDownload.Core.Interfaces
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IVideoService
|
|
|
|
|
|
{
|
2022-02-19 01:38:37 +01:00
|
|
|
|
#region PROPERTIES
|
2022-02-16 03:15:41 +01:00
|
|
|
|
|
2022-02-26 14:32:34 +01:00
|
|
|
|
// VIDEO PROPERTIES
|
2022-02-16 03:15:41 +01:00
|
|
|
|
string ID { get; }
|
2022-02-26 14:32:34 +01:00
|
|
|
|
Uri VideoUrl { get; }
|
2022-02-16 03:15:41 +01:00
|
|
|
|
string Title { get; }
|
|
|
|
|
|
string Author { get; }
|
|
|
|
|
|
DateTime Date { get; }
|
|
|
|
|
|
TimeSpan Duration { get; }
|
|
|
|
|
|
long Views { get; }
|
|
|
|
|
|
Uri Thumbnail { get; }
|
2022-02-26 14:32:34 +01:00
|
|
|
|
Stream[] Streams { get; }
|
2022-02-16 03:15:41 +01:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region METHODS
|
|
|
|
|
|
|
|
|
|
|
|
// GET VIDEO METADATA
|
2022-02-26 14:32:34 +01:00
|
|
|
|
Task GetMetadataAsync(CancellationToken cancellationToken = default);
|
2022-02-16 03:15:41 +01:00
|
|
|
|
|
|
|
|
|
|
// GET VIDEO STREAMS
|
2022-02-26 14:32:34 +01:00
|
|
|
|
Task GetStreamsAsync(CancellationToken cancellationToken = default);
|
2022-02-16 03:15:41 +01:00
|
|
|
|
|
|
|
|
|
|
// DOWNLOAD VIDEO
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, Stream audioVideoStream, MediaFileExtension extension, MediaType mediaType, TimeSpan trimStart, TimeSpan trimEnd, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, Stream audioVideoStream, MediaFileExtension extension, MediaType mediaType, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IAStream audioStream, IVStream videoStream, VideoFileExtension extension, TimeSpan trimStart, TimeSpan trimEnd, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IAStream audioStream, IVStream videoStream, VideoFileExtension extension, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IAStream audioStream, AudioFileExtension extension, TimeSpan trimStart, TimeSpan trimEnd, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IAStream audioStream, AudioFileExtension extension, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IVStream videoStream, VideoFileExtension extension, TimeSpan trimStart, TimeSpan trimEnd, CancellationToken cancellationToken = default);
|
|
|
|
|
|
Task<StorageFile> DownloadAndTranscodeAsync(StorageFolder downloadingFolder, IVStream videoStream, VideoFileExtension extension, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region EVENT HANDLERS
|
|
|
|
|
|
|
|
|
|
|
|
event EventHandler DownloadingStarted;
|
|
|
|
|
|
event EventHandler<ProgressChangedEventArgs> DownloadingProgressChanged;
|
|
|
|
|
|
event EventHandler DownloadingCompleted;
|
|
|
|
|
|
event EventHandler ProcessingStarted;
|
|
|
|
|
|
event EventHandler<ProgressChangedEventArgs> ProcessingProgressChanged;
|
|
|
|
|
|
event EventHandler ProcessingCompleted;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|