move loopback util

This commit is contained in:
Luke Pulverenti
2017-03-10 13:33:17 -05:00
parent 8931b949f8
commit fc2a5acfca
10 changed files with 82 additions and 445 deletions

View File

@@ -107,7 +107,7 @@ using Emby.Server.Implementations.Playlists;
using Emby.Server.Implementations;
using Emby.Server.Implementations.ServerManager;
using Emby.Server.Implementations.Session;
using Emby.Server.Implementations.Social;
using Emby.Server.Implementations.Windows;
using Emby.Server.Implementations.TV;
using Emby.Server.Implementations.Updates;
using MediaBrowser.Model.Activity;
@@ -796,17 +796,25 @@ namespace Emby.Server.Core
info.FFMpegFilename = "ffmpeg";
info.FFProbeFilename = "ffprobe";
info.ArchiveType = "7z";
info.Version = "20160215";
info.Version = "20170308";
info.DownloadUrls = GetLinuxDownloadUrls();
}
else if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
{
info.FFMpegFilename = "ffmpeg.exe";
info.FFProbeFilename = "ffprobe.exe";
info.Version = "20160410";
info.Version = "20170308";
info.ArchiveType = "7z";
info.DownloadUrls = GetWindowsDownloadUrls();
}
else if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.OSX)
{
info.FFMpegFilename = "ffmpeg";
info.FFProbeFilename = "ffprobe";
info.ArchiveType = "7z";
info.Version = "20170308";
info.DownloadUrls = GetMacDownloadUrls();
}
else
{
// No version available - user requirement
@@ -816,6 +824,20 @@ namespace Emby.Server.Core
return info;
}
private string[] GetMacDownloadUrls()
{
switch (EnvironmentInfo.SystemArchitecture)
{
case Architecture.X64:
return new[]
{
"https://embydata.com/downloads/ffmpeg/osx/ffmpeg-x64-20170308.7z"
};
}
return new string[] { };
}
private string[] GetWindowsDownloadUrls()
{
switch (EnvironmentInfo.SystemArchitecture)
@@ -823,12 +845,12 @@ namespace Emby.Server.Core
case Architecture.X64:
return new[]
{
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win64.7z"
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win64.7z"
};
case Architecture.X86:
return new[]
{
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win32.7z"
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win32.7z"
};
}
@@ -842,12 +864,12 @@ namespace Emby.Server.Core
case Architecture.X64:
return new[]
{
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-64bit-static.7z"
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-64bit-static.7z"
};
case Architecture.X86:
return new[]
{
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-32bit-static.7z"
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-32bit-static.7z"
};
}
@@ -1716,12 +1738,10 @@ namespace Emby.Server.Core
public void EnableLoopback(string appName)
{
EnableLoopbackInternal(appName);
}
protected virtual void EnableLoopbackInternal(string appName)
{
if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
{
LoopUtil.Run(appName);
}
}
private void RegisterModules()