2021-05-06 15:39:20 -07:00
|
|
|
#nullable disable
|
|
|
|
|
2020-08-22 12:56:24 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 13:01:16 -07:00
|
|
|
using System.IO;
|
2018-12-27 16:27:57 -07:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2019-01-13 12:25:32 -07:00
|
|
|
using MediaBrowser.Model.MediaInfo;
|
2018-12-27 16:27:57 -07:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
{
|
|
|
|
public interface ISubtitleEncoder
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the subtitles.
|
|
|
|
/// </summary>
|
2021-08-10 14:29:48 -07:00
|
|
|
/// <param name="item">Item to use.</param>
|
|
|
|
/// <param name="mediaSourceId">Media source.</param>
|
|
|
|
/// <param name="subtitleStreamIndex">Subtitle stream to use.</param>
|
|
|
|
/// <param name="outputFormat">Output format to use.</param>
|
|
|
|
/// <param name="startTimeTicks">Start time.</param>
|
|
|
|
/// <param name="endTimeTicks">End time.</param>
|
|
|
|
/// <param name="preserveOriginalTimestamps">Option to preserve original timestamps.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token for the operation.</param>
|
2018-12-27 16:27:57 -07:00
|
|
|
/// <returns>Task{Stream}.</returns>
|
2020-08-22 12:56:24 -07:00
|
|
|
Task<Stream> GetSubtitles(
|
|
|
|
BaseItem item,
|
2018-12-27 16:27:57 -07:00
|
|
|
string mediaSourceId,
|
|
|
|
int subtitleStreamIndex,
|
|
|
|
string outputFormat,
|
|
|
|
long startTimeTicks,
|
|
|
|
long endTimeTicks,
|
|
|
|
bool preserveOriginalTimestamps,
|
|
|
|
CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the subtitle language encoding parameter.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="path">The path.</param>
|
2020-08-22 12:56:24 -07:00
|
|
|
/// <param name="language">The language.</param>
|
2018-12-27 16:27:57 -07:00
|
|
|
/// <param name="protocol">The protocol.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
Task<string> GetSubtitleFileCharacterSet(string path, string language, MediaProtocol protocol, CancellationToken cancellationToken);
|
|
|
|
}
|
|
|
|
}
|