jellyfin/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs

143 lines
5.6 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dlna;
2014-02-20 17:37:41 +01:00
namespace MediaBrowser.Controller.MediaEncoding
{
/// <summary>
/// Interface IMediaEncoder
/// </summary>
public interface IMediaEncoder : ITranscoderSupport
{
2016-06-29 07:49:31 +02:00
string EncoderLocationType { get; }
/// <summary>
/// Gets the encoder path.
/// </summary>
/// <value>The encoder path.</value>
string EncoderPath { get; }
/// <summary>
/// Supportses the decoder.
/// </summary>
/// <param name="decoder">The decoder.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool SupportsDecoder(string decoder);
/// <summary>
2014-03-27 20:30:21 +01:00
/// Extracts the audio image.
/// </summary>
/// <param name="path">The path.</param>
2016-01-11 17:52:22 +01:00
/// <param name="imageStreamIndex">Index of the image stream.</param>
2014-03-27 20:30:21 +01:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<string> ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken);
2014-03-27 20:30:21 +01:00
/// <summary>
/// Extracts the video image.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="protocol">The protocol.</param>
/// <param name="threedFormat">The threed format.</param>
/// <param name="offset">The offset.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
2016-09-30 20:43:59 +02:00
Task<string> ExtractVideoImage(string[] inputFiles, string container, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
2016-09-30 20:43:59 +02:00
Task<string> ExtractVideoImage(string[] inputFiles, string container, MediaProtocol protocol, int? imageStreamIndex, CancellationToken cancellationToken);
2016-04-13 22:49:16 +02:00
2014-06-29 19:35:05 +02:00
/// <summary>
/// Extracts the video images on interval.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="protocol">The protocol.</param>
/// <param name="threedFormat">The threed format.</param>
/// <param name="interval">The interval.</param>
/// <param name="targetDirectory">The target directory.</param>
/// <param name="filenamePrefix">The filename prefix.</param>
/// <param name="maxWidth">The maximum width.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2016-06-29 07:49:31 +02:00
Task ExtractVideoImagesOnInterval(string[] inputFiles,
MediaProtocol protocol,
Video3DFormat? threedFormat,
TimeSpan interval,
string targetDirectory,
string filenamePrefix,
2014-06-29 19:35:05 +02:00
int? maxWidth,
CancellationToken cancellationToken);
2015-04-04 21:35:29 +02:00
/// <summary>
/// Gets the media info.
/// </summary>
2015-04-05 17:01:57 +02:00
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2015-04-05 17:01:57 +02:00
Task<MediaInfo> GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken);
/// <summary>
/// Gets the probe size argument.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="protocol">The protocol.</param>
/// <returns>System.String.</returns>
2016-10-11 08:46:59 +02:00
string GetProbeSizeAndAnalyzeDurationArgument(string[] inputFiles, MediaProtocol protocol);
/// <summary>
/// Gets the input argument.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="protocol">The protocol.</param>
/// <returns>System.String.</returns>
string GetInputArgument(string[] inputFiles, MediaProtocol protocol);
2014-06-26 19:04:11 +02:00
/// <summary>
/// Gets the time parameter.
/// </summary>
/// <param name="ticks">The ticks.</param>
/// <returns>System.String.</returns>
string GetTimeParameter(long ticks);
2015-01-02 06:36:27 +01:00
/// <summary>
/// Encodes the audio.
/// </summary>
/// <param name="options">The options.</param>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task<string> EncodeAudio(EncodingJobOptions options,
IProgress<double> progress,
CancellationToken cancellationToken);
2015-01-02 07:12:58 +01:00
/// <summary>
/// Encodes the video.
/// </summary>
/// <param name="options">The options.</param>
/// <param name="progress">The progress.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;System.String&gt;.</returns>
Task<string> EncodeVideo(EncodingJobOptions options,
IProgress<double> progress,
CancellationToken cancellationToken);
2015-08-16 17:53:30 +02:00
/// <summary>
/// Escapes the subtitle filter path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
string EscapeSubtitleFilterPath(string path);
2016-06-20 08:19:28 +02:00
2016-06-30 06:23:52 +02:00
Task Init();
2016-06-23 19:04:18 +02:00
2016-06-29 07:49:31 +02:00
Task UpdateEncoderPath(string path, string pathType);
2016-08-05 07:12:25 +02:00
bool SupportsEncoder(string encoder);
2016-08-24 08:13:15 +02:00
bool IsDefaultEncoderPath { get; }
2016-11-29 20:13:20 +01:00
void SetLogFilename(string name);
void ClearLogFilename();
}
}