|
From: | Nikos Chantziaras |
Subject: | Re: [Mingw-cross-env-list] Static GStreamer plugins aren't loaded |
Date: | Wed, 05 Jun 2013 19:23:21 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
On 02/06/13 13:44, Mark Brand wrote:
On Saturday 01 June 2013 19:23:27 Nikos Chantziaras wrote:I can't figure out how to link against a static GStreamer. If I just do: PKGCONFIG += gstreamer-0.10 in my qmake project file, no plugins are loaded and thus no media can be played at all. I've also tried to add all *.pc basenames (like gstreamer-base-0.10, gstreamer-audio-0.10, etc.), but still no joy. Any hints on how this is supposed to work?Hi Nikos, I don't know of any successful uses of gstreamer plugins in MXE. I assume extra tricks are needed for linking to static plugins, but I don't know the details. Maybe somebody else can help here.
OK, I finally had some success with this. GStreamer is perfectly capable of being statically linked with an application, including its plugins. However, for that to be useful, the application needs to explicitly link against every static plugin it needs. In my setup for example, to link-in the coreelements plugin, I have to add this to the linker flags:
-L/home/realnc/opt/mxe/usr/i686-pc-mingw32/lib/gstreamer-0.10 and then manually link against the plugin: -lcoreelementsAnd then also manually declare and register every needed plugin in the code of the application:
// Must be done at global file scope, since this results in a function // prototype being declared. GST_PLUGIN_STATIC_DECLARE(coreelements); // Call the init function of the plugin. GST_PLUGIN_STATIC_REGISTER(coreelements);There is no automation for this (pkg-config will not help with getting the plugin paths and libraries to link against). I don't know if MXE could possibly help with this. Like getting the plugin path would be helpful so people won't have to hard-code the path into their build system. Is there a variable exported that least gives build systems a chance to get to the "lib" directory?
[Prev in Thread] | Current Thread | [Next in Thread] |