From nobody@FreeBSD.org  Sat Jul  7 18:40:14 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 481931065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Jul 2012 18:40:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 285888FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Jul 2012 18:40:14 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q67IeDwb000179
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 7 Jul 2012 18:40:13 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q67IeDwC000178;
	Sat, 7 Jul 2012 18:40:13 GMT
	(envelope-from nobody)
Message-Id: <201207071840.q67IeDwC000178@red.freebsd.org>
Date: Sat, 7 Jul 2012 18:40:13 GMT
From: Heath Nielson <heathn@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH]  multimedia/gstreamermm can't load plugins
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         169700
>Category:       ports
>Synopsis:       [PATCH]  multimedia/gstreamermm can't load plugins
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 07 18:50:08 UTC 2012
>Closed-Date:    Fri Jul 13 10:07:11 UTC 2012
>Last-Modified:  Fri Jul 13 10:10:02 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 7 18:50:21 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169700 
State-Changed-From-To: open->closed 
State-Changed-By: kwm 
State-Changed-When: Fri Jul 13 10:06:38 UTC 2012 
State-Changed-Why:  
Committed with small changes, Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169700 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/169700: commit references a PR
Date: Fri, 13 Jul 2012 10:06:36 +0000 (UTC)

 kwm         2012-07-13 10:06:26 UTC
 
   FreeBSD ports repository
 
   Modified files:
     multimedia/gstreamermm Makefile distinfo 
   Log:
   Update to 0.10.10.2.
   
   This should fix loading plugins again.
   
   PR:             ports/169700
   Submitted by:   Heath Nielson <heathn@gmail.com>
   
   Revision  Changes    Path
   1.27      +1 -2      ports/multimedia/gstreamermm/Makefile
   1.15      +2 -2      ports/multimedia/gstreamermm/distinfo
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
