mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 20:46:43 +00:00
Reformatted to fix lint error
This commit is contained in:
parent
a647f44029
commit
463fb9bf6b
2 changed files with 31 additions and 31 deletions
|
@ -20,7 +20,7 @@ public void GetLatestSuiteTest()
|
|||
Assert.Inconclusive("This test is only for Windows");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void GetLatestFFMpegTest()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ public void GetLatestFFMpegTest()
|
|||
Assert.Inconclusive("This test is only for Windows");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void GetLatestFFProbeTest()
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ public void GetLatestFFProbeTest()
|
|||
Assert.Inconclusive("This test is only for Windows");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void GetLatestFFPlayTest()
|
||||
{
|
||||
|
|
|
@ -1,14 +1,29 @@
|
|||
using System.Net;
|
||||
using System.IO.Compression;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FFMpegCore.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the latest FFMpeg suite binaries from GitHub. Only supported for windows at the moment.
|
||||
/// Downloads the latest FFMpeg suite binaries from GitHub. Only supported for windows at the moment.
|
||||
/// </summary>
|
||||
public class FFMpegDownloader
|
||||
{
|
||||
/// <summary>
|
||||
/// Supported FFMpeg versions
|
||||
/// </summary>
|
||||
public enum FFMpegVersions
|
||||
{
|
||||
V4_4_1,
|
||||
V4_2_1,
|
||||
V4_2,
|
||||
V4_1,
|
||||
V4_0,
|
||||
V3_4,
|
||||
V3_3,
|
||||
V3_2
|
||||
}
|
||||
|
||||
private static readonly Dictionary<FFMpegVersions, string> Windows64FFMpegDownloadUrls = new()
|
||||
{
|
||||
{
|
||||
|
@ -42,7 +57,7 @@ public class FFMpegDownloader
|
|||
{
|
||||
FFMpegVersions.V3_2,
|
||||
"https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v3.2/ffmpeg-3.2-win-64.zip"
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
private static readonly Dictionary<FFMpegVersions, string> Windows32FFMpegDownloadUrls = new()
|
||||
|
@ -75,26 +90,11 @@ public class FFMpegDownloader
|
|||
{
|
||||
FFMpegVersions.V3_2,
|
||||
"https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v3.2/ffmpeg-3.2-win-32.zip"
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Supported FFMpeg versions
|
||||
/// </summary>
|
||||
public enum FFMpegVersions
|
||||
{
|
||||
V4_4_1,
|
||||
V4_2_1,
|
||||
V4_2,
|
||||
V4_1,
|
||||
V4_0,
|
||||
V3_4,
|
||||
V3_3,
|
||||
V3_2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the latest FFMpeg suite binaries to bin directory.
|
||||
/// Downloads the latest FFMpeg suite binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns>Names of the binary that was saved to bin directory</returns>
|
||||
|
@ -108,7 +108,7 @@ public static List<string> DownloadFFMpegSuite(FFMpegVersions version = FFMpegVe
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the latest FFMpeg binaries to bin directory.
|
||||
/// Downloads the latest FFMpeg binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -122,7 +122,7 @@ public static List<string> DownloadFFMpeg(FFMpegVersions version = FFMpegVersion
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the latest FFProbe binaries to bin directory.
|
||||
/// Downloads the latest FFProbe binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -136,7 +136,7 @@ public static List<string> DownloadFFProbe(FFMpegVersions version = FFMpegVersio
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the latest FFPlay binaries to bin directory.
|
||||
/// Downloads the latest FFPlay binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -150,7 +150,7 @@ public static List<string> DownloadFFPlay(FFMpegVersions version = FFMpegVersion
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the zip file from the given url and saves the binaries to bin directory.
|
||||
/// Downloads the zip file from the given url and saves the binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -164,7 +164,7 @@ private static List<string> DownloadAndSave(Uri url)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Downloads the zip file from the given url.
|
||||
/// Downloads the zip file from the given url.
|
||||
/// </summary>
|
||||
/// <param name="address"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -178,7 +178,7 @@ private static MemoryStream DownloadZip(Uri address)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extracts the zip file and saves the binaries to bin directory.
|
||||
/// Extracts the zip file and saves the binaries to bin directory.
|
||||
/// </summary>
|
||||
/// <param name="zipStream"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -200,7 +200,7 @@ private static List<string> ExtractZip(Stream zipStream)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the given uri is valid.
|
||||
/// Checks if the given uri is valid.
|
||||
/// </summary>
|
||||
/// <param name="uri"></param>
|
||||
/// <exception cref="PlatformNotSupportedException"></exception>
|
||||
|
|
Loading…
Reference in a new issue