using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; using MediaBrowser.Model; using MediaBrowser.Model.MediaSegments; namespace MediaBrowser.Controller.MediaSegments; /// /// Provides methods for Obtaining the Media Segments from an Item. /// public interface IMediaSegmentProvider { /// /// Gets the provider name. /// string Name { get; } /// /// Enumerates all Media Segments from an Media Item. /// /// Arguments to enumerate MediaSegments. /// Abort token. /// A list of all MediaSegments found from this provider. Task> GetMediaSegments(MediaSegmentGenerationRequest request, CancellationToken cancellationToken); /// /// Should return support state for the given item. /// /// The base item to extract segments from. /// True if item is supported, otherwise false. ValueTask Supports(BaseItem item); /// /// Called when extracted segment data for an item is being pruned. /// Providers should delete any cached analysis data they hold for the given item. /// /// The item whose data is being pruned. /// Abort token. /// A task representing the asynchronous cleanup operation. Task CleanupExtractedData(Guid itemId, CancellationToken cancellationToken); }