2014-02-04 21:19:29 +01:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2014-06-17 03:56:23 +02:00
|
|
|
|
using MediaBrowser.Model.MediaInfo;
|
2014-02-04 21:19:29 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
2013-04-07 22:55:05 +02:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2014-02-20 17:37:41 +01:00
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
2013-04-07 22:55:05 +02:00
|
|
|
|
{
|
|
|
|
|
/// <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 20:30:21 +01: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.
|
2013-04-07 22:55:05 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2013-06-27 17:59:32 +02:00
|
|
|
|
/// <param name="threedFormat">The threed format.</param>
|
2013-04-07 22:55:05 +02:00
|
|
|
|
/// <param name="offset">The offset.</param>
|
2014-02-04 21:19:29 +01:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
Task<Stream> ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
|
2013-04-07 22:55:05 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the media info.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2014-01-17 17:36:01 +01:00
|
|
|
|
/// <param name="isAudio">if set to <c>true</c> [is audio].</param>
|
2013-04-07 22:55:05 +02:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
Task<InternalMediaInfoResult> GetMediaInfo(string[] inputFiles, MediaProtocol protocol, bool isAudio, CancellationToken cancellationToken);
|
2013-04-07 22:55:05 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the probe size argument.
|
|
|
|
|
/// </summary>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2013-04-07 22:55:05 +02:00
|
|
|
|
/// <returns>System.String.</returns>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
string GetProbeSizeArgument(string[] inputFiles, MediaProtocol protocol);
|
2013-04-07 22:55:05 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the input argument.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2013-04-07 22:55:05 +02:00
|
|
|
|
/// <returns>System.String.</returns>
|
2014-06-17 03:56:23 +02:00
|
|
|
|
string GetInputArgument(string[] inputFiles, MediaProtocol protocol);
|
2014-06-26 19:04:11 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the time parameter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ticks">The ticks.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetTimeParameter(long ticks);
|
2013-04-07 22:55:05 +02:00
|
|
|
|
}
|
|
|
|
|
}
|