newlines after braces

This commit is contained in:
telans 2020-06-20 21:13:48 +12:00
parent 7f307f9082
commit 5bb639a59a
No known key found for this signature in database
GPG Key ID: 195444EE92DBCB20
5 changed files with 19 additions and 0 deletions

View File

@ -2603,6 +2603,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{ {
return "-c:v vp8_qsv"; return "-c:v vp8_qsv";
} }
break; break;
case "vp9": case "vp9":
if (_mediaEncoder.SupportsDecoder("vp9_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("vp9", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("vp9_qsv") && encodingOptions.HardwareDecodingCodecs.Contains("vp9", StringComparer.OrdinalIgnoreCase))
@ -2610,6 +2611,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return (isColorDepth10 && return (isColorDepth10 &&
!encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_qsv"; !encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_qsv";
} }
break; break;
} }
} }
@ -2667,6 +2669,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{ {
return "-c:v vp8_cuvid"; return "-c:v vp8_cuvid";
} }
break; break;
case "vp9": case "vp9":
if (_mediaEncoder.SupportsDecoder("vp9_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("vp9", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("vp9_cuvid") && encodingOptions.HardwareDecodingCodecs.Contains("vp9", StringComparer.OrdinalIgnoreCase))
@ -2674,6 +2677,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return (isColorDepth10 && return (isColorDepth10 &&
!encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_cuvid"; !encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_cuvid";
} }
break; break;
} }
} }
@ -2818,6 +2822,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{ {
return "-c:v h264_opencl"; return "-c:v h264_opencl";
} }
break; break;
case "hevc": case "hevc":
case "h265": case "h265":
@ -2826,30 +2831,35 @@ namespace MediaBrowser.Controller.MediaEncoding
return (isColorDepth10 && return (isColorDepth10 &&
!encodingOptions.EnableDecodingColorDepth10Hevc) ? null : "-c:v hevc_opencl"; !encodingOptions.EnableDecodingColorDepth10Hevc) ? null : "-c:v hevc_opencl";
} }
break; break;
case "mpeg2video": case "mpeg2video":
if (_mediaEncoder.SupportsDecoder("mpeg2_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("mpeg2_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
{ {
return "-c:v mpeg2_opencl"; return "-c:v mpeg2_opencl";
} }
break; break;
case "mpeg4": case "mpeg4":
if (_mediaEncoder.SupportsDecoder("mpeg4_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("mpeg4_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
{ {
return "-c:v mpeg4_opencl"; return "-c:v mpeg4_opencl";
} }
break; break;
case "vc1": case "vc1":
if (_mediaEncoder.SupportsDecoder("vc1_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("vc1_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
{ {
return "-c:v vc1_opencl"; return "-c:v vc1_opencl";
} }
break; break;
case "vp8": case "vp8":
if (_mediaEncoder.SupportsDecoder("vp8_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("vp8_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
{ {
return "-c:v vp8_opencl"; return "-c:v vp8_opencl";
} }
break; break;
case "vp9": case "vp9":
if (_mediaEncoder.SupportsDecoder("vp9_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase)) if (_mediaEncoder.SupportsDecoder("vp9_opencl") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
@ -2857,6 +2867,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return (isColorDepth10 && return (isColorDepth10 &&
!encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_opencl"; !encodingOptions.EnableDecodingColorDepth10Vp9) ? null : "-c:v vp9_opencl";
} }
break; break;
} }
} }

View File

@ -345,6 +345,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
{ {
return true; return true;
} }
return false; return false;
} }
@ -359,6 +360,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
{ {
return count; return count;
} }
index = text.IndexOf(tag, index + 1); index = text.IndexOf(tag, index + 1);
} }

View File

@ -36,8 +36,11 @@ namespace MediaBrowser.Model.Configuration
public string EncoderPreset { get; set; } public string EncoderPreset { get; set; }
public string DeinterlaceMethod { get; set; } public string DeinterlaceMethod { get; set; }
public bool EnableDecodingColorDepth10Hevc { get; set; } public bool EnableDecodingColorDepth10Hevc { get; set; }
public bool EnableDecodingColorDepth10Vp9 { get; set; } public bool EnableDecodingColorDepth10Vp9 { get; set; }
public bool EnableHardwareEncoding { get; set; } public bool EnableHardwareEncoding { get; set; }
public bool EnableSubtitleExtraction { get; set; } public bool EnableSubtitleExtraction { get; set; }

View File

@ -222,6 +222,7 @@ namespace MediaBrowser.Model.Dlna
{ {
return MediaFormatProfile.AVC_MP4_LPCM; return MediaFormatProfile.AVC_MP4_LPCM;
} }
if (string.IsNullOrEmpty(audioCodec) || if (string.IsNullOrEmpty(audioCodec) ||
string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase)) string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
{ {
@ -267,6 +268,7 @@ namespace MediaBrowser.Model.Dlna
{ {
return MediaFormatProfile.MPEG4_P2_MP4_ASP_AAC; return MediaFormatProfile.MPEG4_P2_MP4_ASP_AAC;
} }
if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase) || string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase)) if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase) || string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
{ {
return MediaFormatProfile.MPEG4_P2_MP4_NDSD; return MediaFormatProfile.MPEG4_P2_MP4_NDSD;

View File

@ -38,6 +38,7 @@ namespace Rssdp.Infrastructure
get; get;
private set; private set;
} }
public string BuildMessage(string header, Dictionary<string, string> values) public string BuildMessage(string header, Dictionary<string, string> values)
{ {
var builder = new StringBuilder(); var builder = new StringBuilder();