From eee9c0e0489087f4a8f611165e547f8f2dd353d5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 22 Sep 2016 02:57:31 -0400 Subject: update recording dialogs --- .../Encoder/EncoderValidator.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs') diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index a450097fd..24de4e77e 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -26,6 +26,30 @@ namespace MediaBrowser.MediaEncoding.Encoder return new Tuple, List>(decoders, encoders); } + public bool ValidateVersion(string encoderAppPath) + { + string output = string.Empty; + try + { + output = GetProcessOutput(encoderAppPath, "-version"); + } + catch + { + } + + if (string.IsNullOrWhiteSpace(output)) + { + return false; + } + + if (output.IndexOf("Libav developers", StringComparison.OrdinalIgnoreCase) != -1) + { + return false; + } + + return true; + } + private List GetDecoders(string encoderAppPath) { string output = string.Empty; -- cgit v1.2.3