diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-12-01 22:36:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-01 22:36:04 -0500 |
| commit | a6199f821bf0ded711900163e52c91f462c985b1 (patch) | |
| tree | eeb8e59d052de227eb6ffab5a7dc1735c794b23a /Emby.Server.Implementations/MediaEncoder/EncodingManager.cs | |
| parent | 28373504da001b44aa5b19deee986bfde4776912 (diff) | |
| parent | 3bb8884e164857af01909d0f414f55ecf2a4f1e0 (diff) | |
Merge pull request #4169 from stanionascu/bdiso-playback
Playback (direct-stream/transcode) of BDISO/BDAV containers
Diffstat (limited to 'Emby.Server.Implementations/MediaEncoder/EncodingManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/MediaEncoder/EncodingManager.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs index 438bbe24a..f27305cbe 100644 --- a/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs +++ b/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs @@ -12,6 +12,7 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Model.MediaInfo; @@ -81,12 +82,7 @@ namespace Emby.Server.Implementations.MediaEncoder return false; } - if (video.VideoType == VideoType.Iso) - { - return false; - } - - if (video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd) + if (video.VideoType == VideoType.Dvd) { return false; } @@ -140,15 +136,19 @@ namespace Emby.Server.Implementations.MediaEncoder // Add some time for the first chapter to make sure we don't end up with a black image var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(_firstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks); - var protocol = MediaProtocol.File; - - var inputPath = MediaEncoderHelpers.GetInputArgument(_fileSystem, video.Path, null, Array.Empty<string>()); + var inputPath = video.Path; Directory.CreateDirectory(Path.GetDirectoryName(path)); var container = video.Container; + var mediaSource = new MediaSourceInfo + { + VideoType = video.VideoType, + IsoType = video.IsoType, + Protocol = video.PathProtocol.Value, + }; - var tempFile = await _encoder.ExtractVideoImage(inputPath, container, protocol, video.GetDefaultVideoStream(), video.Video3DFormat, time, cancellationToken).ConfigureAwait(false); + var tempFile = await _encoder.ExtractVideoImage(inputPath, container, mediaSource, video.GetDefaultVideoStream(), video.Video3DFormat, time, cancellationToken).ConfigureAwait(false); File.Copy(tempFile, path, true); try |
