2015-03-31 09:24:16 -07:00
|
|
|
|
using MediaBrowser.Model.MediaInfo;
|
|
|
|
|
using System.IO;
|
2014-06-10 10:36:06 -07:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
{
|
|
|
|
|
public interface ISubtitleEncoder
|
|
|
|
|
{
|
2014-06-11 12:31:33 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the subtitles.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="itemId">The item identifier.</param>
|
|
|
|
|
/// <param name="mediaSourceId">The media source identifier.</param>
|
|
|
|
|
/// <param name="subtitleStreamIndex">Index of the subtitle stream.</param>
|
|
|
|
|
/// <param name="outputFormat">The output format.</param>
|
|
|
|
|
/// <param name="startTimeTicks">The start time ticks.</param>
|
2014-08-05 16:59:24 -07:00
|
|
|
|
/// <param name="endTimeTicks">The end time ticks.</param>
|
2014-06-11 12:31:33 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
|
|
|
|
Task<Stream> GetSubtitles(string itemId,
|
2014-06-11 07:42:03 -07:00
|
|
|
|
string mediaSourceId,
|
|
|
|
|
int subtitleStreamIndex,
|
|
|
|
|
string outputFormat,
|
2014-06-11 12:31:33 -07:00
|
|
|
|
long startTimeTicks,
|
2014-08-05 16:59:24 -07:00
|
|
|
|
long? endTimeTicks,
|
2014-06-11 07:42:03 -07:00
|
|
|
|
CancellationToken cancellationToken);
|
2014-06-11 12:31:33 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the subtitle language encoding parameter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
2015-03-31 09:24:16 -07:00
|
|
|
|
/// <param name="protocol">The protocol.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2014-06-11 12:31:33 -07:00
|
|
|
|
/// <returns>System.String.</returns>
|
2016-04-02 18:19:27 -07:00
|
|
|
|
Task<string> GetSubtitleFileCharacterSet(string path, string language, MediaProtocol protocol, CancellationToken cancellationToken);
|
2014-06-10 10:36:06 -07:00
|
|
|
|
}
|
|
|
|
|
}
|