diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-22 02:57:31 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-09-22 02:57:31 -0400 |
| commit | eee9c0e0489087f4a8f611165e547f8f2dd353d5 (patch) | |
| tree | 1bd122ead19b1c4cb306b5f758b70cc908aa75f7 /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | |
| parent | 6999017bc9823fac9f9ff0f0b6f5eab39b2519e2 (diff) | |
update recording dialogs
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 24 |
1 files changed, 24 insertions, 0 deletions
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<string>, List<string>>(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<string> GetDecoders(string encoderAppPath) { string output = string.Empty; |
