mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Provides methods for Obtaining the Media Segments from an Item.
|
|
/// </summary>
|
|
public interface IMediaSegmentProvider
|
|
{
|
|
/// <summary>
|
|
/// Gets the provider name.
|
|
/// </summary>
|
|
string Name { get; }
|
|
|
|
/// <summary>
|
|
/// Enumerates all Media Segments from an Media Item.
|
|
/// </summary>
|
|
/// <param name="request">Arguments to enumerate MediaSegments.</param>
|
|
/// <param name="cancellationToken">Abort token.</param>
|
|
/// <returns>A list of all MediaSegments found from this provider.</returns>
|
|
Task<IReadOnlyList<MediaSegmentDto>> GetMediaSegments(MediaSegmentGenerationRequest request, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Should return support state for the given item.
|
|
/// </summary>
|
|
/// <param name="item">The base item to extract segments from.</param>
|
|
/// <returns>True if item is supported, otherwise false.</returns>
|
|
ValueTask<bool> Supports(BaseItem item);
|
|
}
|