aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
diff options
context:
space:
mode:
authorStanislav Ionascu <stanislav.ionascu@gmail.com>2020-09-24 08:41:42 +0200
committerStanislav Ionascu <stanislav.ionascu@gmail.com>2020-10-01 21:59:57 +0200
commit3ad62329731c1156566bd707f21cad60e74f9a5f (patch)
tree76b1c4b335bdf9d74929d0d04ac8cedf4a1f7ec7 /Emby.Server.Implementations/MediaEncoder/EncodingManager.cs
parentc7b3d4a90c946f9a2438622cc0ca43d19b84bef8 (diff)
Add probe / direct-stream / transcoding support for BluRays
This commit (and ffmpeg built with libbluray support), adds support for playback of bluray images (bd-iso) and bluray folders.
Diffstat (limited to 'Emby.Server.Implementations/MediaEncoder/EncodingManager.cs')
-rw-r--r--Emby.Server.Implementations/MediaEncoder/EncodingManager.cs20
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..791d00963 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 = MediaEncoderHelpers.GetInputArgument(_fileSystem, video.Path, Array.Empty<string>());
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