mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-16 07:06:18 +00:00
ReSharper format: conform inline 'out' parameters.
This commit is contained in:
@@ -943,9 +943,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var level = state.GetRequestedLevel(videoStream.Codec);
|
||||
if (!string.IsNullOrEmpty(level))
|
||||
{
|
||||
double requestLevel;
|
||||
|
||||
if (double.TryParse(level, NumberStyles.Any, _usCulture, out requestLevel))
|
||||
if (double.TryParse(level, NumberStyles.Any, _usCulture, out var requestLevel))
|
||||
{
|
||||
if (!videoStream.Level.HasValue)
|
||||
{
|
||||
|
||||
@@ -193,8 +193,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
if (!string.IsNullOrEmpty(codec))
|
||||
{
|
||||
var value = BaseRequest.GetOption(codec, "maxrefframes");
|
||||
int result;
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -213,8 +212,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
if (!string.IsNullOrEmpty(codec))
|
||||
{
|
||||
var value = BaseRequest.GetOption(codec, "videobitdepth");
|
||||
int result;
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -233,8 +231,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
if (!string.IsNullOrEmpty(codec))
|
||||
{
|
||||
var value = BaseRequest.GetOption(codec, "audiobitdepth");
|
||||
int result;
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -257,8 +254,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
if (!string.IsNullOrEmpty(codec))
|
||||
{
|
||||
var value = BaseRequest.GetOption(codec, "audiochannels");
|
||||
int result;
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -419,8 +415,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
var level = GetRequestedLevel(ActualOutputVideoCodec);
|
||||
double result;
|
||||
if (!string.IsNullOrEmpty(level) && double.TryParse(level, NumberStyles.Any, CultureInfo.InvariantCulture, out result))
|
||||
if (!string.IsNullOrEmpty(level) && double.TryParse(level, NumberStyles.Any, CultureInfo.InvariantCulture, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -228,8 +228,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
public string GetOption(string name)
|
||||
{
|
||||
string value;
|
||||
if (StreamOptions.TryGetValue(name, out value))
|
||||
if (StreamOptions.TryGetValue(name, out var value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -74,9 +74,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
(i + 1 < parts.Length))
|
||||
{
|
||||
var rate = parts[i + 1];
|
||||
float val;
|
||||
|
||||
if (float.TryParse(rate, NumberStyles.Any, _usCulture, out val))
|
||||
if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val))
|
||||
{
|
||||
framerate = val;
|
||||
}
|
||||
@@ -85,9 +84,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
part.StartsWith("time=", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var time = part.Split(new[] { '=' }, 2).Last();
|
||||
TimeSpan val;
|
||||
|
||||
if (TimeSpan.TryParse(time, _usCulture, out val))
|
||||
if (TimeSpan.TryParse(time, _usCulture, out var val))
|
||||
{
|
||||
var currentMs = startMs + val.TotalMilliseconds;
|
||||
|
||||
@@ -110,9 +108,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
if (scale.HasValue)
|
||||
{
|
||||
long val;
|
||||
|
||||
if (long.TryParse(size, NumberStyles.Any, _usCulture, out val))
|
||||
if (long.TryParse(size, NumberStyles.Any, _usCulture, out var val))
|
||||
{
|
||||
bytesTranscoded = val * scale.Value;
|
||||
}
|
||||
@@ -131,9 +127,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
if (scale.HasValue)
|
||||
{
|
||||
float val;
|
||||
|
||||
if (float.TryParse(rate, NumberStyles.Any, _usCulture, out val))
|
||||
if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val))
|
||||
{
|
||||
bitRate = (int)Math.Ceiling(val * scale.Value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user