aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-30 11:27:17 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-30 11:27:17 -0400
commit23d65f487195283d134a341489234e64a62e931c (patch)
tree5adcac959f6433d87600d466ce570bd9a5d16614
parent3ef452decb19f3fd35fa1feaed0b4070748e36e0 (diff)
parent5b4cb77858d3c19bc512dc526ab02f4e597a1a69 (diff)
Merge branch 'dev' of https://github.com/MediaBrowser/Emby into dev
-rw-r--r--MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs6
-rw-r--r--MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs36
-rw-r--r--MediaBrowser.Server.Mac/Main.cs1
3 files changed, 28 insertions, 15 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
index 9b95e83e7..3e4bfe1a7 100644
--- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
+++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
@@ -115,6 +115,12 @@ namespace MediaBrowser.MediaEncoding.Probing
public int width { get; set; }
/// <summary>
+ /// Gets or sets the refs.
+ /// </summary>
+ /// <value>The refs.</value>
+ public int refs { get; set; }
+
+ /// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index 56ce6b6d6..ddcd48b8b 100644
--- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
+++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
@@ -189,6 +189,11 @@ namespace MediaBrowser.MediaEncoding.Probing
// http://stackoverflow.com/questions/17353387/how-to-detect-anamorphic-video-with-ffprobe
stream.IsAnamorphic = string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase);
+
+ if (streamInfo.refs > 0)
+ {
+ stream.RefFrames = streamInfo.refs;
+ }
}
else
{
@@ -927,25 +932,26 @@ namespace MediaBrowser.MediaEncoding.Probing
private void UpdateFromMediaInfo(MediaSourceInfo video, MediaStream videoStream)
{
- if (video.Protocol == MediaProtocol.File)
+ if (video.Protocol == MediaProtocol.File && videoStream != null)
{
- if (videoStream != null)
+ try
{
- try
- {
- _logger.Debug("Running MediaInfo against {0}", video.Path);
+ _logger.Debug("Running MediaInfo against {0}", video.Path);
- var result = new MediaInfoLib().GetVideoInfo(video.Path);
+ var result = new MediaInfoLib().GetVideoInfo(video.Path);
- videoStream.IsCabac = result.IsCabac ?? videoStream.IsCabac;
- videoStream.IsInterlaced = result.IsInterlaced ?? videoStream.IsInterlaced;
- videoStream.BitDepth = result.BitDepth ?? videoStream.BitDepth;
- videoStream.RefFrames = result.RefFrames;
- }
- catch (Exception ex)
- {
- _logger.ErrorException("Error running MediaInfo on {0}", ex, video.Path);
- }
+ videoStream.IsCabac = result.IsCabac ?? videoStream.IsCabac;
+ videoStream.IsInterlaced = result.IsInterlaced ?? videoStream.IsInterlaced;
+ videoStream.BitDepth = result.BitDepth ?? videoStream.BitDepth;
+ videoStream.RefFrames = result.RefFrames ?? videoStream.RefFrames;
+ }
+ catch (TypeLoadException)
+ {
+ // This is non-essential. Don't spam the log
+ }
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error running MediaInfo on {0}", ex, video.Path);
}
}
}
diff --git a/MediaBrowser.Server.Mac/Main.cs b/MediaBrowser.Server.Mac/Main.cs
index 250dfd7e7..67effa95f 100644
--- a/MediaBrowser.Server.Mac/Main.cs
+++ b/MediaBrowser.Server.Mac/Main.cs
@@ -92,6 +92,7 @@ namespace MediaBrowser.Server.Mac
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
var fileSystem = new ManagedFileSystem(new PatternsLogger(logManager.GetLogger("FileSystem")), false, true);
+ fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));
var nativeApp = new NativeApp();