mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 12:36:44 +00:00
Compare commits
20 commits
7cad675971
...
17bbb24138
Author | SHA1 | Date | |
---|---|---|---|
|
17bbb24138 | ||
|
1c4333ee4c | ||
|
855e6ece30 | ||
|
6836b143c7 | ||
|
82387dfded | ||
|
8656a86c47 | ||
|
9d0f8893a5 | ||
|
c7f8c19be7 | ||
|
217c1d99e2 | ||
|
dedd913682 | ||
|
09faf340fb | ||
|
f31dc2b1cd | ||
|
d43ea98e0e | ||
|
5e62d9ba36 | ||
|
508cce8827 | ||
|
349b6044d1 | ||
|
e9264a3c2a | ||
|
06f5bfa598 | ||
|
cc2d9890f9 | ||
|
86a500309d |
8 changed files with 48 additions and 16 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
@ -3,19 +3,25 @@ name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/ci.yml
|
- .github/workflows/ci.yml
|
||||||
|
- Directory.Build.props
|
||||||
- FFMpegCore/**
|
- FFMpegCore/**
|
||||||
- FFMpegCore.Test/**
|
- FFMpegCore.Test/**
|
||||||
|
- FFMpegCore.Extensions.SkiaSharp/**
|
||||||
|
- FFMpegCore.Extensions.System.Drawing.Common/**
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- release
|
- release
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/ci.yml
|
- .github/workflows/ci.yml
|
||||||
- FFMpegCore/**
|
- Directory.Build.props
|
||||||
- FFMpegCore.Test/**
|
- FFMpegCore/**
|
||||||
|
- FFMpegCore.Test/**
|
||||||
|
- FFMpegCore.Extensions.SkiaSharp/**
|
||||||
|
- FFMpegCore.Extensions.System.Drawing.Common/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
@ -47,8 +53,9 @@ jobs:
|
||||||
|
|
||||||
- if: matrix.os == 'windows-latest'
|
- if: matrix.os == 'windows-latest'
|
||||||
name: Upload coverage reports to Codecov
|
name: Upload coverage reports to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
directory: FFMpegCore.Test/TestResults
|
directory: FFMpegCore.Test/TestResults
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
os: windows
|
||||||
|
|
|
@ -13,5 +13,14 @@
|
||||||
<PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
|
|
||||||
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||||
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<Description>Image extension for FFMpegCore using SkiaSharp</Description>
|
<Description>Image extension for FFMpegCore using SkiaSharp</Description>
|
||||||
<PackageVersion>5.0.0</PackageVersion>
|
<PackageVersion>5.0.1</PackageVersion>
|
||||||
<PackageOutputPath>../nupkg</PackageOutputPath>
|
<PackageOutputPath>../nupkg</PackageOutputPath>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="SkiaSharp" Version="2.88.6" />
|
<PackageReference Include="SkiaSharp" Version="3.116.0" />
|
||||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
|
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.116.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<Description>Image extension for FFMpegCore using System.Common.Drawing</Description>
|
<Description>Image extension for FFMpegCore using System.Common.Drawing</Description>
|
||||||
<PackageVersion>5.0.0</PackageVersion>
|
<PackageVersion>5.0.1</PackageVersion>
|
||||||
<PackageOutputPath>../nupkg</PackageOutputPath>
|
<PackageOutputPath>../nupkg</PackageOutputPath>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
</PackageReleaseNotes>
|
</PackageReleaseNotes>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0"/>
|
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using FFMpegCore.Arguments;
|
using FFMpegCore.Arguments;
|
||||||
|
using FFMpegCore.Exceptions;
|
||||||
|
using FFMpegCore.Helpers;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
using Instances.Exceptions;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
namespace FFMpegCore.Test
|
namespace FFMpegCore.Test
|
||||||
|
@ -99,5 +102,12 @@ public void Audible_Aax_Test()
|
||||||
var arg = new AudibleEncryptionKeyArgument("62689101");
|
var arg = new AudibleEncryptionKeyArgument("62689101");
|
||||||
arg.Text.Should().Be($"-activation_bytes 62689101");
|
arg.Text.Should().Be($"-activation_bytes 62689101");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Throws_FFMpegException_when_ffmpeg_not_found()
|
||||||
|
{
|
||||||
|
var exception = Assert.ThrowsException<FFMpegException>(() => FFMpegHelper.VerifyFFMpegExists(new FFOptions { BinaryFolder = "./folder/that/does/not/exist" }));
|
||||||
|
Assert.IsInstanceOfType<InstanceFileNotFoundException>(exception.InnerException);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
|
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
|
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.88.6" />
|
<PackageReference Include="SkiaSharp" Version="3.116.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -17,10 +17,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Instances" Version="3.0.0" />
|
<PackageReference Include="Instances" Version="3.0.1" />
|
||||||
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -42,8 +42,16 @@ public static void VerifyFFMpegExists(FFOptions ffMpegOptions)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = Instance.Finish(GlobalFFOptions.GetFFMpegBinaryPath(ffMpegOptions), "-version");
|
try
|
||||||
_ffmpegVerified = result.ExitCode == 0;
|
{
|
||||||
|
var result = Instance.Finish(GlobalFFOptions.GetFFMpegBinaryPath(ffMpegOptions), "-version");
|
||||||
|
_ffmpegVerified = result.ExitCode == 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system", e);
|
||||||
|
}
|
||||||
|
|
||||||
if (!_ffmpegVerified)
|
if (!_ffmpegVerified)
|
||||||
{
|
{
|
||||||
throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system");
|
throw new FFMpegException(FFMpegExceptionType.Operation, "ffmpeg was not found on your system");
|
||||||
|
|
Loading…
Reference in a new issue