You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the plugin to work with a standalone version of GStreamer, or, in other words, trying to distribute GStreamer with my application, as I won't be able to modify the PATH variable on the target system.
I've built the DLL myself using Visual Studio 2019 and GStreamer 1.18 (tried both the MSVC and MinGW64 versions), and I can get the first test scene with videotestsrc to work properly. I needed to configure GST_PLUGIN_PATH in order for GStreamer to use the path inside my application for this, which works great.
Strangely enough, most other elements I try to use - including udpsrc used by the second scene - will show an error no element "udpsrc". When I enable verbose debugging, I see tons of errors where GStreamer picks up the DLLs that carry these elements correctly from the folder I have configured, but it then refuses to load them, without more information:
0:00:00.333836500 24412 0000025FAF9DB000 DEBUG GST_REGISTRY gstregistry.c:1361:gst_registry_scan_path_level:<registry0> file C:\mrayGStreamerUnity\Unity\UnityTests\Assets\Plugins\x86_64\lib\gstreamer-1.0\libgstrtpmanagerbad.dll not yet in registry
0:00:00.333870500 24412 0000025FAF9DB000 DEBUG GST_PLUGIN_LOADING gstplugin.c:768:_priv_gst_plugin_load_file_for_registry: attempt to load plugin "C:\mrayGStreamerUnity\Unity\UnityTests\Assets\Plugins\x86_64\lib\gstreamer-1.0\libgstrtpmanagerbad.dll"
0:00:00.334772100 24412 0000025FAF9DB000 WARN GST_PLUGIN_LOADING gstplugin.c:806:_priv_gst_plugin_load_file_for_registry: module_open failed: 'C:\mrayGStreamerUnity\Unity\UnityTests\Assets\Plugins\x86_64\lib\gstreamer-1.0\libgstrtpmanagerbad.dll': The specified module could not be found.
(Unity.exe:24412): GStreamer-WARNING **: 17:32:40.342: Failed to load plugin 'C:\mrayGStreamerUnity\Unity\UnityTests\Assets\Plugins\x86_64\lib\gstreamer-1.0\libgstrtpmanagerbad.dll': 'C:\mrayGStreamerUnity\Unity\UnityTests\Assets\Plugins\x86_64\lib\gstreamer-1.0\libgstrtpmanagerbad.dll': The specified module could not be found.
The strange thing is that this only happens in Unity: all these elements work completely fine using gst-launch-1.0 shipped with the same binary. I also don't understand why it's just these that don't work.
I've tried using dependency walker to figure out if certain DLLs are missing on my system, but no missing DLLs appear.
I've also tried to set the GST_PLUGIN_PATH to the default GStreamer installation, to see if it needed some files that it was missing, but it results in the same errors.
The text was updated successfully, but these errors were encountered:
GStreamer relies on modules that are loaded at run time for the plugins. According to the log you posted some of these plugins were not found or their dependencies are messing. You will need to use a dependency walker to get the missing dlls and then place them next to the other dlls
Turns out that the bin DLLs were at the right place for GStreamerUnityPlugin.dll to find them, and the plugins were also scanned, but the other not-yet-loaded DLLs from the bin folder were not loaded as necessary when the plugins were loaded (because they couldn't be found). After fixing that, the udpsrc works.
I can now get this to work in both the Unity Editor and a standalone build. Thanks for the assistance!
In case anyone's wondering: you can set the PATH variable programmatically in Unity and point it to the GStreamer DLLs and then put the necessary GStreamer setup in StreamingAssets in order to get them copied to the output folder. This seems to work for stand-alone builds. In UWP the situation appears to be more complex (but that's being discussed in #15).
NoTuxNoBux
changed the title
Distributing GStreamer with an application that using this library (some elements not found)
Distributing GStreamer with an application using this library (some elements not found)
Mar 15, 2022
I'm trying to get the plugin to work with a standalone version of GStreamer, or, in other words, trying to distribute GStreamer with my application, as I won't be able to modify the PATH variable on the target system.
I've built the DLL myself using Visual Studio 2019 and GStreamer 1.18 (tried both the MSVC and MinGW64 versions), and I can get the first test scene with
videotestsrc
to work properly. I needed to configureGST_PLUGIN_PATH
in order for GStreamer to use the path inside my application for this, which works great.Strangely enough, most other elements I try to use - including
udpsrc
used by the second scene - will show an errorno element "udpsrc"
. When I enable verbose debugging, I see tons of errors where GStreamer picks up the DLLs that carry these elements correctly from the folder I have configured, but it then refuses to load them, without more information:The strange thing is that this only happens in Unity: all these elements work completely fine using
gst-launch-1.0
shipped with the same binary. I also don't understand why it's just these that don't work.I've tried using dependency walker to figure out if certain DLLs are missing on my system, but no missing DLLs appear.
I've also tried to set the
GST_PLUGIN_PATH
to the default GStreamer installation, to see if it needed some files that it was missing, but it results in the same errors.The text was updated successfully, but these errors were encountered: