aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Drawing.ImageMagick/ImageMagickEncoder.cs4
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs2
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs3
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs7
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs2
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs4
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs2
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs54
-rw-r--r--MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs8
-rw-r--r--MediaBrowser.Controller/MediaEncoding/MediaInfoRequest.cs2
-rw-r--r--MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs2
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs7
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs10
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs57
-rw-r--r--MediaBrowser.Model/Dto/MediaSourceInfo.cs2
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs2
-rw-r--r--MediaBrowser.Model/Session/PlaybackProgressInfo.cs4
-rw-r--r--MediaBrowser.Providers/Manager/ImageSaver.cs1
-rw-r--r--SharedVersion.cs2
19 files changed, 91 insertions, 84 deletions
diff --git a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
index 39088c94b..77482d56b 100644
--- a/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
+++ b/Emby.Drawing.ImageMagick/ImageMagickEncoder.cs
@@ -44,7 +44,9 @@ namespace Emby.Drawing.ImageMagick
"cr2",
"crw",
"dng",
- "nef",
+
+ // Remove until supported
+ //"nef",
"orf",
"pef",
"arw",
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 8b6b388db..e0df65b8e 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -491,7 +491,7 @@ namespace Emby.Server.Implementations.Dto
}
}
- if (!(item is LiveTvProgram))
+ if (!(item is LiveTvProgram) || fields.Contains(ItemFields.PlayAccess))
{
dto.PlayAccess = item.GetPlayAccess(user);
}
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 56bffc233..32fb4ca7a 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -425,8 +425,7 @@ namespace Emby.Server.Implementations.Library
if (parent != null)
{
- await parent.ValidateChildren(new Progress<double>(), CancellationToken.None)
- .ConfigureAwait(false);
+ await parent.ValidateChildren(new Progress<double>(), CancellationToken.None, new MetadataRefreshOptions(_fileSystem), false) .ConfigureAwait(false);
}
}
else if (parent != null)
diff --git a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs
index e2f973699..9a8a930bd 100644
--- a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs
@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
namespace Emby.Server.Implementations.LiveTv
@@ -16,6 +15,8 @@ namespace Emby.Server.Implementations.LiveTv
private readonly IMediaEncoder _mediaEncoder;
private readonly ILogger _logger;
+ const int AnalyzeDurationMs = 2000;
+
public LiveStreamHelper(IMediaEncoder mediaEncoder, ILogger logger)
{
_mediaEncoder = mediaEncoder;
@@ -34,7 +35,7 @@ namespace Emby.Server.Implementations.LiveTv
Protocol = mediaSource.Protocol,
MediaType = isAudio ? DlnaProfileType.Audio : DlnaProfileType.Video,
ExtractChapters = false,
- AnalyzeDurationSections = 2
+ AnalyzeDurationMs = AnalyzeDurationMs
}, cancellationToken).ConfigureAwait(false);
@@ -98,6 +99,8 @@ namespace Emby.Server.Implementations.LiveTv
// Try to estimate this
mediaSource.InferTotalBitrate(true);
+
+ mediaSource.AnalyzeDurationMs = AnalyzeDurationMs;
}
}
}
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
index 7397380e1..af3f1359f 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
@@ -188,7 +188,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
using (var manager = new HdHomerunManager(_socketFactory))
{
// Legacy HdHomeruns are IPv4 only
- var ipInfo = new IpAddressInfo(uri.Host, IpAddressFamily.InterNetwork);
+ var ipInfo = _networkManager.ParseIpAddress(uri.Host);
for (int i = 0; i < model.TunerCount; ++i)
{
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
index 95ceb0660..8c749b1b5 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs
@@ -96,9 +96,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
{
using (var hdHomerunManager = new HdHomerunManager(_socketFactory))
{
- var remoteAddress = new IpAddressInfo(remoteIp, IpAddressFamily.InterNetwork);
+ var remoteAddress = _networkManager.ParseIpAddress(remoteIp);
IpAddressInfo localAddress = null;
- using (var tcpSocket = _socketFactory.CreateSocket(IpAddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp, false))
+ using (var tcpSocket = _socketFactory.CreateSocket(remoteAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp, false))
{
try
{
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs
index df83d4341..2cfa1b9a5 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs
@@ -40,7 +40,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
_sharedBuffer.Enqueue(copy);
- while (_sharedBuffer.Count > 3000)
+ while (_sharedBuffer.Count > 10000)
{
byte[] bytes;
_sharedBuffer.TryDequeue(out bytes);
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 18508a399..d66d0dbcb 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -175,6 +175,10 @@ namespace MediaBrowser.Controller.MediaEncoding
{
return null;
}
+ if (string.Equals(container, "rec", StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
return container;
}
@@ -460,21 +464,6 @@ namespace MediaBrowser.Controller.MediaEncoding
}
/// <summary>
- /// Gets the probe size argument.
- /// </summary>
- /// <param name="state">The state.</param>
- /// <returns>System.String.</returns>
- public string GetProbeSizeArgument(EncodingJobInfo state)
- {
- if (state.PlayableStreamFileNames.Count > 0)
- {
- return _mediaEncoder.GetProbeSizeAndAnalyzeDurationArgument(state.PlayableStreamFileNames.ToArray(), state.InputProtocol);
- }
-
- return _mediaEncoder.GetProbeSizeAndAnalyzeDurationArgument(new[] { state.MediaPath }, state.InputProtocol);
- }
-
- /// <summary>
/// Gets the text subtitle param.
/// </summary>
/// <param name="state">The state.</param>
@@ -1448,12 +1437,43 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
+ public static string GetProbeSizeArgument(int numInputFiles)
+ {
+ return numInputFiles > 1 ? "-probesize 1G" : "";
+ }
+
+ public static string GetAnalyzeDurationArgument(int numInputFiles)
+ {
+ return numInputFiles > 1 ? "-analyzeduration 200M" : "";
+ }
+
public string GetInputModifier(EncodingJobInfo state, EncodingOptions encodingOptions)
{
var inputModifier = string.Empty;
- var probeSize = GetProbeSizeArgument(state);
- inputModifier += " " + probeSize;
+ var numInputFiles = state.PlayableStreamFileNames.Count > 0 ? state.PlayableStreamFileNames.Count : 1;
+ var probeSizeArgument = GetProbeSizeArgument(numInputFiles);
+
+ string analyzeDurationArgument;
+ if (state.MediaSource.AnalyzeDurationMs.HasValue)
+ {
+ analyzeDurationArgument = "-analyzeduration " + (state.MediaSource.AnalyzeDurationMs.Value * 1000).ToString(CultureInfo.InvariantCulture);
+ }
+ else
+ {
+ analyzeDurationArgument = GetAnalyzeDurationArgument(numInputFiles);
+ }
+
+ if (!string.IsNullOrWhiteSpace(probeSizeArgument))
+ {
+ inputModifier += " " + probeSizeArgument;
+ }
+
+ if (!string.IsNullOrWhiteSpace(analyzeDurationArgument))
+ {
+ inputModifier += " " + analyzeDurationArgument;
+ }
+
inputModifier = inputModifier.Trim();
var userAgentParam = GetUserAgentParam(state);
diff --git a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
index 45aaa8e8e..78ed1dc59 100644
--- a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
+++ b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs
@@ -79,14 +79,6 @@ namespace MediaBrowser.Controller.MediaEncoding
Task<MediaInfo> GetMediaInfo(MediaInfoRequest request, CancellationToken cancellationToken);
/// <summary>
- /// Gets the probe size argument.
- /// </summary>
- /// <param name="inputFiles">The input files.</param>
- /// <param name="protocol">The protocol.</param>
- /// <returns>System.String.</returns>
- string GetProbeSizeAndAnalyzeDurationArgument(string[] inputFiles, MediaProtocol protocol);
-
- /// <summary>
/// Gets the input argument.
/// </summary>
/// <param name="inputFiles">The input files.</param>
diff --git a/MediaBrowser.Controller/MediaEncoding/MediaInfoRequest.cs b/MediaBrowser.Controller/MediaEncoding/MediaInfoRequest.cs
index 9ff7567d4..0785ee29f 100644
--- a/MediaBrowser.Controller/MediaEncoding/MediaInfoRequest.cs
+++ b/MediaBrowser.Controller/MediaEncoding/MediaInfoRequest.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.MediaEncoding
public IIsoMount MountedIso { get; set; }
public VideoType VideoType { get; set; }
public List<string> PlayableStreamFileNames { get; set; }
- public int AnalyzeDurationSections { get; set; }
+ public int AnalyzeDurationMs { get; set; }
public MediaInfoRequest()
{
diff --git a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs
index 2f7059fec..c986e2005 100644
--- a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs
+++ b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs
@@ -177,7 +177,7 @@ namespace MediaBrowser.LocalMetadata.Images
"default"
};
- if (item is MusicAlbum || item is MusicArtist || item is PhotoAlbum)
+ if (item is MusicAlbum || item is MusicArtist || item is PhotoAlbum || item is Person)
{
// these prefer folder
names.Insert(0, "poster");
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
index b37e783b8..9c1189f6c 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
@@ -90,6 +90,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var required = new[]
{
"h264_qsv",
+ "hevc_qsv",
"mpeg2_qsv",
"vc1_qsv"
};
@@ -134,9 +135,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
"libvorbis",
"srt",
"h264_nvenc",
+ "hevc_nvenc",
"h264_qsv",
+ "hevc_qsv",
"h264_omx",
+ "hevc_omx",
"h264_vaapi",
+ "hevc_vaapi",
"ac3"
};
@@ -205,4 +210,4 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
}
}
-} \ No newline at end of file
+}
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs
index e547f2fae..498df214f 100644
--- a/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs
@@ -61,15 +61,5 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Quotes are valid path characters in linux and they need to be escaped here with a leading \
return path.Replace("\"", "\\\"");
}
-
- public static string GetProbeSizeArgument(int numInputFiles)
- {
- return numInputFiles > 1 ? "-probesize 1G" : "";
- }
-
- public static string GetAnalyzeDurationArgument(int numInputFiles)
- {
- return numInputFiles > 1 ? "-analyzeduration 200M" : "";
- }
}
}
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index e7737b6a6..580f5c615 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -523,17 +523,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
var inputFiles = MediaEncoderHelpers.GetInputArgument(FileSystem, request.InputPath, request.Protocol, request.MountedIso, request.PlayableStreamFileNames);
- var probeSize = EncodingUtils.GetProbeSizeArgument(inputFiles.Length);
+ var probeSize = EncodingHelper.GetProbeSizeArgument(inputFiles.Length);
string analyzeDuration;
- if (request.AnalyzeDurationSections > 0)
+ if (request.AnalyzeDurationMs > 0)
{
analyzeDuration = "-analyzeduration " +
- (request.AnalyzeDurationSections * 1000000).ToString(CultureInfo.InvariantCulture);
+ (request.AnalyzeDurationMs * 1000).ToString(CultureInfo.InvariantCulture);
}
else
{
- analyzeDuration = EncodingUtils.GetAnalyzeDurationArgument(inputFiles.Length);
+ analyzeDuration = EncodingHelper.GetAnalyzeDurationArgument(inputFiles.Length);
}
probeSize = probeSize + " " + analyzeDuration;
@@ -558,31 +558,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
/// <summary>
- /// Gets the probe size argument.
- /// </summary>
- /// <param name="inputFiles">The input files.</param>
- /// <param name="protocol">The protocol.</param>
- /// <returns>System.String.</returns>
- public string GetProbeSizeAndAnalyzeDurationArgument(string[] inputFiles, MediaProtocol protocol)
- {
- var results = new List<string>();
-
- var probeSize = EncodingUtils.GetProbeSizeArgument(inputFiles.Length);
- var analyzeDuration = EncodingUtils.GetAnalyzeDurationArgument(inputFiles.Length);
-
- if (!string.IsNullOrWhiteSpace(probeSize))
- {
- results.Add(probeSize);
- }
-
- if (!string.IsNullOrWhiteSpace(analyzeDuration))
- {
- results.Add(analyzeDuration);
- }
- return string.Join(" ", results.ToArray());
- }
-
- /// <summary>
/// Gets the media info internal.
/// </summary>
/// <returns>Task{MediaInfoResult}.</returns>
@@ -984,11 +959,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
var args = useIFrame ? string.Format("-i {0}{3} -threads 0 -v quiet -vframes 1 -vf \"{2}{4}\" -f image2 \"{1}\"", inputPath, tempExtractPath, vf, mapArg, thumbnail) :
string.Format("-i {0}{3} -threads 0 -v quiet -vframes 1 -vf \"{2}\" -f image2 \"{1}\"", inputPath, tempExtractPath, vf, mapArg);
- var probeSize = GetProbeSizeAndAnalyzeDurationArgument(new[] { inputPath }, protocol);
+ var probeSizeArgument = EncodingHelper.GetProbeSizeArgument(1);
+ var analyzeDurationArgument = EncodingHelper.GetAnalyzeDurationArgument(1);
+
+ if (!string.IsNullOrWhiteSpace(probeSizeArgument))
+ {
+ args = probeSizeArgument + " " + args;
+ }
- if (!string.IsNullOrEmpty(probeSize))
+ if (!string.IsNullOrWhiteSpace(analyzeDurationArgument))
{
- args = probeSize + " " + args;
+ args = analyzeDurationArgument + " " + args;
}
if (offset.HasValue)
@@ -1092,11 +1073,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
var args = string.Format("-i {0} -threads 0 -v quiet -vf \"{2}\" -f image2 \"{1}\"", inputArgument, outputPath, vf);
- var probeSize = GetProbeSizeAndAnalyzeDurationArgument(new[] { inputArgument }, protocol);
+ var probeSizeArgument = EncodingHelper.GetProbeSizeArgument(1);
+ var analyzeDurationArgument = EncodingHelper.GetAnalyzeDurationArgument(1);
+
+ if (!string.IsNullOrWhiteSpace(probeSizeArgument))
+ {
+ args = probeSizeArgument + " " + args;
+ }
- if (!string.IsNullOrEmpty(probeSize))
+ if (!string.IsNullOrWhiteSpace(analyzeDurationArgument))
{
- args = probeSize + " " + args;
+ args = analyzeDurationArgument + " " + args;
}
var process = _processFactory.Create(new ProcessOptions
diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
index d20911a7f..d416cfd96 100644
--- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs
+++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
@@ -60,6 +60,8 @@ namespace MediaBrowser.Model.Dto
public string TranscodingSubProtocol { get; set; }
public string TranscodingContainer { get; set; }
+ public int? AnalyzeDurationMs { get; set; }
+
public MediaSourceInfo()
{
Formats = new List<string>();
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 9698e374f..82e4acaec 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -151,6 +151,8 @@
/// </summary>
People,
+ PlayAccess,
+
/// <summary>
/// The production locations
/// </summary>
diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
index 345931a62..fff4ee8e0 100644
--- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
@@ -73,6 +73,10 @@ namespace MediaBrowser.Model.Session
/// <value>The volume level.</value>
public int? VolumeLevel { get; set; }
+ public int? Brightness { get; set; }
+
+ public string AspectRatio { get; set; }
+
/// <summary>
/// Gets or sets the play method.
/// </summary>
diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs
index a65453a78..75c4b46b2 100644
--- a/MediaBrowser.Providers/Manager/ImageSaver.cs
+++ b/MediaBrowser.Providers/Manager/ImageSaver.cs
@@ -410,6 +410,7 @@ namespace MediaBrowser.Providers.Manager
var folderName = item is MusicAlbum ||
item is MusicArtist ||
item is PhotoAlbum ||
+ item is Person ||
(saveLocally && _config.Configuration.ImageSavingConvention == ImageSavingConvention.Legacy) ?
"folder" :
"poster";
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 5628aba38..effff008d 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,3 +1,3 @@
using System.Reflection;
-[assembly: AssemblyVersion("3.2.5.5")]
+[assembly: AssemblyVersion("3.2.5.6")]