jellyfin/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs

94 lines
3.0 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
2014-02-20 09:37:41 -07: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 12:30:21 -07: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="type">The type.</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>
2014-03-27 12:30:21 -07:00
Task<Stream> ExtractVideoImage(string[] inputFiles, InputType type, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
/// <summary>
/// Gets the media info.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="type">The type.</param>
2014-01-17 09:36:01 -07:00
/// <param name="isAudio">if set to <c>true</c> [is audio].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2014-01-17 09:36:01 -07:00
Task<InternalMediaInfoResult> GetMediaInfo(string[] inputFiles, InputType type, bool isAudio, 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-11 23:31:21 -07:00
/// The file
/// </summary>
2014-01-11 23:31:21 -07:00
File,
/// <summary>
/// The bluray
/// </summary>
Bluray,
/// <summary>
/// The DVD
/// </summary>
2013-05-01 13:07:20 -07:00
Dvd,
/// <summary>
/// The URL
/// </summary>
Url
}
}