2014-06-11 14:42:03 +00:00
|
|
|
|
using System.IO;
|
2014-06-10 17:36:06 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
{
|
|
|
|
|
public interface ISubtitleEncoder
|
|
|
|
|
{
|
2014-06-11 19:31:33 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Converts the subtitles.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="stream">The stream.</param>
|
|
|
|
|
/// <param name="inputFormat">The input format.</param>
|
|
|
|
|
/// <param name="outputFormat">The output format.</param>
|
|
|
|
|
/// <param name="startTimeTicks">The start time ticks.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
2014-06-11 14:42:03 +00:00
|
|
|
|
Task<Stream> ConvertSubtitles(
|
2014-06-11 19:31:33 +00:00
|
|
|
|
Stream stream,
|
|
|
|
|
string inputFormat,
|
2014-06-10 17:36:06 +00:00
|
|
|
|
string outputFormat,
|
2014-06-11 19:31:33 +00:00
|
|
|
|
long startTimeTicks,
|
2014-06-10 17:36:06 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2014-06-11 14:42:03 +00:00
|
|
|
|
|
2014-06-11 19:31:33 +00: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>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task{Stream}.</returns>
|
|
|
|
|
Task<Stream> GetSubtitles(string itemId,
|
2014-06-11 14:42:03 +00:00
|
|
|
|
string mediaSourceId,
|
|
|
|
|
int subtitleStreamIndex,
|
|
|
|
|
string outputFormat,
|
2014-06-11 19:31:33 +00:00
|
|
|
|
long startTimeTicks,
|
2014-06-11 14:42:03 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2014-06-11 19:31:33 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the subtitle language encoding parameter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
/// <param name="language">The language.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetSubtitleFileCharacterSet(string path, string language);
|
|
|
|
|
|
2014-06-10 17:36:06 +00:00
|
|
|
|
}
|
|
|
|
|
}
|