Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2012 18:40:13 GMT
From:      Heath Nielson <heathn@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169700: [PATCH]  multimedia/gstreamermm can't load plugins
Message-ID:  <201207071840.q67IeDwC000178@red.freebsd.org>
Resent-Message-ID: <201207071850.q67Io8vY033597@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169700
>Category:       ports
>Synopsis:       [PATCH]  multimedia/gstreamermm can't load plugins
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 07 18:50:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Heath Nielson
>Release:        FreeBSD 9.0-STABLE
>Organization:
>Environment:
FreeBSD hershey.bar.net 9.0-STABLE FreeBSD 9.0-STABLE #17: Fri Jun 29 14:53:21 MDT 2012     root@hershey.bar.net:/usr/obj/usr/src/sys/HERSHEY  amd64

>Description:
gstreamermm-0.10.10.1 contains some function names which are identical to some of the function names found in the gstreamer-plugins package.  When a plugin is initialized by the gstreamer framework the plugin makes a call to what is supposed to be a local function call but instead calls a similarly named function in the gstreamer library which eventually causes the plugin to fail initialization.

>How-To-Repeat:
Install and run multimedia/subtitleeditor.  When a video file is opened, you should see the error, 

Media file could not be played.
Failed to create a GStreamer textoverlay (textoverlay). Please check your GStreamer installation.

A simpler way to repeat the problem is with the following test code:

#include <gstreamermm.h>

test.cpp:
int main(int argc, char* argv[]) {
  Gst::init(argc, argv);
  Glib::RefPtr<Gst::Element> textoverlay;
  textoverlay = Gst::ElementFactory::create_element("textoverlay", "overlay");
  printf("textoverlay: %s\n", textoverlay ? "true":"false");
  return 0;
}

$ clang++ test.cpp -o test -g `pkg-config --cflags --libs gstreamermm-0.10`
$ ./test --gst-debug-level=5

You should see, among several other warnings:
0:00:00.348919067 0x805c17080 LOG    GST_ELEMENT_FACTORY gstelementfactory.c:450:GstElement *gst_element_factory_make(const gchar *, const gchar *): gstelementfactory: make "textoverlay" "overlay"
0:00:00.348954686 0x805c17080 LOG    GST_ELEMENT_FACTORY gstelementfactory.c:456:GstElement *gst_element_factory_make(const gchar *, const gchar *):<textoverlay> found factory 0x805f0e6c0
0:00:00.348977454 0x805c17080 DEBUG  GST_PLUGIN_LOADING gstpluginfeature.c:106:GstPluginFeature *gst_plugin_feature_load(GstPluginFeature *): loading plugin for feature 0x805f0e6c0; 'textoverlay'
0:00:00.348989397 0x805c17080 DEBUG  GST_PLUGIN_LOADING gstpluginfeature.c:110:GstPluginFeature *gst_plugin_feature_load(GstPluginFeature *): loading plugin pango
0:00:00.348999943 0x805c17080 DEBUG  GST_PLUGIN_LOADING gstplugin.c:1293:GstPlugin *gst_plugin_load_by_name(const gchar *): looking up plugin pango in default registry
0:00:00.349046597 0x805c17080 DEBUG  GST_PLUGIN_LOADING gstplugin.c:1296:GstPlugin *gst_plugin_load_by_name(const gchar *): loading plugin pango from file /usr/local/lib/gstreamer-0.10/libgstpango.so
0:00:00.349084102 0x805c17080 DEBUG  GST_PLUGIN_LOADING gstpluginfeature.c:115:GstPluginFeature *gst_plugin_feature_load(GstPluginFeature *): loaded plugin pango
0:00:00.349119791 0x805c17080 INFO   GST_PLUGIN_LOADING gstpluginfeature.c:145:GstPluginFeature *gst_plugin_feature_load(GstPluginFeature *): Tried to load plugin containing feature 'textoverlay', but feature was not found.
0:00:00.349131105 0x805c17080 WARN   GST_ELEMENT_FACTORY gstelementfactory.c:410:GstElement *gst_element_factory_create(GstElementFactory *, const gchar *):<textoverlay> loading plugin containing feature overlay returned NULL!
0:00:00.349142629 0x805c17080 INFO   GST_ELEMENT_FACTORY gstelementfactory.c:472:GstElement *gst_element_factory_make(const gchar *, const gchar *):<textoverlay> couldn't create instance!
textoverlay: false

>Fix:
This problem appears to have already been identified here: 

web.archiveorange.com/archive/v/zb6jHVcFoud9WvczVnQZ

It looks like one of the committers changed the name of the functions in gstreamermm-0.10.10.2 to avoid the duplicate symbol problem.  Updating the port fixes both multimedia/subtitleeditor and the test program.

Patch attached with submission follows:

diff -ru /usr/ports/multimedia/gstreamermm/Makefile /home/heath/ports/gstreamermm/Makefile
--- /usr/ports/multimedia/gstreamermm/Makefile	2012-06-03 10:13:14.000000000 -0600
+++ /home/heath/ports/gstreamermm/Makefile	2012-07-06 23:26:14.000000000 -0600
@@ -6,8 +6,7 @@
 #    $MCom: ports/multimedia/gstreamermm/Makefile,v 1.6 2009/09/26 13:42:00 marcus Exp $
 
 PORTNAME=	gstreamermm
-PORTVERSION=	0.10.10.1
-PORTREVISION=	1
+PORTVERSION=	0.10.10.2
 CATEGORIES=	multimedia
 MASTER_SITES=	GNOME
 
diff -ru /usr/ports/multimedia/gstreamermm/distinfo /home/heath/ports/gstreamermm/distinfo
--- /usr/ports/multimedia/gstreamermm/distinfo	2012-04-16 19:24:25.000000000 -0600
+++ /home/heath/ports/gstreamermm/distinfo	2012-07-06 23:26:38.000000000 -0600
@@ -1,2 +1,2 @@
-SHA256 (gstreamermm-0.10.10.1.tar.xz) = 4ba05200b699973af75d5fb397f2e4270f924cdd8c394f7954f5c11ea5083c9c
-SIZE (gstreamermm-0.10.10.1.tar.xz) = 6269376
+SHA256 (gstreamermm-0.10.10.2.tar.xz) = 9094485085e08c85ef71832555a983e65f020d41b8b3a98d1288b64dace7c0f1
+SIZE (gstreamermm-0.10.10.2.tar.xz) = 5796428
diff -ru /usr/ports/multimedia/gstreamermm/pkg-plist /home/heath/ports/gstreamermm/pkg-plist
--- /usr/ports/multimedia/gstreamermm/pkg-plist	2011-08-17 18:45:34.000000000 -0600
+++ /home/heath/ports/gstreamermm/pkg-plist	2012-07-07 00:01:54.000000000 -0600
@@ -291,6 +291,10 @@
 lib/libgstreamermm_get_plugin_defs-%%GST_VERSION%%.so
 lib/libgstreamermm_get_plugin_defs-%%GST_VERSION%%.so.2
 libdata/pkgconfig/gstreamermm-%%GST_VERSION%%.pc
+share/licenses/gstreamermm-%%GST_VERSION%%.10.2/LGPL21
+share/licenses/gstreamermm-%%GST_VERSION%%.10.2/LICENSE
+share/licenses/gstreamermm-%%GST_VERSION%%.10.2/catalog.mk
+@dirrm share/licenses/gstreamermm-%%GST_VERSION%%.10.2
 @dirrm lib/gstreamermm-%%GST_VERSION%%/include
 @dirrm lib/gstreamermm-%%GST_VERSION%%/gen/m4
 @dirrm lib/gstreamermm-%%GST_VERSION%%/gen


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207071840.q67IeDwC000178>