Files
PLib/src/PLib.Application/Abstractions/IMediaProbe.cs
T

15 lines
605 B
C#

using PLib.Domain.Videos;
namespace PLib.Application.Abstractions;
/// <summary>Reads duration, resolution and codec out of a media container.</summary>
public interface IMediaProbe
{
/// <summary>
/// Probes <paramref name="fullPath"/>. Returns <see cref="VideoTechnicalInfo.Unknown"/>
/// when the file cannot be read or is not a media file — probing must never throw for
/// a single bad file, otherwise one corrupt video would abort a whole library scan.
/// </summary>
Task<VideoTechnicalInfo> ProbeAsync(string fullPath, CancellationToken cancellationToken = default);
}