#nullable disable #pragma warning disable CS1591 using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Controller.MediaEncoding { /// /// Interface IMediaEncoder. /// public interface IMediaEncoder : ITranscoderSupport { /// /// Gets the encoder path. /// /// The encoder path. string EncoderPath { get; } /// /// Gets the probe path. /// /// The probe path. string ProbePath { get; } /// /// Gets the version of encoder. /// /// The version of encoder. Version EncoderVersion { get; } /// /// Gets a value indicating whether p key pausing is supported. /// /// true if p key pausing is supported, false otherwise. bool IsPkeyPauseSupported { get; } /// /// Gets a value indicating whether the configured Vaapi device is from AMD(radeonsi/r600 Mesa driver). /// /// true if the Vaapi device is an AMD(radeonsi/r600 Mesa driver) GPU, false otherwise. bool IsVaapiDeviceAmd { get; } /// /// Gets a value indicating whether the configured Vaapi device is from Intel(iHD driver). /// /// true if the Vaapi device is an Intel(iHD driver) GPU, false otherwise. bool IsVaapiDeviceInteliHD { get; } /// /// Gets a value indicating whether the configured Vaapi device is from Intel(legacy i965 driver). /// /// true if the Vaapi device is an Intel(legacy i965 driver) GPU, false otherwise. bool IsVaapiDeviceInteli965 { get; } /// /// Gets a value indicating whether the configured Vaapi device supports vulkan drm format modifier. /// /// true if the Vaapi device supports vulkan drm interop, false otherwise. bool IsVaapiDeviceSupportVulkanDrmInterop { get; } /// /// Whether given encoder codec is supported. /// /// The encoder. /// true if XXXX, false otherwise. bool SupportsEncoder(string encoder); /// /// Whether given decoder codec is supported. /// /// The decoder. /// true if XXXX, false otherwise. bool SupportsDecoder(string decoder); /// /// Whether given hardware acceleration type is supported. /// /// The hwaccel. /// true if XXXX, false otherwise. bool SupportsHwaccel(string hwaccel); /// /// Whether given filter is supported. /// /// The filter. /// true if the filter is supported, false otherwise. bool SupportsFilter(string filter); /// /// Whether filter is supported with the given option. /// /// The option. /// true if the filter is supported, false otherwise. bool SupportsFilterWithOption(FilterOptionType option); /// /// Extracts the audio image. /// /// The path. /// Index of the image stream. /// The cancellation token. /// Task{Stream}. Task ExtractAudioImage(string path, int? imageStreamIndex, CancellationToken cancellationToken); /// /// Extracts the video image. /// /// Input file. /// Video container type. /// Media source information. /// Media stream information. /// Video 3D format. /// Time offset. /// CancellationToken to use for operation. /// Location of video image. Task ExtractVideoImage(string inputFile, string container, MediaSourceInfo mediaSource, MediaStream videoStream, Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken); /// /// Extracts the video image. /// /// Input file. /// Video container type. /// Media source information. /// Media stream information. /// Index of the stream to extract from. /// The format of the file to write. /// CancellationToken to use for operation. /// Location of video image. Task ExtractVideoImage(string inputFile, string container, MediaSourceInfo mediaSource, MediaStream imageStream, int? imageStreamIndex, ImageFormat? targetFormat, CancellationToken cancellationToken); /// /// Extracts the video images on interval. /// /// Input file. /// Video container type. /// Media source information. /// Media stream information. /// The maximum width. /// The interval. /// Allow for hardware acceleration. /// The input/output thread count for ffmpeg. /// The qscale value for ffmpeg. /// The process priority for the ffmpeg process. /// EncodingHelper instance. /// The cancellation token. /// Directory where images where extracted. A given image made before another will always be named with a lower number. Task ExtractVideoImagesOnIntervalAccelerated( string inputFile, string container, MediaSourceInfo mediaSource, MediaStream imageStream, int maxWidth, TimeSpan interval, bool allowHwAccel, int? threads, int? qualityScale, ProcessPriorityClass? priority, EncodingHelper encodingHelper, CancellationToken cancellationToken); /// /// Gets the media info. /// /// The request. /// The cancellation token. /// Task. Task GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken); /// /// Gets the input argument. /// /// The input file. /// The mediaSource. /// System.String. string GetInputArgument(string inputFile, MediaSourceInfo mediaSource); /// /// Gets the input argument. /// /// The input files. /// The mediaSource. /// System.String. string GetInputArgument(IReadOnlyList inputFiles, MediaSourceInfo mediaSource); /// /// Gets the input argument for an external subtitle file. /// /// The input file. /// System.String. string GetExternalSubtitleInputArgument(string inputFile); /// /// Gets the time parameter. /// /// The ticks. /// System.String. string GetTimeParameter(long ticks); Task ConvertImage(string inputPath, string outputPath); /// /// Escapes the subtitle filter path. /// /// The path. /// System.String. string EscapeSubtitleFilterPath(string path); /// /// Sets the path to find FFmpeg. /// void SetFFmpegPath(); /// /// Updates the encoder path. /// /// The path. /// The type of path. void UpdateEncoderPath(string path, string pathType); /// /// Gets the primary playlist of .vob files. /// /// The to the .vob files. /// The title number to start with. /// A playlist. IReadOnlyList GetPrimaryPlaylistVobFiles(string path, uint? titleNumber); /// /// Gets the primary playlist of .m2ts files. /// /// The to the .m2ts files. /// A playlist. IReadOnlyList GetPrimaryPlaylistM2tsFiles(string path); /// /// Generates a FFmpeg concat config for the source. /// /// The . /// The path the config should be written to. void GenerateConcatConfig(MediaSourceInfo source, string concatFilePath); } }