using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; using System; using System.IO; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Dlna; namespace MediaBrowser.Controller.MediaEncoding { /// /// Interface IMediaEncoder /// public interface IMediaEncoder : ITranscoderSupport { /// /// Gets the encoder path. /// /// The encoder path. string EncoderPath { get; } /// /// Supportses the decoder. /// /// The decoder. /// true if XXXX, false otherwise. bool SupportsDecoder(string decoder); /// /// Extracts the audio image. /// /// The path. /// Index of the image stream. /// The cancellation token. /// Task{Stream}. Task ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken); /// /// Extracts the video image. /// /// The input files. /// The protocol. /// The threed format. /// The offset. /// The cancellation token. /// Task{Stream}. Task ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken); Task ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, int? imageStreamIndex, CancellationToken cancellationToken); /// /// Extracts the video images on interval. /// /// The input files. /// The protocol. /// The threed format. /// The interval. /// The target directory. /// The filename prefix. /// The maximum width. /// The cancellation token. /// Task. Task ExtractVideoImagesOnInterval(string[] inputFiles, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan interval, string targetDirectory, string filenamePrefix, int? maxWidth, CancellationToken cancellationToken); /// /// Gets the media info. /// /// The request. /// The cancellation token. /// Task. Task GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken); /// /// Gets the probe size argument. /// /// The input files. /// The protocol. /// System.String. string GetProbeSizeArgument(string[] inputFiles, MediaProtocol protocol); /// /// Gets the input argument. /// /// The input files. /// The protocol. /// System.String. string GetInputArgument(string[] inputFiles, MediaProtocol protocol); /// /// Gets the time parameter. /// /// The ticks. /// System.String. string GetTimeParameter(long ticks); /// /// Encodes the audio. /// /// The options. /// The progress. /// The cancellation token. /// Task. Task EncodeAudio(EncodingJobOptions options, IProgress progress, CancellationToken cancellationToken); /// /// Encodes the video. /// /// The options. /// The progress. /// The cancellation token. /// Task<System.String>. Task EncodeVideo(EncodingJobOptions options, IProgress progress, CancellationToken cancellationToken); /// /// Escapes the subtitle filter path. /// /// The path. /// System.String. string EscapeSubtitleFilterPath(string path); void Init(); Task UpdateEncoderPath(string path); } }