mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
fix merge conflict
This commit is contained in:
@@ -99,10 +99,6 @@
|
||||
<Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
|
||||
<Name>MediaBrowser.Controller</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MediaBrowser.MediaInfo\MediaBrowser.MediaInfo.csproj">
|
||||
<Project>{6e4145e4-c6d4-4e4d-94f2-87188db6e239}</Project>
|
||||
<Name>MediaBrowser.MediaInfo</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
|
||||
<Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
|
||||
<Name>MediaBrowser.Model</Name>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.MediaInfo;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
@@ -26,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public Model.MediaInfo.MediaInfo GetMediaInfo(InternalMediaInfoResult data, VideoType videoType, bool isAudio, string path, MediaProtocol protocol)
|
||||
public MediaInfo GetMediaInfo(InternalMediaInfoResult data, VideoType videoType, bool isAudio, string path, MediaProtocol protocol)
|
||||
{
|
||||
var info = new Model.MediaInfo.MediaInfo
|
||||
{
|
||||
@@ -109,7 +108,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
if (videoStream != null && videoType == VideoType.VideoFile)
|
||||
{
|
||||
UpdateFromMediaInfo(info, videoStream);
|
||||
DetectInterlaced(info, videoStream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,29 +933,18 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
return TransportStreamTimestamp.None;
|
||||
}
|
||||
|
||||
private void UpdateFromMediaInfo(MediaSourceInfo video, MediaStream videoStream)
|
||||
private void DetectInterlaced(MediaSourceInfo video, MediaStream videoStream)
|
||||
{
|
||||
if (video.Protocol == MediaProtocol.File && videoStream != null)
|
||||
if (video.Protocol != MediaProtocol.File || videoStream == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.Debug("Running MediaInfo against {0}", video.Path);
|
||||
return;
|
||||
}
|
||||
|
||||
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 ?? 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);
|
||||
}
|
||||
// Take a shortcut and limit this to containers that are likely to have interlaced content
|
||||
if (!string.Equals(video.Container, "ts", StringComparison.OrdinalIgnoreCase) &&
|
||||
!string.Equals(video.Container, "wtv", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user