How to debug Gstreamer on Windows
David Ing
ding at panopto.com
Mon Mar 30 15:32:22 UTC 2020
It can't find the gstreamer plugins plugins.
On the build machine, you can probably run `gst-inspect-1.0 videotestsrc`
and it shows you where the plugins can be found.
I am willing to bet you did not package the plugin binaries with your
deployable. You need to package the binaries and then tell gstreamer where
to look for them.
I have a bit of initialization code that I run when my program starts.
if (!_initialized)
{
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 plugins that we
// are using.
const char* priorGstPluginPath = g_getenv("GST_PLUGIN_PATH");
std::string gstPluginPath = string::unwiden(pluginFolder.string());
if (priorGstPluginPath)
{
char c = priorGstPluginPath[0];
if (c != 0)
{
gstPluginPath = gstPluginPath + PATHS_SEP_STR +
priorGstPluginPath;
}
}
g_unsetenv("GST_PLUGIN_SYSTEM_PATH_1_0");
g_unsetenv("GST_PLUGIN_SYSTEM_PATH");
g_unsetenv("GST_PLUGIN_PATH_1_0");
g_unsetenv("GSTREAMER_ROOT_X86_64");
g_setenv("GST_PLUGIN_PATH", gstPluginPath.c_str(), true);
g_setenv("GSTREAMER_1_0_ROOT_X86_64",
string::unwiden(assemblyFolder.string()).c_str(), true);
// Initialize gstreamer
gst_init(pnargs, pargs);
// Guard against initializing more than once.
_initialized = true;
}
On Mon, Mar 30, 2020 at 8:19 AM erikherz <erik at vivoh.com> wrote:
> Looking at the debug output, I see:
>
> GST_ELEMENT_FACTORY gstelementfactory.c:444:gst_element_factory_make:
> gstelementfactory: make "videotestsrc" "(NULL)"
> GST_ELEMENT_FACTORY gstelementfactory.c:142:gst_element_factory_find: no
> such element factory "videotestsrc"
>
> GST_ELEMENT_FACTORY gstelementfactory.c:444:gst_element_factory_make:
> gstelementfactory: make "d3dvideosink" "(NULL)"
> GST_ELEMENT_FACTORY gstelementfactory.c:142:gst_element_factory_find: no
> such element factory "d3dvideosink"
>
> The app runs on the same machine and shows the video test pattern when I
> launch it from QT Creator but not when I deploy it as a stand-alone
> application (using windeployqt.exe and copying over all of the Gstreamer
> libraries).
>
> Here is the full output file (GST_DEBUG=*:7):
> https://customers.vivoh.com/all/mini_app_out_mar_30_2020.txt
>
> I posted the source code to a very small QT sample application that
> reproduces the problem here:
> https://forum.qt.io/topic/112384/building-with-gstreamer-on-windows/28
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200330/ecb0b4ac/attachment.htm>
More information about the gstreamer-devel
mailing list