diff options
| author | hatharry <hatharry@hotmail.com> | 2016-10-11 17:10:00 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-11 17:10:00 +1300 |
| commit | 9b0ac4bde5beb74703a258d582f477c6411ec6ec (patch) | |
| tree | a59864414d58bd01c86085a36355fc553dd43736 /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | |
| parent | 71386f0ceb15ce0bac2e588f90781a4bd274fe68 (diff) | |
| parent | cb26cb94579b772fa7825c6769dc7ace38217168 (diff) | |
Merge pull request #28 from MediaBrowser/dev
Dev
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; |
