diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-09-22 03:00:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-22 03:00:52 -0400 |
| commit | 24afe4b3936e956ed8ea9e2a3de92f37398d4c91 (patch) | |
| tree | 8f8feeaedfcdb8b0f7ee1ceb4d0af1857ae47944 /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | |
| parent | 325c5f251bcdb53fcb665dcb3bc886f0135d0fc0 (diff) | |
| parent | eee9c0e0489087f4a8f611165e547f8f2dd353d5 (diff) | |
Merge pull request #2185 from MediaBrowser/dev
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; |
