diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-18 16:47:10 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-08-18 16:47:10 -0400 |
| commit | 3e8610464106337dc3d32b015371c639994e9e57 (patch) | |
| tree | d38dd54c5b2b73cdd84d947767d2dea7e240fc69 /MediaBrowser.Api/ApiService.cs | |
| parent | 59a3dcc8c1c6b41560bd48507cfcf4f0ca0a8862 (diff) | |
Moved ffmpeg to the controller project and added ffprobe
Diffstat (limited to 'MediaBrowser.Api/ApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/ApiService.cs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/MediaBrowser.Api/ApiService.cs b/MediaBrowser.Api/ApiService.cs index 891b72834..6da5071df 100644 --- a/MediaBrowser.Api/ApiService.cs +++ b/MediaBrowser.Api/ApiService.cs @@ -197,61 +197,5 @@ namespace MediaBrowser.Api return null;
}
-
- private static string _FFMpegDirectory = null;
- /// <summary>
- /// Gets the folder path to ffmpeg
- /// </summary>
- public static string FFMpegDirectory
- {
- get
- {
- if (_FFMpegDirectory == null)
- {
- _FFMpegDirectory = System.IO.Path.Combine(Kernel.Instance.ApplicationPaths.ProgramDataPath, "ffmpeg");
-
- if (!Directory.Exists(_FFMpegDirectory))
- {
- Directory.CreateDirectory(_FFMpegDirectory);
- }
- }
-
- return _FFMpegDirectory;
- }
- }
-
- private static string _FFMpegPath = null;
- /// <summary>
- /// Gets the path to ffmpeg.exe
- /// </summary>
- public static string FFMpegPath
- {
- get
- {
- if (_FFMpegPath == null)
- {
- string filename = "ffmpeg.exe";
-
- _FFMpegPath = Path.Combine(FFMpegDirectory, filename);
-
- // Always re-extract the first time to handle new versions
- if (File.Exists(_FFMpegPath))
- {
- File.Delete(_FFMpegPath);
- }
-
- // Extract ffprobe
- using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MediaBrowser.Api.FFMpeg." + filename))
- {
- using (FileStream fileStream = new FileStream(_FFMpegPath, FileMode.Create))
- {
- stream.CopyTo(fileStream);
- }
- }
- }
-
- return _FFMpegPath;
- }
- }
}
}
|
