File tree Expand file tree Collapse file tree 4 files changed +3
-32
lines changed
Expand file tree Collapse file tree 4 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,5 @@ UpgradeLog*.XML
105105
106106* .stackdump
107107
108- # JetBrains Rider
109- .idea /
110- * .sln.iml
111-
112108# Local
113109/FFmpeg.AutoGen.Example /frame. * .jpg
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >net6.0; netstandard2.1;netstandard2.0;net472;net45</TargetFrameworks >
4+ <TargetFrameworks >netstandard2.1;netstandard2.0;net472;net45</TargetFrameworks >
55 <GeneratePackageOnBuild Condition =" $(Configuration) == 'Release' " >true</GeneratePackageOnBuild >
66 <Description >FFmpeg auto generated unsafe bindings for C#/.NET and Mono.</Description >
77 </PropertyGroup >
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
33using System . Linq ;
4- using System . Runtime . InteropServices ;
54using FFmpeg . AutoGen . Native ;
65
76namespace FFmpeg . AutoGen
@@ -39,23 +38,11 @@ static ffmpeg()
3938 {
4039 GetOrLoadLibrary = libraryName => LoadLibrary ( libraryName , true ) ;
4140
42- #if NET
43- //BSD has #define EAGAIN 35 in errno.h, other OS have EAGAIN 11. Apple is based on BSD
44- bool bsdStyleErrno =
45- OperatingSystem . IsFreeBSD ( )
46- || OperatingSystem . IsMacCatalyst ( )
47- || OperatingSystem . IsMacOS ( )
48- || OperatingSystem . IsIOS ( )
49- || OperatingSystem . IsTvOS ( )
50- || OperatingSystem . IsWatchOS ( ) ;
51- EAGAIN = bsdStyleErrno ? 35 : 11 ;
52- #else
5341 EAGAIN = LibraryLoader . GetPlatformId ( ) switch
5442 {
5543 PlatformID . MacOSX => 35 ,
5644 _ => 11
5745 } ;
58- #endif
5946 }
6047
6148 /// <summary>
Original file line number Diff line number Diff line change 44
55namespace FFmpeg . AutoGen . Native
66{
7- public delegate PlatformID ? GetPlatformId ( ) ;
7+ public delegate PlatformID GetPlatformId ( ) ;
88
99 public delegate string GetNativeLibraryName ( string libraryName , int version ) ;
1010
@@ -16,23 +16,11 @@ static LibraryLoader()
1616 {
1717#if NET45 || NET40
1818 return Environment . OSVersion . Platform ;
19- #elif NET
20- if ( OperatingSystem . IsWindows ( ) )
21- return PlatformID . Win32NT ;
22- if ( OperatingSystem . IsMacCatalyst ( )
23- || OperatingSystem . IsMacOS ( )
24- || OperatingSystem . IsIOS ( )
25- || OperatingSystem . IsTvOS ( )
26- || OperatingSystem . IsWatchOS ( ) )
27- return PlatformID . MacOSX ; // all share similar .dylib calling style. But only static libs on iOS store apps!
28- if ( OperatingSystem . IsAndroid ( ) || OperatingSystem . IsFreeBSD ( ) || OperatingSystem . IsLinux ( ) )
29- return PlatformID . Unix ;
30- return null ;
3119#else
3220 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ) return PlatformID . Win32NT ;
3321 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) ) return PlatformID . Unix ;
3422 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) ) return PlatformID . MacOSX ;
35- return null ;
23+ throw new PlatformNotSupportedException ( ) ;
3624#endif
3725 } ;
3826
You can’t perform that action at this time.
0 commit comments