Hello everyone,
I am beginning to play with gstreamermm (and gstreamer in general, for
that matter) eventhough I have been using gtk-- for a long time.
I'm using gstreamermm on FreeBSD 8.2-STABLE with the system compiler:
g++ (GCC) 4.2.2 20070831 prerelease [FreeBSD]
Compiling and installing gstreamermm from ports was flawless, and I can
compile, link and run simple examples against it. However, some plugins
that work OK for C programs fail to load when using the C++ wrappers.
For example, running
$> gstreamer-properties --gst-debug-level=5
yields
[...]
GST_PLUGIN_LOADING gstpluginfeature.c:107:gst_plugin_feature_load: loading
plugin for feature 0x8067007e0; 'fakesink'
GST_PLUGIN_LOADING gstpluginfeature.c:111:gst_plugin_feature_load: loading
plugin coreelements
GST_PLUGIN_LOADING gstplugin.c:1293:gst_plugin_load_by_name: looking up plugin
coreelements in default registry
GST_PLUGIN_LOADING gstplugin.c:1296:gst_plugin_load_by_name: loading plugin
coreelements from file /usr/local/lib/gstreamer-0.10/libgstcoreelements.so
GST_PLUGIN_LOADING gstplugin.c:737:gst_plugin_load_file: attempt to load plugin
"/usr/local/lib/gstreamer-0.10/libgstcoreelements.so"
GST_PLUGIN_LOADING gstplugin.c:834:gst_plugin_load_file: Plugin 0x806767150 for
file "/usr/local/lib/gstreamer-0.10/libgstcoreelements.so" prepared, calling
entry function...
GST_PLUGIN_LOADING gstplugin.c:841:gst_plugin_load_file: Plugin 0x806767150 for
file "/usr/local/lib/gstreamer-0.10/libgstcoreelements.so" prepared,
registering...
GST_PLUGIN_LOADING gstplugin.c:540:gst_plugin_register_func: plugin
"/usr/local/lib/gstreamer-0.10/libgstcoreelements.so" looks good
GST_ELEMENT_FACTORY gstelementfactory.c:232:gst_element_register:<registry0>
update existing feature 0x8067005a0 (capsfilter)
GST_ELEMENT_FACTORY gstelementfactory.c:232:gst_element_register:<registry0>
update existing feature 0x8067006c0 (fakesrc)
GST_ELEMENT_FACTORY gstelementfactory.c:232:gst_element_register:<registry0>
update existing feature 0x8067007e0 (fakesink)
[...]
This looks like once a plugin gets loaded, all its features get registered.
Now I compile the following program:
#include <gstreamermm.h>
int main(int argc, char **argv) {
// Initialize Gstreamermm:
Gst::init(argc, argv);
// Create elements:
Glib::RefPtr<Gst::Element> fakesrc =
Gst::ElementFactory::create_element("fakesrc");
if(fakesrc == Glib::RefPtr<Gst::Element>(NULL))
throw -1;
return 0;
}
And if I run it with --gst-debug-level=5 I get the following errors:
[...]
GST_PLUGIN_LOADING gstpluginfeature.c:111:gst_plugin_feature_load: loading
plugin coreelements
GST_PLUGIN_LOADING gstplugin.c:1293:gst_plugin_load_by_name: looking up plugin
coreelements in default registry
GST_PLUGIN_LOADING gstplugin.c:1296:gst_plugin_load_by_name: loading plugin
coreelements from file /usr/local/lib/gstreamer-0.10/libgstcoreelements.so
GST_PLUGIN_LOADING gstpluginfeature.c:116:gst_plugin_feature_load: loaded
plugin coreelements
GST_PLUGIN_LOADING gstpluginfeature.c:146:gst_plugin_feature_load: Tried to
load plugin containing feature 'fakesrc', but feature was not found.
(mygstreamer:31703): GStreamer-CRITICAL **:
gst_element_factory_get_element_type: assertion `GST_IS_ELEMENT_FACTORY
(factory)' failed
(mygstreamer:31703): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed
(mygstreamer:31703): GStreamer-CRITICAL **: gst_element_register: assertion
`g_type_is_a (type, GST_TYPE_ELEMENT)' failed
GST_PLUGIN_LOADING gstplugin.c:559:gst_plugin_register_func: plugin
"/usr/local/lib/gstreamer-0.10/libgstcoreelements.so" failed to initialise
GST_PLUGIN_LOADING gstplugin.c:846:gst_plugin_load_file:
gst_plugin_register_func failed for plugin
"/usr/local/lib/gstreamer-0.10/libgstcoreelements.so"
GST_PLUGIN_LOADING gstplugin.c:1301:gst_plugin_load_by_name: load_plugin error:
File "/usr/local/lib/gstreamer-0.10/libgstcoreelements.so" appears to be a
GStreamer plugin, but it failed to initialize
GST_PLUGIN_LOADING gstpluginfeature.c:133:gst_plugin_feature_load: Failed to
load plugin containing feature 'capsfilter'.
[...]
GST_PLUGIN_LOADING gstpluginfeature.c:146:gst_plugin_feature_load: Tried to
load plugin containing feature 'fakesrc', but feature was not found.
GST_ELEMENT_FACTORY
gstelementfactory.c:409:gst_element_factory_create:<elementfactory3> loading
plugin containing feature (null) returned NULL!
GST_ELEMENT_FACTORY
gstelementfactory.c:470:gst_element_factory_make:<elementfactory3> couldn't
create instance!
terminate called after throwing an instance of 'int'
Here it looks like it is trying to initialize a plugin that has been
already loaded, is that possible?
Any help with this will be appreciated.
Thank you very much,
Fernando
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list