mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-22 18:23:45 +00:00
Update StyleCop
This commit is contained in:
@@ -679,8 +679,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
// TODO: This doesn't account for situations where the device is able to handle the media's bitrate, but the connection isn't fast enough
|
||||
var directPlayEligibilityResult = IsEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true) ?? 0, subtitleStream, audioStream, options, PlayMethod.DirectPlay);
|
||||
var directStreamEligibilityResult = IsEligibleForDirectPlay(item, options.GetMaxBitrate(false) ?? 0, subtitleStream, audioStream, options, PlayMethod.DirectStream);
|
||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.Item1);
|
||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.Item1);
|
||||
bool isEligibleForDirectPlay = options.EnableDirectPlay && (options.ForceDirectPlay || directPlayEligibilityResult.directPlay);
|
||||
bool isEligibleForDirectStream = options.EnableDirectStream && (options.ForceDirectStream || directStreamEligibilityResult.directPlay);
|
||||
|
||||
_logger.LogDebug(
|
||||
"Profile: {0}, Path: {1}, isEligibleForDirectPlay: {2}, isEligibleForDirectStream: {3}",
|
||||
@@ -695,7 +695,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
// See if it can be direct played
|
||||
var directPlayInfo = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectStream);
|
||||
var directPlay = directPlayInfo.Item1;
|
||||
var directPlay = directPlayInfo.playMethod;
|
||||
|
||||
if (directPlay != null)
|
||||
{
|
||||
@@ -713,17 +713,17 @@ namespace MediaBrowser.Model.Dlna
|
||||
return playlistItem;
|
||||
}
|
||||
|
||||
transcodeReasons.AddRange(directPlayInfo.Item2);
|
||||
transcodeReasons.AddRange(directPlayInfo.transcodeReasons);
|
||||
}
|
||||
|
||||
if (directPlayEligibilityResult.Item2.HasValue)
|
||||
if (directPlayEligibilityResult.reason.HasValue)
|
||||
{
|
||||
transcodeReasons.Add(directPlayEligibilityResult.Item2.Value);
|
||||
transcodeReasons.Add(directPlayEligibilityResult.reason.Value);
|
||||
}
|
||||
|
||||
if (directStreamEligibilityResult.Item2.HasValue)
|
||||
if (directStreamEligibilityResult.reason.HasValue)
|
||||
{
|
||||
transcodeReasons.Add(directStreamEligibilityResult.Item2.Value);
|
||||
transcodeReasons.Add(directStreamEligibilityResult.reason.Value);
|
||||
}
|
||||
|
||||
// Can't direct play, find the transcoding profile
|
||||
@@ -1000,7 +1000,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
return 7168000;
|
||||
}
|
||||
|
||||
private (PlayMethod?, List<TranscodeReason>) GetVideoDirectPlayProfile(
|
||||
private (PlayMethod? playMethod, List<TranscodeReason> transcodeReasons) GetVideoDirectPlayProfile(
|
||||
VideoOptions options,
|
||||
MediaSourceInfo mediaSource,
|
||||
MediaStream videoStream,
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Stability)'=='Unstable'">
|
||||
<!-- Include all symbols in the main nupkg until Azure Artifact Feed starts supporting ingesting NuGet symbol packages. -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
@@ -46,7 +50,7 @@
|
||||
<!-- Code Analyzers-->
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.376" PrivateAssets="All" />
|
||||
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace MediaBrowser.Model.Plugins
|
||||
NotSupported = -2,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin caused an error when instantiated. (Either DI loop, or exception)
|
||||
/// This plugin caused an error when instantiated (either DI loop, or exception).
|
||||
/// </summary>
|
||||
Malfunctioned = -3,
|
||||
|
||||
|
||||
@@ -6,42 +6,42 @@
|
||||
public enum HardwareEncodingType
|
||||
{
|
||||
/// <summary>
|
||||
/// AMD AMF
|
||||
/// AMD AMF.
|
||||
/// </summary>
|
||||
AMF = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Intel Quick Sync Video
|
||||
/// Intel Quick Sync Video.
|
||||
/// </summary>
|
||||
QSV = 1,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA NVENC
|
||||
/// NVIDIA NVENC.
|
||||
/// </summary>
|
||||
NVENC = 2,
|
||||
|
||||
/// <summary>
|
||||
/// OpenMax OMX
|
||||
/// OpenMax OMX.
|
||||
/// </summary>
|
||||
OMX = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Exynos V4L2 MFC
|
||||
/// Exynos V4L2 MFC.
|
||||
/// </summary>
|
||||
V4L2M2M = 4,
|
||||
|
||||
/// <summary>
|
||||
/// MediaCodec Android
|
||||
/// MediaCodec Android.
|
||||
/// </summary>
|
||||
MediaCodec = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Video Acceleration API (VAAPI)
|
||||
/// Video Acceleration API (VAAPI).
|
||||
/// </summary>
|
||||
VAAPI = 6,
|
||||
|
||||
/// <summary>
|
||||
/// Video ToolBox
|
||||
/// Video ToolBox.
|
||||
/// </summary>
|
||||
VideoToolBox = 7
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user