gstreamer integration in Windows app - DLL dependencies on different PCs
ding at panopto.com
Tue Mar 22 15:26:02 UTC 2022
I don't know what might be causing this, but you might save yourself some
time by skipping the build and using the MSVC installers to get the build
artifacts. (The MSVC is less buggy than the MinGW.)
What I do is I install the "runtime installer" and "development installer",
then I copy the components from C:\gstreamer (or wherever) into a portable
little "package" that my C++ code can reference.
After you run the installers, check your environment for variable names
that begin with GST, and your path for anything like "C:\gstreamer\...",
and purge all of that.
BTW, my C++ application does a bit of environmental housekeeping just
before I initialize gstreamer (with gst_init). I'm not sure if this stuff
is necessary but it works for us.
// This is where the plugins live.
boost::filesystem::path pluginFolder = assemblyFolder / "plugins";
// WARNING: setting an environment variable is only safe
at the beginning of the program (before any
// other threads have been spun up). We do this to
maintain strict control over the components that
// we are using.
const char* priorGstPluginPath = g_getenv("GST_PLUGIN_PATH");
std::string gstPluginPath = string::unwiden(pluginFolder.string());
if (priorGstPluginPath && (0 != priorGstPluginPath))
gstPluginPath = gstPluginPath + PATHS_SEP_STR +
#error "Unknown architecture (32-bit vs. 64-bit)"
g_setenv("GST_PLUGIN_PATH", gstPluginPath.c_str(), true);
// The nuget package provides some modules that are needed
to enable some fancy network encryption stuff, but
// I have only seen it available on Windows. Perhaps it
is not required on Linux. We only need it on Windows
// because it enables a feature that enables WebRTC in our
Windows client aplications.
boost::filesystem::path gioModuleFolder = assemblyFolder /
std::string gioModuleFolderString =
g_setenv("GIO_MODULE_DIR", gioModuleFolderString.c_str(), true);
On Tue, Mar 22, 2022 at 4:52 AM MK via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:
> I've written a DLL plugin for a 3rd party application which initially
> only used libjpeg for motion JPEG support. I used a VisualStudio (2017)
> template which the 3rd party supplier provides as starting point. That
> worked fine.
> To be able to support other stream formats, I switched to gstreamer
> instead of libjpeg. I can build the plugin and it works fine on the PC
> where it was compiled (let's call it PC1). When I copy all the files to
> another PC (PC2), the 3rd party application fails to load the DLL,
> because of some missing DLL dependencies. When I compile the project on
> PC2, it works well on PC2. But the version from PC2 fails on PC1.
> I checked the dependencies with 'Dependencies' and noticed that on PC1
> the missing DLLs differ from the missing DLLs on PC2. But even the
> required DLLs differ from PC1 to PC2.
> Does anyone have an idea what could cause this behavior?
> Best regards,
> PS: both versions do not run on PC3.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel