From f3096b83403d6ad8f5a087d46d04d889f96740a7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 15 Sep 2017 13:57:42 -0400 Subject: [PATCH] add omx decoder --- .../Library/Resolvers/TV/SeriesResolver.cs | 2 +- .../MediaEncoding/EncodingHelper.cs | 16 +++++++++++++++- SharedVersion.cs | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 9f982f9ce9..a693e3b264 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -173,7 +173,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV } } - logger.Debug("{0} is not a series folder.", path); + //logger.Debug("{0} is not a series folder.", path); return false; } diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 58208734bb..1060dc8def 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -56,7 +56,7 @@ namespace MediaBrowser.Controller.MediaEncoding { return GetAvailableEncoder("h264_nvenc", defaultEncoder); } - if (string.Equals(hwType, "h264_omx", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(hwType, "omx", StringComparison.OrdinalIgnoreCase)) { return GetAvailableEncoder("h264_omx", defaultEncoder); } @@ -1896,6 +1896,20 @@ namespace MediaBrowser.Controller.MediaEncoding break; } } + + else if (string.Equals(encodingOptions.HardwareAccelerationType, "omx", StringComparison.OrdinalIgnoreCase)) + { + switch (videoStream.Codec.ToLower()) + { + case "avc": + case "h264": + if (_mediaEncoder.SupportsDecoder("h264_omx") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase)) + { + return "-c:v h264_omx "; + } + break; + } + } } // leave blank so ffmpeg will decide diff --git a/SharedVersion.cs b/SharedVersion.cs index 4e09667595..7b8fbbc280 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.30.21")] +[assembly: AssemblyVersion("3.2.30.22")]