mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-30 04:18:27 +01:00
added encoding manager interface
This commit is contained in:
@@ -5,7 +5,7 @@ using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaInfo;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
@@ -58,6 +58,7 @@ namespace MediaBrowser.Api.Playback
|
||||
/// </summary>
|
||||
/// <value>The media encoder.</value>
|
||||
protected IMediaEncoder MediaEncoder { get; private set; }
|
||||
protected IEncodingManager EncodingManager { get; private set; }
|
||||
protected IDtoService DtoService { get; private set; }
|
||||
|
||||
protected IFileSystem FileSystem { get; private set; }
|
||||
@@ -76,8 +77,9 @@ namespace MediaBrowser.Api.Playback
|
||||
/// <param name="dtoService">The dto service.</param>
|
||||
/// <param name="fileSystem">The file system.</param>
|
||||
/// <param name="itemRepository">The item repository.</param>
|
||||
protected BaseStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IDtoService dtoService, IFileSystem fileSystem, IItemRepository itemRepository, ILiveTvManager liveTvManager)
|
||||
protected BaseStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IDtoService dtoService, IFileSystem fileSystem, IItemRepository itemRepository, ILiveTvManager liveTvManager, IEncodingManager encodingManager)
|
||||
{
|
||||
EncodingManager = encodingManager;
|
||||
LiveTvManager = liveTvManager;
|
||||
ItemRepository = itemRepository;
|
||||
FileSystem = fileSystem;
|
||||
@@ -589,8 +591,8 @@ namespace MediaBrowser.Api.Playback
|
||||
/// <returns>System.String.</returns>
|
||||
private string GetExtractedAssPath(StreamState state, bool performConversion)
|
||||
{
|
||||
var path = FFMpegManager.Instance.GetSubtitleCachePath(state.MediaPath, state.SubtitleStream, ".ass");
|
||||
|
||||
var path = EncodingManager.GetSubtitleCachePath(state.MediaPath, state.SubtitleStream.Index, ".ass");
|
||||
|
||||
if (performConversion)
|
||||
{
|
||||
InputType type;
|
||||
@@ -629,7 +631,7 @@ namespace MediaBrowser.Api.Playback
|
||||
/// <returns>System.String.</returns>
|
||||
private string GetConvertedAssPath(string mediaPath, MediaStream subtitleStream, bool performConversion)
|
||||
{
|
||||
var path = FFMpegManager.Instance.GetSubtitleCachePath(mediaPath, subtitleStream, ".ass");
|
||||
var path = EncodingManager.GetSubtitleCachePath(subtitleStream.Path, ".ass");
|
||||
|
||||
if (performConversion)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user