jellyfin-server/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs

121 lines
4.6 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
2014-02-20 16:37:41 +00:00
namespace MediaBrowser.Controller.MediaEncoding
{
/// <summary>
/// Interface IMediaEncoder
/// </summary>
public interface IMediaEncoder
{
/// <summary>
/// Gets the encoder path.
/// </summary>
/// <value>The encoder path.</value>
string EncoderPath { get; }
/// <summary>
/// Gets the version.
/// </summary>
/// <value>The version.</value>
string Version { get; }
/// <summary>
2014-03-27 19:30:21 +00:00
/// Extracts the audio image.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<Stream> ExtractAudioImage(string path, CancellationToken cancellationToken);
/// <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>
Task<Stream> ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
2014-06-29 17:35:05 +00: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>
Task ExtractVideoImagesOnInterval(string[] inputFiles,
MediaProtocol protocol,
Video3DFormat? threedFormat,
TimeSpan interval,
string targetDirectory,
string filenamePrefix,
int? maxWidth,
CancellationToken cancellationToken);
2015-04-04 19:35:29 +00:00
/// <summary>
/// Gets the media info.
/// </summary>
2015-04-05 15:01:57 +00:00
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2015-04-05 15:01:57 +00: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>
string GetProbeSizeArgument(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 17:04:11 +00:00
/// <summary>
/// Gets the time parameter.
/// </summary>
/// <param name="ticks">The ticks.</param>
/// <returns>System.String.</returns>
string GetTimeParameter(long ticks);
2015-01-02 05:36:27 +00: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 06:12:58 +00: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);
}
}