2014-02-04 13:19:29 -07:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2014-06-16 18:56:23 -07:00
|
|
|
|
using MediaBrowser.Model.MediaInfo;
|
2014-02-04 13:19:29 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
2013-04-07 13:55:05 -07:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-04-30 12:16:43 -07:00
|
|
|
|
using MediaBrowser.Model.Dlna;
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
2014-02-20 09:37:41 -07:00
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
2013-04-07 13:55:05 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface IMediaEncoder
|
|
|
|
|
/// </summary>
|
2016-04-30 12:16:43 -07:00
|
|
|
|
public interface IMediaEncoder : ITranscoderSupport
|
2013-04-07 13:55:05 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the encoder path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The encoder path.</value>
|
|
|
|
|
string EncoderPath { get; }
|
|
|
|
|
|
2015-09-17 20:08:45 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Supportses the decoder.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="decoder">The decoder.</param>
|
|
|
|
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
|
|
|
|
bool SupportsDecoder(string decoder);
|
|
|
|
|
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <summary>
|
2014-03-27 12:30:21 -07:00
|
|
|
|
/// Extracts the audio image.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
2016-01-11 09:52:22 -07:00
|
|
|
|
/// <param name="imageStreamIndex">Index of the image stream.</param>
|
2014-03-27 12:30:21 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
2016-01-11 09:52:22 -07:00
|
|
|
|
Task<Stream> ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken);
|
2014-03-27 12:30:21 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts the video image.
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
/// <param name="protocol">The protocol.</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>
|
2014-02-04 13:19:29 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
Task<Stream> ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
2016-04-13 13:49:16 -07:00
|
|
|
|
Task<Stream> ExtractVideoImage(string[] inputFiles, MediaProtocol protocol, int? imageStreamIndex, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-06-29 10:35:05 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts the video images on interval.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
|
|
|
|
/// <param name="threedFormat">The threed format.</param>
|
|
|
|
|
/// <param name="interval">The interval.</param>
|
|
|
|
|
/// <param name="targetDirectory">The target directory.</param>
|
|
|
|
|
/// <param name="filenamePrefix">The filename prefix.</param>
|
|
|
|
|
/// <param name="maxWidth">The maximum width.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task ExtractVideoImagesOnInterval(string[] inputFiles,
|
|
|
|
|
MediaProtocol protocol,
|
|
|
|
|
Video3DFormat? threedFormat,
|
|
|
|
|
TimeSpan interval,
|
|
|
|
|
string targetDirectory,
|
|
|
|
|
string filenamePrefix,
|
|
|
|
|
int? maxWidth,
|
|
|
|
|
CancellationToken cancellationToken);
|
2015-04-04 12:35:29 -07:00
|
|
|
|
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the media info.
|
|
|
|
|
/// </summary>
|
2015-04-05 08:01:57 -07:00
|
|
|
|
/// <param name="request">The request.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2015-04-05 08:01:57 -07:00
|
|
|
|
Task<MediaInfo> GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the probe size argument.
|
|
|
|
|
/// </summary>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <returns>System.String.</returns>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
string GetProbeSizeArgument(string[] inputFiles, MediaProtocol protocol);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the input argument.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="inputFiles">The input files.</param>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
2013-04-07 13:55:05 -07:00
|
|
|
|
/// <returns>System.String.</returns>
|
2014-06-16 18:56:23 -07:00
|
|
|
|
string GetInputArgument(string[] inputFiles, MediaProtocol protocol);
|
2014-06-26 10:04:11 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the time parameter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ticks">The ticks.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetTimeParameter(long ticks);
|
2015-01-01 22:36:27 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Encodes the audio.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="options">The options.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task<string> EncodeAudio(EncodingJobOptions options,
|
|
|
|
|
IProgress<double> progress,
|
|
|
|
|
CancellationToken cancellationToken);
|
2015-01-01 23:12:58 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Encodes the video.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="options">The options.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<System.String>.</returns>
|
|
|
|
|
Task<string> EncodeVideo(EncodingJobOptions options,
|
|
|
|
|
IProgress<double> progress,
|
|
|
|
|
CancellationToken cancellationToken);
|
2015-08-16 08:53:30 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Escapes the subtitle filter path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string EscapeSubtitleFilterPath(string path);
|
2016-06-19 23:19:28 -07:00
|
|
|
|
|
|
|
|
|
void Init();
|
2016-06-23 10:04:18 -07:00
|
|
|
|
|
|
|
|
|
Task UpdateEncoderPath(string path);
|
2013-04-07 13:55:05 -07:00
|
|
|
|
}
|
|
|
|
|
}
|