aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-10-12 15:43:28 -0400
committerGitHub <noreply@github.com>2016-10-12 15:43:28 -0400
commit25ef9777cafee83c46ff53ede2caa04e3295e98a (patch)
tree5f1e6045d0b4d4d5b7d8dcaadf035b326f36e672 /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
parent0677d4ec990aee9a3bf7bda39dda01eb6fa66281 (diff)
parent5be6cf05e34459a046aceaa16c891f3034859476 (diff)
Merge pull request #2224 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs24
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;