jellyfin/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs

125 lines
4.6 KiB
C#
Raw Normal View History

using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using System;
2017-08-26 07:03:19 +00:00
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dlna;
2017-08-26 07:03:19 +00:00
using MediaBrowser.Model.IO;
2014-02-20 16:37:41 +00:00
namespace MediaBrowser.Controller.MediaEncoding
{
/// <summary>
/// Interface IMediaEncoder
/// </summary>
public interface IMediaEncoder : ITranscoderSupport
{
2016-06-29 05:49:31 +00:00
string EncoderLocationType { get; }
/// <summary>
/// Gets the encoder path.
/// </summary>
/// <value>The encoder path.</value>
string EncoderPath { get; }
/// <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);
/// <summary>
2014-03-27 19:30:21 +00:00
/// Extracts the audio image.
/// </summary>
/// <param name="path">The path.</param>
2016-01-11 16:52:22 +00:00
/// <param name="imageStreamIndex">Index of the image stream.</param>
2014-03-27 19:30:21 +00:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<string> ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken);
2014-03-27 19:30:21 +00:00
/// <summary>
/// Extracts the video image.
/// </summary>
Task<string> ExtractVideoImage(string[] inputFiles, string container, MediaProtocol protocol, MediaStream videoStream, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
Task<string> ExtractVideoImage(string[] inputFiles, string container, MediaProtocol protocol, MediaStream imageStream, int? imageStreamIndex, CancellationToken cancellationToken);
2016-04-13 20:49:16 +00:00
2014-06-29 17:35:05 +00:00
/// <summary>
/// Extracts the video images on interval.
/// </summary>
2016-06-29 05:49:31 +00:00
Task ExtractVideoImagesOnInterval(string[] inputFiles,
string container,
MediaStream videoStream,
2016-06-29 05:49:31 +00:00
MediaProtocol protocol,
Video3DFormat? threedFormat,
TimeSpan interval,
string targetDirectory,
string filenamePrefix,
2014-06-29 17:35:05 +00:00
int? maxWidth,
CancellationToken cancellationToken);
2015-04-04 19:35:29 +00:00
/// <summary>
/// Gets the media info.
/// </summary>
2015-04-05 15:01:57 +00:00
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2015-04-05 15:01:57 +00:00
Task<MediaInfo> GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken);
/// <summary>
/// Gets the input argument.
/// </summary>
/// <param name="inputFiles">The input files.</param>
/// <param name="protocol">The protocol.</param>
/// <returns>System.String.</returns>
string GetInputArgument(string[] inputFiles, MediaProtocol protocol);
2014-06-26 17:04:11 +00:00
/// <summary>
/// Gets the time parameter.
/// </summary>
/// <param name="ticks">The ticks.</param>
/// <returns>System.String.</returns>
string GetTimeParameter(long ticks);
2015-01-02 05:36:27 +00: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-02 06:12:58 +00: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&lt;System.String&gt;.</returns>
Task<string> EncodeVideo(EncodingJobOptions options,
IProgress<double> progress,
CancellationToken cancellationToken);
2015-08-16 15:53:30 +00:00
Task ConvertImage(string inputPath, string outputPath);
2015-08-16 15:53:30 +00:00
/// <summary>
/// Escapes the subtitle filter path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
string EscapeSubtitleFilterPath(string path);
2016-06-20 06:19:28 +00:00
2016-06-30 04:23:52 +00:00
Task Init();
2016-06-23 17:04:18 +00:00
2017-05-26 06:48:54 +00:00
void UpdateEncoderPath(string path, string pathType);
2016-08-05 05:12:25 +00:00
bool SupportsEncoder(string encoder);
2016-11-29 19:13:20 +00:00
2017-08-26 07:03:19 +00:00
string[] GetPlayableStreamFileNames(string path, VideoType videoType);
IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, IIsoMount isoMount, uint? titleNumber);
}
}