jellyfin/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs

132 lines
4.7 KiB
C#
Raw Normal View History

#nullable disable
#pragma warning disable CS1591
using System;
2018-12-27 23:27:57 +00:00
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.System;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Controller.MediaEncoding
{
/// <summary>
/// Interface IMediaEncoder.
2018-12-27 23:27:57 +00:00
/// </summary>
public interface IMediaEncoder : ITranscoderSupport
{
/// <summary>
/// The location of the discovered FFmpeg tool.
/// </summary>
FFmpegLocation EncoderLocation { get; }
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the encoder path.
/// </summary>
/// <value>The encoder path.</value>
string EncoderPath { get; }
2020-04-08 16:15:01 +00:00
/// <summary>
2020-05-25 21:43:26 +00:00
/// Whether given encoder codec is supported.
2020-04-08 16:15:01 +00:00
/// </summary>
/// <param name="encoder">The encoder.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool SupportsEncoder(string encoder);
2018-12-27 23:27:57 +00:00
/// <summary>
2020-05-25 21:43:26 +00:00
/// Whether given decoder codec is supported.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <param name="decoder">The decoder.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool SupportsDecoder(string decoder);
2020-04-08 16:15:01 +00:00
/// <summary>
2020-05-25 21:43:26 +00:00
/// Whether given hardware acceleration type is supported.
2020-04-08 16:15:01 +00:00
/// </summary>
/// <param name="hwaccel">The hwaccel.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
bool SupportsHwaccel(string hwaccel);
2021-01-26 19:20:53 +00:00
/// <summary>
/// Whether given filter is supported.
/// </summary>
/// <param name="filter">The filter.</param>
/// <param name="option">The option.</param>
/// <returns><c>true</c> if the filter is supported, <c>false</c> otherwise.</returns>
2021-01-26 19:20:53 +00:00
bool SupportsFilter(string filter, string option);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Extracts the audio image.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="imageStreamIndex">Index of the image stream.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<string> ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken);
/// <summary>
/// Extracts the video image.
/// </summary>
Task<string> ExtractVideoImage(string inputFile, string container, MediaSourceInfo mediaSource, MediaStream videoStream, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken);
2018-12-27 23:27:57 +00:00
Task<string> ExtractVideoImage(string inputFile, string container, MediaSourceInfo mediaSource, MediaStream imageStream, int? imageStreamIndex, CancellationToken cancellationToken);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Extracts the video images on interval.
/// </summary>
2020-10-12 18:05:11 +00:00
Task ExtractVideoImagesOnInterval(
string inputFile,
2018-12-27 23:27:57 +00:00
string container,
MediaStream videoStream,
MediaSourceInfo mediaSource,
2018-12-27 23:27:57 +00:00
Video3DFormat? threedFormat,
TimeSpan interval,
string targetDirectory,
string filenamePrefix,
int? maxWidth,
CancellationToken cancellationToken);
/// <summary>
/// Gets the media info.
/// </summary>
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task<MediaInfo> GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken);
/// <summary>
/// Gets the input argument.
/// </summary>
/// <param name="inputFile">The input file.</param>
/// <param name="mediaSource">The mediaSource.</param>
2018-12-27 23:27:57 +00:00
/// <returns>System.String.</returns>
string GetInputArgument(string inputFile, MediaSourceInfo mediaSource);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the time parameter.
/// </summary>
/// <param name="ticks">The ticks.</param>
/// <returns>System.String.</returns>
string GetTimeParameter(long ticks);
Task ConvertImage(string inputPath, string outputPath);
/// <summary>
/// Escapes the subtitle filter path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
string EscapeSubtitleFilterPath(string path);
2019-02-28 22:47:56 +00:00
void SetFFmpegPath();
2018-12-27 23:27:57 +00:00
void UpdateEncoderPath(string path, string pathType);
2020-12-03 14:34:15 +00:00
IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, uint? titleNumber);
2018-12-27 23:27:57 +00:00
}
}