2019-01-13 20:01:16 +00:00
|
|
|
using System.IO;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Model.MediaInfo;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
{
|
|
|
|
public interface ISubtitleEncoder
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the subtitles.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
|
|
|
Task<Stream> GetSubtitles(BaseItem item,
|
|
|
|
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>
|
|
|
|
/// <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);
|
|
|
|
}
|
|
|
|
}
|