From 792da5967eec466200a79788ac115da2946374b0 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 7 Aug 2016 14:46:11 -0400 Subject: [PATCH 1/2] remove unused strings --- .../ConsistencyTests/StringUsageReporter.cs | 14 +++++++------- MediaBrowser.sln | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs b/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs index bea709c5c8..5234f7857e 100644 --- a/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs +++ b/MediaBrowser.Tests/ConsistencyTests/StringUsageReporter.cs @@ -71,7 +71,7 @@ namespace MediaBrowser.Tests.ConsistencyTests /// /// List of file extension to search. /// - public static string[] TargetExtensions = new[] { "js", "html" }; + public static string[] TargetExtensions = new[] { ".js", ".html" }; /// /// List of paths to exclude from search. @@ -96,11 +96,11 @@ namespace MediaBrowser.Tests.ConsistencyTests } } - [TestMethod] - public void ReportStringUsage() - { - this.CheckDashboardStrings(false); - } + //[TestMethod] + //public void ReportStringUsage() + //{ + // this.CheckDashboardStrings(false); + //} [TestMethod] public void ReportUnusedStrings() @@ -135,7 +135,7 @@ namespace MediaBrowser.Tests.ConsistencyTests var allFiles = rootFolderInfo.GetFiles("*", SearchOption.AllDirectories); - var filteredFiles1 = allFiles.Where(f => TargetExtensions.Any(e => f.Name.EndsWith(e))); + var filteredFiles1 = allFiles.Where(f => TargetExtensions.Any(e => string.Equals(e, f.Extension, StringComparison.OrdinalIgnoreCase))); var filteredFiles2 = filteredFiles1.Where(f => !ExcludePaths.Any(p => f.FullName.Contains(p))); var selectedFiles = filteredFiles2.OrderBy(f => f.FullName).ToList(); diff --git a/MediaBrowser.sln b/MediaBrowser.sln index cf4a5428c2..c6068f5364 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -65,6 +65,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Drawing", "Emby.Drawing\Emby.Drawing.csproj", "{08FFF49B-F175-4807-A2B5-73B0EBD9F716}" EndProject Global + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms From 7daf34f048c162f0fc2e5b4d28935f0c93c3c281 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 7 Aug 2016 16:13:30 -0400 Subject: [PATCH 2/2] quote ffmpeg params --- MediaBrowser.Api/Playback/Progressive/VideoService.cs | 6 +++--- MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 3 ++- MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs | 4 ++-- .../LiveTv/EmbyTV/EncodedRecorder.cs | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs index 3fd67c51ea..21e8845f5f 100644 --- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs +++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs @@ -149,11 +149,11 @@ namespace MediaBrowser.Api.Playback.Progressive { args += " -copyts -avoid_negative_ts disabled -start_at_zero"; } - + return args; } - var keyFrameArg = string.Format(" -force_key_frames expr:gte(t,n_forced*{0})", + var keyFrameArg = string.Format(" -force_key_frames \"expr:gte(t,n_forced*{0})\"", 5.ToString(UsCulture)); args += keyFrameArg; @@ -237,4 +237,4 @@ namespace MediaBrowser.Api.Playback.Progressive return args; } } -} +} \ No newline at end of file diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index 5d3db612f6..a450097fd2 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -87,6 +87,7 @@ namespace MediaBrowser.MediaEncoding.Encoder "h264_nvenc", "h264_qsv", "h264_omx", + "h264_vaapi", "ac3" }; @@ -156,4 +157,4 @@ namespace MediaBrowser.MediaEncoding.Encoder } } } -} +} \ No newline at end of file diff --git a/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs index d65e057834..457fbe2c26 100644 --- a/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs @@ -84,7 +84,7 @@ namespace MediaBrowser.MediaEncoding.Encoder return args; } - var keyFrameArg = string.Format(" -force_key_frames expr:gte(t,n_forced*{0})", + var keyFrameArg = string.Format(" -force_key_frames \"expr:gte(t,n_forced*{0})\"", 5.ToString(UsCulture)); args += keyFrameArg; @@ -192,4 +192,4 @@ namespace MediaBrowser.MediaEncoding.Encoder get { return true; } } } -} +} \ No newline at end of file diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 5e428e6f01..fc3a507d17 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -191,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { var maxBitrate = 25000000; videoArgs = string.Format( - "-codec:v:0 libx264 -force_key_frames expr:gte(t,n_forced*5) {0} -pix_fmt yuv420p -preset superfast -crf 23 -b:v {1} -maxrate {1} -bufsize ({1}*2) -vsync -1 -profile:v high -level 41", + "-codec:v:0 libx264 -force_key_frames \"expr:gte(t,n_forced*5)\" {0} -pix_fmt yuv420p -preset superfast -crf 23 -b:v {1} -maxrate {1} -bufsize ({1}*2) -vsync -1 -profile:v high -level 41", GetOutputSizeParam(), maxBitrate.ToString(CultureInfo.InvariantCulture)); } @@ -354,4 +354,4 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV } } } -} +} \ No newline at end of file