Comments (14)
I wonder what PlatformID
you are getting to make it fail.
You can try to workaround by setting DynamicallyLoadedBindings.FunctionResolver = new LinuxFunctionResolver();
before calling DynamicallyLoadedBindings.Initialize()
.
Please, let me know upon result.
from ffmpeg.autogen.
GetPlatformId
is called here,
FFmpeg.AutoGen/FFmpeg.AutoGen/FFmpeg.cs
Line 17 in 15d15bd
from ffmpeg.autogen.
StackTrace
at FFmpeg.AutoGen.FunctionResolverFactory.GetPlatformId()
at FFmpeg.AutoGen.ffmpeg..cctor()
from ffmpeg.autogen.
Although my projects are all Net7, the autogen nuget package is net standard 2.0.
from ffmpeg.autogen.
Right, I see. I'll do hotfix.
from ffmpeg.autogen.
I wonder what
PlatformID
you are getting to make it fail. You can try to workaround by settingDynamicallyLoadedBindings.FunctionResolver = new LinuxFunctionResolver();
before callingDynamicallyLoadedBindings.Initialize()
. Please, let me know upon result.
I switched to using DynamicallyLoadedBindings, and the previous error no longer occurs.
Instead it fails on dlopen, as libdl doesn't exist on android,
from ffmpeg.autogen.
Well, I guess you are the first one how trying this on android.
You can create a copy of LinuxFunctionResolver
with this thing private const string Libdl = "libdl.so";
- i.e. without version suffix.
from ffmpeg.autogen.
I switched to using DynamicallyLoadedBindings, and the previous error no longer occurs. Instead it fails on dlopen, as libdl doesn't exist on android,
Question here from which set of bindings did you switched?
from ffmpeg.autogen.
I switched to using DynamicallyLoadedBindings, and the previous error no longer occurs. Instead it fails on dlopen, as libdl doesn't exist on android,
Question here from which set of bindings did you switched?
I was using the legacy Autogen. I'm modifying an existing library to work on android, and it was made a while ago.
from ffmpeg.autogen.
I switched to using DynamicallyLoadedBindings, and the previous error no longer occurs. Instead it fails on dlopen, as libdl doesn't exist on android,
Question here from which set of bindings did you switched?
I was using the legacy Autogen. I'm modifying an existing library to work on android, and it was made a while ago.
focus my friend and give us details, as I have no understanding how and what runs dotNET on android now.
we can do zoom session if you like too.
from ffmpeg.autogen.
Sorry for the misunderstanding. Let me start from the beginning.
The project I'm porting is https://github.com/unosquare/ffmediaelement . It's currently outdated and uses ffmpeg 4.4 and FFMpeg.Autogen 4 nuget package. As the package, and the other Autogen packages were created using netstandard 2.0, and not multitargeting netstandard and net 5+, the exception I reported occurs because of this
I switched to using https://www.nuget.org/packages/FFmpeg.AutoGen.Bindings.DynamicallyLoaded, updating ffmpeg to 6.0, and setting the resolver manually. This avoids the previous crash, but the Linux resolver doesn't work on android because libdl isn't provided with the android system. This is an issue from android and not dotnet, but the sdk provides ways to dynamically load libraries packaged in your app at runtime. So I made a custom resolver that uses dotnet's NativeLibrary and that works quite well.
internal class AndroidFunctionResolver : FunctionResolverBase
{
protected override nint GetFunctionPointer(nint nativeLibraryHandle, string functionName)
{
var func = NativeLibrary.GetExport(nativeLibraryHandle, functionName);
return func;
}
protected override string GetNativeLibraryName(string libraryName, int version) => $"lib{libraryName}.so";
protected override nint LoadNativeLibrary(string libraryName)
{
var lib = NativeLibrary.Load(libraryName);
return lib;
}
}
The original project was ported to a cross platform toolkit, so it doesn't rely on wpf. the port isn't public at this moment so I can't share much.
from ffmpeg.autogen.
Well great if you manage to solve the issue, I guess we can close this topic - however would be nice if you share what is behind NativeLibrary call, if some one will try android once again.
from ffmpeg.autogen.
Well great if you manage to solve the issue, I guess we can close this topic - however would be nice if you share what is behind NativeLibrary call, if some one will try android once again.
NativeLibrary is dotnets loader. https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary?source=recommendations&view=net-7.0
from ffmpeg.autogen.
I'll try to address this in upcoming update. Wrt to 7.0 we have another issue #254 - I'll look into it when earlier issues will be solved.
from ffmpeg.autogen.
Related Issues (20)
- channel_layout.h missing new (non-deprecated) HOT 1
- Restore LoadedLibraries Property? HOT 2
- [Feature Request] Expose (stream) segment muxer HOT 1
- Display transformation matrix functions unavailable HOT 5
- avdevice_register_all removed? HOT 4
- Invalid generated delegate AVClass_item_name (returns string instead of byte*) HOT 3
- is there any good players written in C# using FFmpeg.AutoGen? HOT 8
- FFmpeg.Autogen Error when i run on ubuntu HOT 3
- Use fixed-size buffers instead of custom classes HOT 2
- Recommendations for container deployment HOT 3
- Missing some interfaces? HOT 2
- Access to [AVOption.default_var.str] causes AccessViolationException HOT 11
- FFMpeg.Autogen.dll is failing Strong Name Validation HOT 2
- System.NotSupportedException:“Specified method is not supported.” HOT 2
- can't get filtering_video.c FFmpeg example migrated to FFmpeg.AutoGen HOT 3
- use Intel GPU Decode,Error initializing an MFX session: -3. HOT 2
- use Intel GPU Decode,Error initializing an MFX session: -3 HOT 2
- Add support for ffmpeg 6.1 bindings HOT 2
- Specied method not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg.autogen.