2013-04-07 13:55:05 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2013-06-27 08:59:32 -07:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Common.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>
|
2013-06-27 08:59:32 -07:00
|
|
|
|
/// <param name="threedFormat">The threed format.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <param name="offset">The offset.</param>
|
|
|
|
|
/// <param name="outputPath">The output path.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-06-27 08:59:32 -07:00
|
|
|
|
Task ExtractImage(string[] inputFiles, InputType type, Video3DFormat? threedFormat, TimeSpan? offset, string outputPath, CancellationToken cancellationToken);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
/// <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>
|
2013-04-23 17:25:49 -07:00
|
|
|
|
/// <param name="offset">The offset.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <param name="outputPath">The output path.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-04-23 17:25:49 -07:00
|
|
|
|
Task ExtractTextSubtitle(string[] inputFiles, InputType type, int subtitleStreamIndex, TimeSpan offset, string outputPath, CancellationToken cancellationToken);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
/// <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 11:18:49 -07:00
|
|
|
|
/// <param name="language">The language.</param>
|
2013-04-27 06:10:24 -07:00
|
|
|
|
/// <param name="offset">The offset.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-07-16 11:18:49 -07:00
|
|
|
|
Task ConvertTextSubtitleToAss(string inputPath, string outputPath, string language, TimeSpan offset, CancellationToken cancellationToken);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
/// <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>
|
|
|
|
|
Task<MediaInfoResult> 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>
|
|
|
|
|
/// The audio file
|
|
|
|
|
/// </summary>
|
|
|
|
|
AudioFile,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The video file
|
|
|
|
|
/// </summary>
|
|
|
|
|
VideoFile,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The bluray
|
|
|
|
|
/// </summary>
|
|
|
|
|
Bluray,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The DVD
|
|
|
|
|
/// </summary>
|
2013-05-01 13:07:20 -07:00
|
|
|
|
Dvd,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The URL
|
|
|
|
|
/// </summary>
|
|
|
|
|
Url
|
2013-04-07 13:55:05 -07:00
|
|
|
|
}
|
|
|
|
|
}
|