mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Initial migration code
This commit is contained in:
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Extensions;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
@@ -1991,7 +1992,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
filters.Add("hwupload");
|
||||
}
|
||||
|
||||
// When the input may or may not be hardware QSV decodable
|
||||
// When the input may or may not be hardware QSV decodable
|
||||
else if (string.Equals(outputVideoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (!hasTextSubs)
|
||||
@@ -2147,7 +2148,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var user = state.User;
|
||||
|
||||
// If the user doesn't have access to transcoding, then force stream copy, regardless of whether it will be compatible or not
|
||||
if (user != null && !user.Policy.EnableVideoPlaybackTranscoding)
|
||||
if (user != null && !user.HasPermission(PermissionKind.EnableVideoPlaybackTranscoding))
|
||||
{
|
||||
state.OutputVideoCodec = "copy";
|
||||
}
|
||||
@@ -2163,7 +2164,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var user = state.User;
|
||||
|
||||
// If the user doesn't have access to transcoding, then force stream copy, regardless of whether it will be compatible or not
|
||||
if (user != null && !user.Policy.EnableAudioPlaybackTranscoding)
|
||||
if (user != null && !user.HasPermission(PermissionKind.EnableAudioPlaybackTranscoding))
|
||||
{
|
||||
state.OutputAudioCodec = "copy";
|
||||
}
|
||||
|
||||
@@ -18,23 +18,38 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
public class EncodingJobInfo
|
||||
{
|
||||
public MediaStream VideoStream { get; set; }
|
||||
|
||||
public VideoType VideoType { get; set; }
|
||||
|
||||
public Dictionary<string, string> RemoteHttpHeaders { get; set; }
|
||||
|
||||
public string OutputVideoCodec { get; set; }
|
||||
|
||||
public MediaProtocol InputProtocol { get; set; }
|
||||
|
||||
public string MediaPath { get; set; }
|
||||
|
||||
public bool IsInputVideo { get; set; }
|
||||
|
||||
public IIsoMount IsoMount { get; set; }
|
||||
|
||||
public string[] PlayableStreamFileNames { get; set; }
|
||||
|
||||
public string OutputAudioCodec { get; set; }
|
||||
|
||||
public int? OutputVideoBitrate { get; set; }
|
||||
|
||||
public MediaStream SubtitleStream { get; set; }
|
||||
|
||||
public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
|
||||
|
||||
public string[] SupportedSubtitleCodecs { get; set; }
|
||||
|
||||
public int InternalSubtitleStreamOffset { get; set; }
|
||||
|
||||
public MediaSourceInfo MediaSource { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public Jellyfin.Data.Entities.User User { get; set; }
|
||||
|
||||
public long? RunTimeTicks { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user