add multilib aware gst-plugins

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2776 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2010-12-12 15:10:45 +00:00
parent 0d5e4b415c
commit e28271bff4
431 changed files with 26589 additions and 0 deletions

View File

@@ -0,0 +1,233 @@
# ChangeLog for media-plugins/gst-plugins-pulse
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/ChangeLog,v 1.50 2010/10/24 14:05:41 ranger Exp $
24 Oct 2010; Brent Baude <ranger@gentoo.org>
gst-plugins-pulse-0.10.22-r1.ebuild:
Marking gst-plugins-pulse-0.10.22-r1 ppc for bug 333583
19 Oct 2010; Jeroen Roovers <jer@gentoo.org>
gst-plugins-pulse-0.10.22-r1.ebuild:
Stable for HPPA (bug #333583).
05 Sep 2010; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.22-r1.ebuild:
alpha/ia64/sparc stable wrt #333583
05 Sep 2010; Tobias Klausmann <klausman@gentoo.org>
gst-plugins-pulse-0.10.22.ebuild:
Stable on alpha, bug #329703
05 Sep 2010; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.22.ebuild:
sparc stable wrt #329703
04 Sep 2010; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.21.ebuild:
alpha/sparc stable wrt #324691
23 Aug 2010; Markos Chandras <hwoarang@gentoo.org>
gst-plugins-pulse-0.10.22-r1.ebuild:
Stable on amd64 wrt bug #333583
22 Aug 2010; Pawel Hajdan jr <phajdan.jr@gentoo.org>
gst-plugins-pulse-0.10.22-r1.ebuild:
x86 stable wrt bug #333583
*gst-plugins-pulse-0.10.22-r1 (12 Aug 2010)
12 Aug 2010; Arun Raghavan <ford_prefect@gentoo.org>
+files/0001-pulsesink-Create-and-free-the-PA-mainloop-in-NULL-RE.patch,
+files/0002-pulsesink-Allocate-and-free-the-custom-clock-in-NULL.patch,
+files/0003-pulsesrc-Allocate-free-PA-mainloop-during-state-chan.patch,
+files/0004-pulse-Don-t-lock-the-mainloop-in-NULL.patch,
+files/0005-pulsesink-Post-provide-clock-message-on-the-bus-if-t.patch,
+gst-plugins-pulse-0.10.22-r1.ebuild:
Bump .22 to -r1. Adds some critical patches from upstream addressing
crashes. (bug #330401)
10 Aug 2010; Jeroen Roovers <jer@gentoo.org>
gst-plugins-pulse-0.10.22.ebuild:
Stable for HPPA (bug #329703).
01 Aug 2010; Tobias Klausmann <klausman@gentoo.org>
gst-plugins-pulse-0.10.21.ebuild:
Stable on alpha, bug #324691
*gst-plugins-pulse-0.10.23 (31 Jul 2010)
31 Jul 2010; Mart Raudsepp <leio@gentoo.org>
+gst-plugins-pulse-0.10.23.ebuild:
Version bump. Bug and multi-threading fixes, hopefully fixing rare crashes
with pidgin per bug 329361
27 Jul 2010; Pacho Ramos <pacho@gentoo.org>
gst-plugins-pulse-0.10.22.ebuild:
amd64 stable, bug 329703
27 Jul 2010; Christian Faulhammer <fauli@gentoo.org>
gst-plugins-pulse-0.10.22.ebuild:
x86 stable, bug 329703
*gst-plugins-pulse-0.10.22 (03 Jul 2010)
03 Jul 2010; Mart Raudsepp <leio@gentoo.org>
+gst-plugins-pulse-0.10.22.ebuild:
Version bump. Partially fixes a racy shutdown in pulsesink.
01 Jul 2010; Christian Faulhammer <fauli@gentoo.org>
gst-plugins-pulse-0.10.21.ebuild:
x86 stable, bug 324691
24 Jun 2010; Markos Chandras <hwoarang@gentoo.org>
gst-plugins-pulse-0.10.21.ebuild:
Stable on amd64 wrt bug #324691
05 Apr 2010; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.17.ebuild:
alpha/sparc stable wrt #308379
*gst-plugins-pulse-0.10.21 (05 Apr 2010)
05 Apr 2010; Mart Raudsepp <leio@gentoo.org>
-gst-plugins-pulse-0.10.14.ebuild, +gst-plugins-pulse-0.10.21.ebuild:
Version bump. Avoid segfault when shutting down; return previous mute
state if sink is not active at the moment; other fixes
24 Mar 2010; Christian Faulhammer <fauli@gentoo.org>
gst-plugins-pulse-0.10.17.ebuild:
stable x86, bug 308379
19 Mar 2010; Pacho Ramos <pacho@gentoo.org>
gst-plugins-pulse-0.10.17.ebuild:
amd64 stable, bug 308379
07 Feb 2010; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild, gst-plugins-pulse-0.10.16.ebuild,
gst-plugins-pulse-0.10.17.ebuild:
Add ~arm/~ia64/~sh/~sparc
28 Jan 2010; Jeroen Roovers <jer@gentoo.org>
gst-plugins-pulse-0.10.17.ebuild:
Marked ~hppa (bug #302110).
29 Dec 2009; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.16.ebuild:
sparc stable wrt #290343
29 Nov 2009; Tobias Klausmann <klausman@gentoo.org>
gst-plugins-pulse-0.10.16.ebuild:
Stable on alpha, bug #290343
18 Nov 2009; Christian Faulhammer <fauli@gentoo.org>
gst-plugins-pulse-0.10.16.ebuild:
x86 stable, bug 290343
*gst-plugins-pulse-0.10.17 (17 Nov 2009)
17 Nov 2009; Mart Raudsepp <leio@gentoo.org>
-gst-plugins-pulse-0.10.15.ebuild, +gst-plugins-pulse-0.10.17.ebuild:
Version bump. Support for Pulseaudio PLAY/PAUSE requests, other fixes and
improvements
10 Nov 2009; Olivier Crête <tester@gentoo.org>
gst-plugins-pulse-0.10.16.ebuild:
Stable on amd64, bug #290343
12 Sep 2009; Olivier Crête <tester@gentoo.org>
gst-plugins-pulse-0.10.16.ebuild:
New pulse elements don't work with pulseaudio 0.9.9
*gst-plugins-pulse-0.10.16 (07 Sep 2009)
07 Sep 2009; Olivier Crête <tester@gentoo.org>
+gst-plugins-pulse-0.10.16.ebuild:
Version bump
*gst-plugins-pulse-0.10.15 (23 Aug 2009)
23 Aug 2009; Mart Raudsepp <leio@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild, +gst-plugins-pulse-0.10.15.ebuild:
Version bump - complete rewrite/overhaul of pulsesink
05 Aug 2009; Mart Raudsepp <leio@gentoo.org>
-gst-plugins-pulse-0.9.7.ebuild, -gst-plugins-pulse-0.10.11.ebuild:
Remove old
01 Jul 2009; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild:
sparc stable wrt #266986
21 May 2009; Brent Baude <ranger@gentoo.org> ChangeLog:
Marking gst-plugins-pulse-0.10.14 ~ppc64 for bug 266986
21 May 2009; Brent Baude <ranger@gentoo.org> ChangeLog:
Marking gst-plugins-pulse-0.10.14 ~ppc for bug 266986
14 May 2009; Markus Meier <maekke@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild:
amd64 stable, bug #266986
12 May 2009; Christian Faulhammer <fauli@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild:
stable x86, bug 266986
03 May 2009; Tobias Klausmann <klausman@gentoo.org>
gst-plugins-pulse-0.10.14.ebuild:
Stable on alpha, bug #266986
*gst-plugins-pulse-0.10.14 (30 Mar 2009)
30 Mar 2009; Olivier Crête <tester@gentoo.org>
+gst-plugins-pulse-0.10.14.ebuild:
Version bump
*gst-plugins-pulse-0.10.11 (06 Dec 2008)
06 Dec 2008; <ssuominen@gentoo.org> +gst-plugins-pulse-0.10.11.ebuild:
Version bump.
18 Nov 2008; Jim Ramsay <lack@gentoo.org> -gst-plugins-pulse-0.9.4.ebuild,
-gst-plugins-pulse-0.9.5.ebuild, gst-plugins-pulse-0.9.7.ebuild:
Version cleanup, and fix for bug #236586
08 Aug 2008; Markus Meier <maekke@gentoo.org> ChangeLog:
x86 stable, bug #232054
07 Aug 2008; Tobias Klausmann <klausman@gentoo.org>
gst-plugins-pulse-0.9.7.ebuild:
Stable on alpha, bug #232054
31 Jul 2008; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.9.7.ebuild:
sparc stable wrt #232054
20 Apr 2008; Markus Meier <maekke@gentoo.org>
gst-plugins-pulse-0.9.7.ebuild:
x86 stable, bug #217742
15 Apr 2008; Olivier Crête <tester@gentoo.org>
gst-plugins-pulse-0.9.7.ebuild:
Stable on amd64, bug #217742
25 Jan 2008; Raúl Porcel <armin76@gentoo.org>
gst-plugins-pulse-0.9.7.ebuild:
Add ~sparc wrt #207369
*gst-plugins-pulse-0.9.7 (23 Jan 2008)
23 Jan 2008; Jim Ramsay <lack@gentoo.org> +gst-plugins-pulse-0.9.7.ebuild:
Version bump (Bug #206767)
*gst-plugins-pulse-0.9.5 (02 Nov 2007)
02 Nov 2007; Samuli Suominen <drac@gentoo.org>
+gst-plugins-pulse-0.9.5.ebuild:
Version bump and keyword ~amd64.
*gst-plugins-pulse-0.9.4 (17 Dec 2006)
17 Dec 2006; Jim Ramsay <lack@gentoo.org> +metadata.xml,
+gst-plugins-pulse-0.9.4.ebuild:
New ebuild, adapted from request in bug 139977

View File

@@ -0,0 +1,18 @@
AUX 0001-pulsesink-Create-and-free-the-PA-mainloop-in-NULL-RE.patch 3984 RMD160 c89acecc30908a5c2c5239ef44b98a89939295e3 SHA1 6c925f6a424706c0b362510238580e7764fb1974 SHA256 36e9fa5fc6b6b8db84cffc7bb0ada749a83a09beacd1c6531037d44a7f873969
AUX 0002-pulsesink-Allocate-and-free-the-custom-clock-in-NULL.patch 2100 RMD160 5d1002dec98393a24b0cd0d4772fa7e03dfb30cd SHA1 b5af0f9b10faff4c4cea7d2091829081d473fea8 SHA256 7d40a231436a23acadb87dc148ca33ca1e4431f72b670c98905ecf7bcc210093
AUX 0003-pulsesrc-Allocate-free-PA-mainloop-during-state-chan.patch 2603 RMD160 0aee1be49c79eccca95b434b0d295772bee69729 SHA1 cd65c2b4a401851c532dab3676cddc6d35f36f3d SHA256 dff78d653bec853a28e7b71e3a2cd82a79db735e4a5e3fcd68c5073a121704df
AUX 0004-pulse-Don-t-lock-the-mainloop-in-NULL.patch 3875 RMD160 08828f14b2b2e521bf1f4571f128640e9e4c1ab8 SHA1 d20481af950bef8f2f35cf310b01b4600af51cfe SHA256 9faaf3942e1dd8f9ef7ad8a0bd89d359f0daedf2d3ed14d21b4ec4ded91cf4d4
AUX 0005-pulsesink-Post-provide-clock-message-on-the-bus-if-t.patch 1350 RMD160 13580f6bdbbbf8ab320dd057611903a5931c5ae4 SHA1 1f93b55c24b854cf906dc08c7bb85d2a917ffed0 SHA256 8594afa6f65c8b3f35197d7296bd82e1033729fc417d73bcda01e8fffeb0a82c
DIST gst-plugins-good-0.10.16.tar.bz2 2573811 RMD160 51f6dfc95932ae3a25d017257a3587e3081ad163 SHA1 655a22ea3f4f4dc0f9f200af7c85b4b725d960e7 SHA256 64bd5177913b8ccaa1502e88a255adb3e6024202ba8983e6a956061e57fe1640
DIST gst-plugins-good-0.10.17.tar.bz2 2671700 RMD160 770a5a091751ea362600c2824cc860dc3f8830b3 SHA1 fb0b9054ee7d1674a7c2bcc2fccf5331d8e9b80c SHA256 4f41fbd325270416c9f55d900e470482a7d1e7efbdbb725ed03a085dec307ad6
DIST gst-plugins-good-0.10.21.tar.bz2 2675836 RMD160 71cfebe965409ffc6d6d3a5b08e3923fc966fffa SHA1 ed619824f5ca4592bfe2b2f6df9d53f08bf5f360 SHA256 24445a1cf56302ab4ad5f56055d5c3d81c704b8f9f6875fe78a25d4f72716d22
DIST gst-plugins-good-0.10.22.tar.bz2 2701164 RMD160 08784f5c5548af6328d0c898bd06b16c2f82457d SHA1 381f3603a1704aa36297937808220fb8c6c102f4 SHA256 89ba50e0e3b7355bd75c9b0a60866a67b9bd1de38458e540a57853998103d69f
DIST gst-plugins-good-0.10.23.tar.bz2 2882183 RMD160 b19a61d796e0c384e074f61fc0515826fb6f6061 SHA1 d819a2690e5bfe83f1277c850b737a13f8f28c12 SHA256 2e7771a611cedb1e8208601cb26744fbf33109598e222afee1be8811ba4babcf
EBUILD gst-plugins-pulse-0.10.16.ebuild 559 RMD160 388499ba3e7a765727a97bb5057ffcfaea9458f9 SHA1 6a4493ad50cabbb2b5f9a5ed043ffce24306467d SHA256 ad32703432dcdacce8548bd7c88935b6ab91beebcaf596dbc2cdd619fdf62099
EBUILD gst-plugins-pulse-0.10.17.ebuild 646 RMD160 81c837c98d4eab9f593309a0d170407a90b3144e SHA1 016b6cf32dd027611df8ead8c7192e4c19efe0f3 SHA256 c9fd0558373f9d4dbd044f6be6dbe4b33e4386353456b52b8b8aeabc55de371e
EBUILD gst-plugins-pulse-0.10.21.ebuild 646 RMD160 8e0a9e6360221754aa2826ee3e21316289a713ae SHA1 aa78b8eea272dc3f918b0b3e3d18bd515b37d441 SHA256 5a1fc73872f6f3e85bfc2c7ca87383699edd8fe0916cb8ae48395c11e40a9e0a
EBUILD gst-plugins-pulse-0.10.22-r1.ebuild 1130 RMD160 96d50721414b84601a75bfac9967c66b65552397 SHA1 315e3f093daaa12968d5e5e8178e6e42225bd777 SHA256 6bdeb6946bc55c9b138f6b5cce076915c67ab75c3857f10cb7b61b82bc061c54
EBUILD gst-plugins-pulse-0.10.22.ebuild 558 RMD160 dae7b35f3ea4b742faabe4918c92d12cfe977801 SHA1 6968c8b7dec7fb0f70ad1823f34160446600e44e SHA256 408e0446f259dce6484bd2a19b19336556727c02215a1957ca3345bc22b310aa
EBUILD gst-plugins-pulse-0.10.23.ebuild 559 RMD160 ad7ffec59dd95d45348cb22a372d09b313ca2565 SHA1 d0f067894474844e8c88ae33fd3dfe859a5c661f SHA256 e7711e6214d25969244f8cf47ba9cddb592ea8d5ace9f83296487a81c8c7b37e
MISC ChangeLog 7550 RMD160 d8f765254fcea96c38f72e15e5f60e4d2c734b63 SHA1 e6ff010a8e215acea6d34ccbe31664d157b776ee SHA256 dd61d85f3f2e3458fa9a614c9c3e40f9f5e39c1a870bcabbc2e2b9cbb104d285
MISC metadata.xml 251 RMD160 6598714da689d5a37bece7320953a120c44b40b9 SHA1 c6c4586490fb21f776c266af7ef801aaefd33f6f SHA256 f6bf555ae0ffd7385a7913c37de1a42485005946cc572de8b8489333d9f24fab

View File

@@ -0,0 +1,115 @@
5332287 pulsesink: Create and free the PA mainloop in NULL->READY/READY->NULL
ext/pulse/pulsesink.c | 54 +++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 11 deletions(-)
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 0460748..4b45a2f 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -1405,6 +1405,9 @@ static void gst_pulsesink_finalize (GObject * object);
static gboolean gst_pulsesink_event (GstBaseSink * sink, GstEvent * event);
+static GstStateChangeReturn gst_pulsesink_change_state (GstElement * element,
+ GstStateChange transition);
+
static void gst_pulsesink_init_interfaces (GType type);
#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
@@ -1544,6 +1547,7 @@ gst_pulsesink_class_init (GstPulseSinkClass * klass)
GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (klass);
GstBaseSinkClass *bc;
GstBaseAudioSinkClass *gstaudiosink_class = GST_BASE_AUDIO_SINK_CLASS (klass);
+ GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_pulsesink_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_pulsesink_set_property);
@@ -1555,6 +1559,9 @@ gst_pulsesink_class_init (GstPulseSinkClass * klass)
bc = g_type_class_peek (GST_TYPE_BASE_SINK);
gstbasesink_class->activate_pull = GST_DEBUG_FUNCPTR (bc->activate_pull);
+ gstelement_class->change_state =
+ GST_DEBUG_FUNCPTR (gst_pulsesink_change_state);
+
gstaudiosink_class->create_ringbuffer =
GST_DEBUG_FUNCPTR (gst_pulsesink_create_ringbuffer);
@@ -1635,8 +1642,6 @@ server_dead:
static void
gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass)
{
- guint res;
-
pulsesink->server = NULL;
pulsesink->device = NULL;
pulsesink->device_description = NULL;
@@ -1655,11 +1660,6 @@ gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass)
GST_DEBUG_OBJECT (pulsesink, "using pulseaudio version %s",
pulsesink->pa_version);
- pulsesink->mainloop = pa_threaded_mainloop_new ();
- g_assert (pulsesink->mainloop != NULL);
- res = pa_threaded_mainloop_start (pulsesink->mainloop);
- g_assert (res == 0);
-
/* TRUE for sinks, FALSE for sources */
pulsesink->probe = gst_pulseprobe_new (G_OBJECT (pulsesink),
G_OBJECT_GET_CLASS (pulsesink), PROP_DEVICE, pulsesink->device,
@@ -1678,14 +1678,10 @@ gst_pulsesink_finalize (GObject * object)
{
GstPulseSink *pulsesink = GST_PULSESINK_CAST (object);
- pa_threaded_mainloop_stop (pulsesink->mainloop);
-
g_free (pulsesink->server);
g_free (pulsesink->device);
g_free (pulsesink->device_description);
- pa_threaded_mainloop_free (pulsesink->mainloop);
-
if (pulsesink->probe) {
gst_pulseprobe_free (pulsesink->probe);
pulsesink->probe = NULL;
@@ -2264,3 +2260,39 @@ gst_pulsesink_event (GstBaseSink * sink, GstEvent * event)
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
}
+
+static GstStateChangeReturn
+gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
+{
+ GstPulseSink *pulsesink = GST_PULSESINK (element);
+ GstStateChangeReturn ret;
+ guint res;
+
+ switch (transition) {
+ case GST_STATE_CHANGE_NULL_TO_READY:
+ g_assert (pulsesink->mainloop == NULL);
+ pulsesink->mainloop = pa_threaded_mainloop_new ();
+ g_assert (pulsesink->mainloop != NULL);
+ res = pa_threaded_mainloop_start (pulsesink->mainloop);
+ g_assert (res == 0);
+ break;
+ default:
+ break;
+ }
+
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+ switch (transition) {
+ case GST_STATE_CHANGE_READY_TO_NULL:
+ if (pulsesink->mainloop) {
+ pa_threaded_mainloop_stop (pulsesink->mainloop);
+ pa_threaded_mainloop_free (pulsesink->mainloop);
+ pulsesink->mainloop = NULL;
+ }
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
--
1.7.2

View File

@@ -0,0 +1,49 @@
e69ba0f pulsesink: Allocate and free the custom clock in NULL<->READY
ext/pulse/pulsesink.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 4b45a2f..e39b672 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -1664,13 +1664,6 @@ gst_pulsesink_init (GstPulseSink * pulsesink, GstPulseSinkClass * klass)
pulsesink->probe = gst_pulseprobe_new (G_OBJECT (pulsesink),
G_OBJECT_GET_CLASS (pulsesink), PROP_DEVICE, pulsesink->device,
TRUE, FALSE);
-
- /* override with a custom clock */
- if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
- gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
- GST_BASE_AUDIO_SINK (pulsesink)->provided_clock =
- gst_audio_clock_new ("GstPulseSinkClock",
- (GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
}
static void
@@ -2275,6 +2268,13 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
g_assert (pulsesink->mainloop != NULL);
res = pa_threaded_mainloop_start (pulsesink->mainloop);
g_assert (res == 0);
+
+ /* override with a custom clock */
+ if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
+ gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
+ GST_BASE_AUDIO_SINK (pulsesink)->provided_clock =
+ gst_audio_clock_new ("GstPulseSinkClock",
+ (GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
break;
default:
break;
@@ -2284,6 +2284,9 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
+ if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
+ gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
+ GST_BASE_AUDIO_SINK (pulsesink)->provided_clock = NULL;
if (pulsesink->mainloop) {
pa_threaded_mainloop_stop (pulsesink->mainloop);
pa_threaded_mainloop_free (pulsesink->mainloop);
--
1.7.2

View File

@@ -0,0 +1,83 @@
4a492f2 pulsesrc: Allocate/free PA mainloop during state changes
ext/pulse/pulsesrc.c | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c
index 9fe7f51..0ddaa43 100644
--- a/ext/pulse/pulsesrc.c
+++ b/ext/pulse/pulsesrc.c
@@ -250,8 +250,6 @@ gst_pulsesrc_class_init (GstPulseSrcClass * klass)
static void
gst_pulsesrc_init (GstPulseSrc * pulsesrc, GstPulseSrcClass * klass)
{
- int e;
-
pulsesrc->server = NULL;
pulsesrc->device = NULL;
pulsesrc->device_description = NULL;
@@ -274,12 +272,6 @@ gst_pulsesrc_init (GstPulseSrc * pulsesrc, GstPulseSrcClass * klass)
pulsesrc->paused = FALSE;
pulsesrc->in_read = FALSE;
- pulsesrc->mainloop = pa_threaded_mainloop_new ();
- g_assert (pulsesrc->mainloop);
-
- e = pa_threaded_mainloop_start (pulsesrc->mainloop);
- g_assert (e == 0);
-
pulsesrc->mixer = NULL;
pulsesrc->probe = gst_pulseprobe_new (G_OBJECT (pulsesrc), G_OBJECT_GET_CLASS (pulsesrc), PROP_DEVICE, pulsesrc->server, FALSE, TRUE); /* FALSE for sinks, TRUE for sources */
@@ -320,15 +312,9 @@ gst_pulsesrc_finalize (GObject * object)
{
GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (object);
- pa_threaded_mainloop_stop (pulsesrc->mainloop);
-
- gst_pulsesrc_destroy_context (pulsesrc);
-
g_free (pulsesrc->server);
g_free (pulsesrc->device);
- pa_threaded_mainloop_free (pulsesrc->mainloop);
-
if (pulsesrc->mixer) {
gst_pulsemixer_ctrl_free (pulsesrc->mixer);
pulsesrc->mixer = NULL;
@@ -1177,9 +1163,16 @@ gst_pulsesrc_change_state (GstElement * element, GstStateChange transition)
{
GstStateChangeReturn ret;
GstPulseSrc *this = GST_PULSESRC_CAST (element);
+ int e;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
+ this->mainloop = pa_threaded_mainloop_new ();
+ g_assert (this->mainloop);
+
+ e = pa_threaded_mainloop_start (this->mainloop);
+ g_assert (e == 0);
+
if (!this->mixer)
this->mixer =
gst_pulsemixer_ctrl_new (G_OBJECT (this), this->server,
@@ -1212,6 +1205,16 @@ gst_pulsesrc_change_state (GstElement * element, GstStateChange transition)
gst_pulsemixer_ctrl_free (this->mixer);
this->mixer = NULL;
}
+
+ if (this->mainloop)
+ pa_threaded_mainloop_stop (this->mainloop);
+
+ gst_pulsesrc_destroy_context (this);
+
+ if (this->mainloop) {
+ pa_threaded_mainloop_free (this->mainloop);
+ this->mainloop = NULL;
+ }
break;
default:
break;
--
1.7.2

View File

@@ -0,0 +1,168 @@
a8103fa pulse: Don't lock the mainloop in NULL
ext/pulse/pulsesink.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-
ext/pulse/pulsesrc.c | 9 ++++++++
2 files changed, 58 insertions(+), 1 deletions(-)
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index e39b672..8d5f0fe 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -1692,6 +1692,9 @@ gst_pulsesink_set_volume (GstPulseSink * psink, gdouble volume)
GstPulseRingBuffer *pbuf;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
GST_DEBUG_OBJECT (psink, "setting volume to %f", volume);
@@ -1720,6 +1723,14 @@ unlock:
return;
/* ERRORS */
+no_mainloop:
+ {
+ psink->volume = volume;
+ psink->volume_set = TRUE;
+
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return;
+ }
no_buffer:
{
psink->volume = volume;
@@ -1749,6 +1760,9 @@ gst_pulsesink_set_mute (GstPulseSink * psink, gboolean mute)
GstPulseRingBuffer *pbuf;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
GST_DEBUG_OBJECT (psink, "setting mute state to %d", mute);
@@ -1775,6 +1789,14 @@ unlock:
return;
/* ERRORS */
+no_mainloop:
+ {
+ psink->mute = mute;
+ psink->mute_set = TRUE;
+
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return;
+ }
no_buffer:
{
psink->mute = mute;
@@ -1833,6 +1855,9 @@ gst_pulsesink_get_volume (GstPulseSink * psink)
gdouble v = DEFAULT_VOLUME;
uint32_t idx;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
@@ -1852,9 +1877,9 @@ gst_pulsesink_get_volume (GstPulseSink * psink)
goto unlock;
}
+unlock:
v = psink->volume;
-unlock:
if (o)
pa_operation_unref (o);
@@ -1868,6 +1893,12 @@ unlock:
return v;
/* ERRORS */
+no_mainloop:
+ {
+ v = psink->volume;
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return v;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
@@ -1895,6 +1926,9 @@ gst_pulsesink_get_mute (GstPulseSink * psink)
uint32_t idx;
gboolean mute = FALSE;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
mute = psink->mute;
@@ -1924,6 +1958,12 @@ unlock:
return mute;
/* ERRORS */
+no_mainloop:
+ {
+ mute = psink->mute;
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return mute;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
@@ -1976,6 +2016,9 @@ gst_pulsesink_device_description (GstPulseSink * psink)
pa_operation *o = NULL;
gchar *t;
+ if (!psink->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (psink->mainloop);
pbuf = GST_PULSERING_BUFFER_CAST (GST_BASE_AUDIO_SINK (psink)->ringbuffer);
if (pbuf == NULL || pbuf->stream == NULL)
@@ -2002,6 +2045,11 @@ unlock:
return t;
/* ERRORS */
+no_mainloop:
+ {
+ GST_DEBUG_OBJECT (psink, "we have no mainloop");
+ return NULL;
+ }
no_buffer:
{
GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c
index b3126f4..2f1aacd 100644
--- a/ext/pulse/pulsesrc.c
+++ b/ext/pulse/pulsesrc.c
@@ -396,6 +396,9 @@ gst_pulsesrc_device_description (GstPulseSrc * pulsesrc)
pa_operation *o = NULL;
gchar *t;
+ if (!pulsesrc->mainloop)
+ goto no_mainloop;
+
pa_threaded_mainloop_lock (pulsesrc->mainloop);
if (!pulsesrc->stream)
@@ -429,6 +432,12 @@ unlock:
pa_threaded_mainloop_unlock (pulsesrc->mainloop);
return t;
+
+no_mainloop:
+ {
+ GST_DEBUG_OBJECT (pulsesrc, "have no mainloop");
+ return NULL;
+ }
}
static void
--
1.7.2

View File

@@ -0,0 +1,31 @@
f5057a9 pulsesink: Post provide-clock message on the bus if the clock appears/disappears
ext/pulse/pulsesink.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 8d5f0fe..08a1d7e 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -2323,6 +2323,9 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock =
gst_audio_clock_new ("GstPulseSinkClock",
(GstAudioClockGetTimeFunc) gst_pulsesink_get_time, pulsesink);
+ gst_element_post_message (element,
+ gst_message_new_clock_provide (GST_OBJECT_CAST (element),
+ GST_BASE_AUDIO_SINK (pulsesink)->provided_clock, TRUE));
break;
default:
break;
@@ -2332,6 +2335,9 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
+ gst_element_post_message (element,
+ gst_message_new_clock_provide (GST_OBJECT_CAST (element), NULL,
+ FALSE));
if (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock)
gst_object_unref (GST_BASE_AUDIO_SINK (pulsesink)->provided_clock);
GST_BASE_AUDIO_SINK (pulsesink)->provided_clock = NULL;
--
1.7.2

View File

@@ -0,0 +1,15 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.16.ebuild,v 1.7 2010/02/07 19:24:54 armin76 Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh sparc x86"
IUSE=""
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gstreamer-0.10.24
>=media-libs/gst-plugins-base-0.10.24"
DEPEND="${RDEPEND}
dev-util/pkgconfig"

View File

@@ -0,0 +1,16 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.17.ebuild,v 1.6 2010/04/05 18:32:58 armin76 Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh sparc x86"
IUSE=""
# >=0.9.15 ensures working per-stream volume
# The dep can be reduced if necessary for stabilization
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gstreamer-0.10.25
>=media-libs/gst-plugins-base-0.10.25"
DEPEND="${RDEPEND}"

View File

@@ -0,0 +1,16 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.21.ebuild,v 1.5 2010/09/04 12:05:28 armin76 Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh sparc x86"
IUSE=""
# >=0.9.15 ensures working per-stream volume
# The dep can be reduced if necessary for stabilization
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gstreamer-0.10.27
>=media-libs/gst-plugins-base-0.10.27"
DEPEND="${RDEPEND}"

View File

@@ -0,0 +1,27 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.22-r1.ebuild,v 1.6 2010/10/24 14:05:41 ranger Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ~ppc64 ~sh sparc x86"
IUSE=""
# >=0.9.15 ensures working per-stream volume
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gst-plugins-base-0.10.29"
DEPEND="${RDEPEND}"
src_unpack() {
gst-plugins-good_src_unpack
cd "${S}"
# These fix a couple of races condition that can lead to a crash. See
# bug #330401 for details.
epatch "${FILESDIR}/0001-pulsesink-Create-and-free-the-PA-mainloop-in-NULL-RE.patch"
epatch "${FILESDIR}/0002-pulsesink-Allocate-and-free-the-custom-clock-in-NULL.patch"
epatch "${FILESDIR}/0003-pulsesrc-Allocate-free-PA-mainloop-during-state-chan.patch"
epatch "${FILESDIR}/0004-pulse-Don-t-lock-the-mainloop-in-NULL.patch"
epatch "${FILESDIR}/0005-pulsesink-Post-provide-clock-message-on-the-bus-if-t.patch"
}

View File

@@ -0,0 +1,14 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.22.ebuild,v 1.6 2010/09/05 17:58:53 klausman Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sh sparc x86"
IUSE=""
# >=0.9.15 ensures working per-stream volume
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gst-plugins-base-0.10.29"
DEPEND="${RDEPEND}"

View File

@@ -0,0 +1,14 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-pulse/gst-plugins-pulse-0.10.23.ebuild,v 1.1 2010/07/31 11:09:00 leio Exp $
inherit gst-plugins-good
DESCRIPTION="GStreamer plugin for the PulseAudio sound server"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
IUSE=""
# >=0.9.15 ensures working per-stream volume
RDEPEND=">=media-sound/pulseaudio-0.9.15
>=media-libs/gst-plugins-base-0.10.29"
DEPEND="${RDEPEND}"

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>gstreamer</herd>
<maintainer>
<email>lack@gentoo.org</email>
<name>Jim Ramsay</name>
</maintainer>
</pkgmetadata>