Then I wrote a c# wrapper for this player framework, and I use it in Unity passing as a parameter the Unity plane and texture I wanna use as a projection screen. It can deal with dx11, dx9 and openGL texture, since Unity can use one of these three libraries and each one has a different way of giving you access to texture data. What I did is: I created my video player framework in c++, it uses ffmpeg and is able to decode video/audio, manage timing, and blit frame data to texture memory. I think directly using a c# wrapper around ffmpeg's api it's not the best way, it is way too complicated and involves a LOT of marshalling, dealing with structs and so on. I have a working prototype of Unity/FFmpeg integration for a video player but unfortunately I cannot share details and/or source right now. I would love to view some opinions and suggestions. I am not sure if anyone else has tried something like this. This doesn't make sense because ffmpeg.exe loads properly and doesn't throw a tantrum. Is there a problem with dlls loading other dlls?Īre there dependencies that are not being loaded? Checked this out in dependencywalker it shows ieshims.dll as not loading. Here are some issues I am not sure about: The function exported from the dll is invoked without any hiccups. I wrote my own little dll for experimentation and compiled it with the cc -shared compiler directive. This leads me to believe that the problem is not with the dll opening but when the dll loads there might be something going wrong. However with avcodec I get DllNotFoundException. If I try to load a dll that doesn't exist in the plugins directory (example: mydll.dll), I get a DllNotFoundException mydll. In fact there are two different logs I see. However this is where I face the probelms. I then use the DllImport("avcodec") to import the functions. Here are the steps I am using for this.ġ) Downloaded the latest version of ffmpegĢ) configured using -enable-shared and -enable-staticģ) copied all the dlls from ffmpeg to Assets/Plugins I am trying to integrate ffmpeg into unity using the platform invoke on C#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |