From 3e8610464106337dc3d32b015371c639994e9e57 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sat, 18 Aug 2012 16:47:10 -0400 Subject: Moved ffmpeg to the controller project and added ffprobe --- MediaBrowser.Api/ApiService.cs | 56 ------------------------------------------ 1 file changed, 56 deletions(-) (limited to 'MediaBrowser.Api/ApiService.cs') 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; - /// - /// Gets the folder path to ffmpeg - /// - 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; - /// - /// Gets the path to ffmpeg.exe - /// - 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; - } - } } } -- cgit v1.2.3