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

107 lines
3.7 KiB
C#
Raw Normal View History

using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Entities;
2014-01-12 06:31:21 +00:00
namespace MediaBrowser.Controller.MediaInfo
{
/// <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>
/// Extracts the image.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="type">The type.</param>
2014-01-12 06:31:21 +00:00
/// <param name="isAudio">if set to <c>true</c> [is audio].</param>
/// <param name="threedFormat">The threed format.</param>
/// <param name="offset">The offset.</param>
/// <param name="outputPath">The output path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2014-01-12 06:31:21 +00:00
Task ExtractImage(string[] inputFiles, InputType type, bool isAudio, Video3DFormat? threedFormat, TimeSpan? offset, string outputPath, CancellationToken cancellationToken);
/// <summary>
/// Extracts the text subtitle.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="type">The type.</param>
/// <param name="subtitleStreamIndex">Index of the subtitle stream.</param>
/// <param name="outputPath">The output path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2014-01-10 13:52:01 +00:00
Task ExtractTextSubtitle(string[] inputFiles, InputType type, int subtitleStreamIndex, string outputPath, CancellationToken cancellationToken);
/// <summary>
/// Converts the text subtitle to ass.
/// </summary>
/// <param name="inputPath">The input path.</param>
/// <param name="outputPath">The output path.</param>
2013-07-16 18:18:49 +00:00
/// <param name="language">The language.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2014-01-10 13:52:01 +00:00
Task ConvertTextSubtitleToAss(string inputPath, string outputPath, string language, CancellationToken cancellationToken);
/// <summary>
/// Gets the media info.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="type">The type.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2014-01-12 06:31:21 +00:00
Task<InternalMediaInfoResult> GetMediaInfo(string[] inputFiles, InputType type, CancellationToken cancellationToken);
/// <summary>
/// Gets the probe size argument.
/// </summary>
/// <param name="type">The type.</param>
/// <returns>System.String.</returns>
string GetProbeSizeArgument(InputType type);
/// <summary>
/// Gets the input argument.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="type">The type.</param>
/// <returns>System.String.</returns>
string GetInputArgument(string[] inputFiles, InputType type);
}
/// <summary>
/// Enum InputType
/// </summary>
public enum InputType
{
/// <summary>
2014-01-12 06:31:21 +00:00
/// The file
/// </summary>
2014-01-12 06:31:21 +00:00
File,
/// <summary>
/// The bluray
/// </summary>
Bluray,
/// <summary>
/// The DVD
/// </summary>
2013-05-01 20:07:20 +00:00
Dvd,
/// <summary>
/// The URL
/// </summary>
Url
}
}