From 888b8d619aec031f57cfd03410ccda52edcca958 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 20 Feb 2014 11:37:41 -0500 Subject: added encoding manager interface --- .../MediaEncoding/IMediaEncoder.cs | 108 +++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs (limited to 'MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs') diff --git a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs new file mode 100644 index 000000000..119688fa7 --- /dev/null +++ b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs @@ -0,0 +1,108 @@ +using MediaBrowser.Model.Entities; +using System; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.MediaEncoding +{ + /// + /// Interface IMediaEncoder + /// + public interface IMediaEncoder + { + /// + /// Gets the encoder path. + /// + /// The encoder path. + string EncoderPath { get; } + + /// + /// Gets the version. + /// + /// The version. + string Version { get; } + + /// + /// Extracts the image. + /// + /// The input files. + /// The type. + /// if set to true [is audio]. + /// The threed format. + /// The offset. + /// The cancellation token. + /// Task{Stream}. + Task ExtractImage(string[] inputFiles, InputType type, bool isAudio, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken); + + /// + /// Extracts the text subtitle. + /// + /// The input files. + /// The type. + /// Index of the subtitle stream. + /// if set to true, copy stream instead of converting. + /// The output path. + /// The cancellation token. + /// Task. + Task ExtractTextSubtitle(string[] inputFiles, InputType type, int subtitleStreamIndex, bool copySubtitleStream, string outputPath, CancellationToken cancellationToken); + + /// + /// Converts the text subtitle to ass. + /// + /// The input path. + /// The output path. + /// The language. + /// The cancellation token. + /// Task. + Task ConvertTextSubtitleToAss(string inputPath, string outputPath, string language, CancellationToken cancellationToken); + + /// + /// Gets the media info. + /// + /// The input files. + /// The type. + /// if set to true [is audio]. + /// The cancellation token. + /// Task. + Task GetMediaInfo(string[] inputFiles, InputType type, bool isAudio, CancellationToken cancellationToken); + + /// + /// Gets the probe size argument. + /// + /// The type. + /// System.String. + string GetProbeSizeArgument(InputType type); + + /// + /// Gets the input argument. + /// + /// The input files. + /// The type. + /// System.String. + string GetInputArgument(string[] inputFiles, InputType type); + } + + /// + /// Enum InputType + /// + public enum InputType + { + /// + /// The file + /// + File, + /// + /// The bluray + /// + Bluray, + /// + /// The DVD + /// + Dvd, + /// + /// The URL + /// + Url + } +} -- cgit v1.2.3