rpms/gstreamer-plugins-good/F-11 pulsesink-0.10.14-update.patch, NONE, 1.1 gstreamer-plugins-good.spec, 1.91, 1.92
Bastien Nocera
hadess at fedoraproject.org
Thu May 14 09:57:50 UTC 2009
- Previous message: rpms/sqlite/devel sqlite-3.6.13-iotest-nodirsync.patch, NONE, 1.1 sqlite.spec, 1.59, 1.60
- Next message: rpms/fwknop/devel .cvsignore, 1.5, 1.6 fwknop.spec, 1.7, 1.8 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: hadess
Update of /cvs/pkgs/rpms/gstreamer-plugins-good/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21382
Modified Files:
gstreamer-plugins-good.spec
Added Files:
pulsesink-0.10.14-update.patch
Log Message:
* Thu May 14 2009 Bastien Nocera <bnocera at redhat.com> 0.10.14-3
- Update pulsesink to latest upstream version, fixes assertion when
Rhythmbox tries to change the sound from the wrong thread
pulsesink-0.10.14-update.patch:
--- NEW FILE pulsesink-0.10.14-update.patch ---
diff -upr gst-plugins-good-0.10.14.old/ext/pulse/pulsemixerctrl.c gst-plugins-good-0.10.14/ext/pulse/pulsemixerctrl.c
--- gst-plugins-good-0.10.14.old/ext/pulse/pulsemixerctrl.c 2009-02-15 13:40:25.000000000 +0000
+++ gst-plugins-good-0.10.14/ext/pulse/pulsemixerctrl.c 2009-03-25 12:29:09.000000000 +0000
@@ -93,10 +93,11 @@ gst_pulsemixer_ctrl_sink_info_cb (pa_con
c->type = GST_PULSEMIXER_SINK;
if (c->track) {
- int i = g_atomic_int_get ((gint *) & c->track->flags);
+ GstMixerTrackFlags flags = c->track->flags;
- i = (i & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
- g_atomic_int_set ((gint *) & c->track->flags, i);
+ flags =
+ (flags & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
+ c->track->flags = flags;
}
c->operation_success = 1;
@@ -142,10 +143,11 @@ gst_pulsemixer_ctrl_source_info_cb (pa_c
c->type = GST_PULSEMIXER_SOURCE;
if (c->track) {
- int i = g_atomic_int_get ((gint *) & c->track->flags);
+ GstMixerTrackFlags flags = c->track->flags;
- i = (i & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
- g_atomic_int_set ((gint *) & c->track->flags, i);
+ flags =
+ (flags & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
+ c->track->flags = flags;
}
c->operation_success = 1;
@@ -572,10 +574,11 @@ gst_pulsemixer_ctrl_set_mute (GstPulseMi
c->update_mute = TRUE;
if (c->track) {
- int i = g_atomic_int_get ((gint *) & c->track->flags);
+ GstMixerTrackFlags flags = c->track->flags;
- i = (i & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
- g_atomic_int_set ((gint *) & c->track->flags, i);
+ flags =
+ (flags & ~GST_MIXER_TRACK_MUTE) | (c->muted ? GST_MIXER_TRACK_MUTE : 0);
+ c->track->flags = flags;
}
restart_time_event (c);
diff -upr gst-plugins-good-0.10.14.old/ext/pulse/pulsesink.c gst-plugins-good-0.10.14/ext/pulse/pulsesink.c
--- gst-plugins-good-0.10.14.old/ext/pulse/pulsesink.c 2009-02-15 13:40:25.000000000 +0000
+++ gst-plugins-good-0.10.14/ext/pulse/pulsesink.c 2009-05-14 10:49:35.000000000 +0100
@@ -1,7 +1,7 @@
-/*
- * GStreamer pulseaudio plugin
+/* GStreamer pulseaudio plugin
*
* Copyright (c) 2004-2008 Lennart Poettering
+ * (c) 2009 Wim Taymans
*
* gst-pulse is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -66,1009 +66,1659 @@ enum
PROP_VOLUME
};
-static void gst_pulsesink_destroy_stream (GstPulseSink * pulsesink);
-
-static void gst_pulsesink_destroy_context (GstPulseSink * pulsesink);
-
-static void gst_pulsesink_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec);
-static void gst_pulsesink_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-static void gst_pulsesink_finalize (GObject * object);
-
-static gboolean gst_pulsesink_open (GstAudioSink * asink);
+#define GST_TYPE_PULSERING_BUFFER \
+ (gst_pulseringbuffer_get_type())
+#define GST_PULSERING_BUFFER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PULSERING_BUFFER,GstPulseRingBuffer))
+#define GST_PULSERING_BUFFER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PULSERING_BUFFER,GstPulseRingBufferClass))
+#define GST_PULSERING_BUFFER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PULSERING_BUFFER, GstPulseRingBufferClass))
+#define GST_PULSERING_BUFFER_CAST(obj) \
+ ((GstPulseRingBuffer *)obj)
+#define GST_IS_PULSERING_BUFFER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSERING_BUFFER))
+#define GST_IS_PULSERING_BUFFER_CLASS(klass)\
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSERING_BUFFER))
+
+typedef struct _GstPulseRingBuffer GstPulseRingBuffer;
+typedef struct _GstPulseRingBufferClass GstPulseRingBufferClass;
+
+/* We keep a custom ringbuffer that is backed up by data allocated by
+ * pulseaudio. We must also overide the commit function to write into
+ * pulseaudio memory instead. */
+struct _GstPulseRingBuffer
+{
+ GstRingBuffer object;
+
+ gchar *stream_name;
+
+ pa_context *context;
+ pa_stream *stream;
+
+ pa_sample_spec sample_spec;
+ gint64 offset;
+
+ gboolean corked;
+ gboolean in_commit;
+ gboolean paused;
+ guint required;
+};
-static gboolean gst_pulsesink_close (GstAudioSink * asink);
+struct _GstPulseRingBufferClass
+{
+ GstRingBufferClass parent_class;
+};
-static gboolean gst_pulsesink_prepare (GstAudioSink * asink,
+static void gst_pulseringbuffer_class_init (GstPulseRingBufferClass * klass);
+static void gst_pulseringbuffer_init (GstPulseRingBuffer * ringbuffer,
+ GstPulseRingBufferClass * klass);
+static void gst_pulseringbuffer_finalize (GObject * object);
+
+static GstRingBufferClass *ring_parent_class = NULL;
+
+static gboolean gst_pulseringbuffer_open_device (GstRingBuffer * buf);
+static gboolean gst_pulseringbuffer_close_device (GstRingBuffer * buf);
+static gboolean gst_pulseringbuffer_acquire (GstRingBuffer * buf,
GstRingBufferSpec * spec);
-static gboolean gst_pulsesink_unprepare (GstAudioSink * asink);
-
-static guint gst_pulsesink_write (GstAudioSink * asink, gpointer data,
- guint length);
-static guint gst_pulsesink_delay (GstAudioSink * asink);
-
-static void gst_pulsesink_reset (GstAudioSink * asink);
-
-static gboolean gst_pulsesink_event (GstBaseSink * sink, GstEvent * event);
-
-static GstStateChangeReturn gst_pulsesink_change_state (GstElement *
- element, GstStateChange transition);
+static gboolean gst_pulseringbuffer_release (GstRingBuffer * buf);
+static gboolean gst_pulseringbuffer_start (GstRingBuffer * buf);
+static gboolean gst_pulseringbuffer_pause (GstRingBuffer * buf);
+static gboolean gst_pulseringbuffer_stop (GstRingBuffer * buf);
+static guint gst_pulseringbuffer_commit (GstRingBuffer * buf,
+ guint64 * sample, guchar * data, gint in_samples, gint out_samples,
+ gint * accum);
-static void gst_pulsesink_init_interfaces (GType type);
-
-static gboolean gst_pulsesink_is_dead (GstPulseSink * pulsesink);
-
-#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
-# define ENDIANNESS "LITTLE_ENDIAN, BIG_ENDIAN"
-#else
-# define ENDIANNESS "BIG_ENDIAN, LITTLE_ENDIAN"
-#endif
-
-GST_IMPLEMENT_PULSEPROBE_METHODS (GstPulseSink, gst_pulsesink);
-GST_BOILERPLATE_FULL (GstPulseSink, gst_pulsesink, GstAudioSink,
- GST_TYPE_AUDIO_SINK, gst_pulsesink_init_interfaces);
-
-static gboolean
-gst_pulsesink_interface_supported (GstImplementsInterface *
- iface, GType interface_type)
+/* ringbuffer abstract base class */
+static GType
+gst_pulseringbuffer_get_type (void)
{
- GstPulseSink *this = GST_PULSESINK (iface);
-
- if (interface_type == GST_TYPE_PROPERTY_PROBE && this->probe)
- return TRUE;
+ static GType ringbuffer_type = 0;
- return FALSE;
-}
+ if (!ringbuffer_type) {
+ static const GTypeInfo ringbuffer_info = {
+ sizeof (GstPulseRingBufferClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) gst_pulseringbuffer_class_init,
+ NULL,
+ NULL,
+ sizeof (GstPulseRingBuffer),
+ 0,
+ (GInstanceInitFunc) gst_pulseringbuffer_init,
+ NULL
+ };
-static void
-gst_pulsesink_implements_interface_init (GstImplementsInterfaceClass * klass)
-{
[...2280 lines suppressed...]
+
+ if (!(o = pa_stream_proplist_update (pbuf->stream, PA_UPDATE_REPLACE,
+ pl, NULL, NULL)))
+ goto update_failed;
/* We're not interested if this operation failed or not */
-
unlock:
if (o)
pa_operation_unref (o);
- pa_threaded_mainloop_unlock (pulsesink->mainloop);
+ pa_threaded_mainloop_unlock (psink->mainloop);
finish:
if (pl)
pa_proplist_free (pl);
+
+ return;
+
+ /* ERRORS */
+no_buffer:
+ {
+ GST_DEBUG_OBJECT (psink, "we have no ringbuffer");
+ goto unlock;
+ }
+update_failed:
+ {
+ GST_ELEMENT_ERROR (psink, RESOURCE, FAILED,
+ ("pa_stream_proplist_update() failed: %s",
+ pa_strerror (pa_context_errno (pbuf->context))), (NULL));
+ goto unlock;
+ }
}
#endif
static gboolean
gst_pulsesink_event (GstBaseSink * sink, GstEvent * event)
{
- GstPulseSink *pulsesink = GST_PULSESINK (sink);
+ GstPulseSink *pulsesink = GST_PULSESINK_CAST (sink);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_TAG:{
@@ -1182,62 +1841,3 @@ gst_pulsesink_event (GstBaseSink * sink,
return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);
}
-
-static void
-gst_pulsesink_pause (GstPulseSink * pulsesink, gboolean b)
-{
- pa_operation *o = NULL;
-
- pa_threaded_mainloop_lock (pulsesink->mainloop);
-
- if (gst_pulsesink_is_dead (pulsesink))
- goto unlock;
-
- if (!(o = pa_stream_cork (pulsesink->stream, b, NULL, NULL))) {
-
- GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED,
- ("pa_stream_cork() failed: %s",
- pa_strerror (pa_context_errno (pulsesink->context))), (NULL));
- goto unlock;
- }
-
- while (pa_operation_get_state (o) == PA_OPERATION_RUNNING) {
-
- if (gst_pulsesink_is_dead (pulsesink))
- goto unlock;
-
- pa_threaded_mainloop_wait (pulsesink->mainloop);
- }
-
-unlock:
-
- if (o)
- pa_operation_unref (o);
-
- pa_threaded_mainloop_unlock (pulsesink->mainloop);
-}
-
-
-static GstStateChangeReturn
-gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
-{
- GstPulseSink *this = GST_PULSESINK (element);
-
- switch (transition) {
-
- case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
- case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
-
- gst_pulsesink_pause (this,
- GST_STATE_TRANSITION_NEXT (transition) == GST_STATE_PAUSED);
- break;
-
- default:
- ;
- }
-
- if (GST_ELEMENT_CLASS (parent_class)->change_state)
- return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
- return GST_STATE_CHANGE_SUCCESS;
-}
diff -upr gst-plugins-good-0.10.14.old/ext/pulse/pulsesink.h gst-plugins-good-0.10.14/ext/pulse/pulsesink.h
--- gst-plugins-good-0.10.14.old/ext/pulse/pulsesink.h 2009-02-15 13:40:25.000000000 +0000
+++ gst-plugins-good-0.10.14/ext/pulse/pulsesink.h 2009-05-14 10:49:35.000000000 +0100
@@ -42,38 +42,33 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PULSESINK))
#define GST_IS_PULSESINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PULSESINK))
+#define GST_PULSESINK_CAST(obj) \
+ ((GstPulseSink *)(obj))
typedef struct _GstPulseSink GstPulseSink;
typedef struct _GstPulseSinkClass GstPulseSinkClass;
struct _GstPulseSink
{
- GstAudioSink sink;
+ GstBaseAudioSink sink;
gchar *server, *device, *stream_name;
+ gchar *device_description;
pa_threaded_mainloop *mainloop;
- pa_context *context;
- pa_stream *stream;
-
- pa_sample_spec sample_spec;
-
GstPulseProbe *probe;
gdouble volume;
gboolean volume_set;
-
- gchar *device_description;
-
- gboolean operation_success;
- gboolean did_reset, in_write;
gint notify;
+
+ const gchar *pa_version;
};
struct _GstPulseSinkClass
{
- GstAudioSinkClass parent_class;
+ GstBaseAudioSinkClass parent_class;
};
GType gst_pulsesink_get_type (void);
diff -upr gst-plugins-good-0.10.14.old/ext/pulse/pulseutil.c gst-plugins-good-0.10.14/ext/pulse/pulseutil.c
--- gst-plugins-good-0.10.14.old/ext/pulse/pulseutil.c 2009-02-06 11:34:56.000000000 +0000
+++ gst-plugins-good-0.10.14/ext/pulse/pulseutil.c 2009-05-14 10:49:35.000000000 +0100
@@ -123,7 +123,6 @@ gst_pulse_gst_to_channel_map (pa_channel
const GstRingBufferSpec * spec)
{
int i;
-
GstAudioChannelPosition *pos;
pa_channel_map_init (map);
@@ -131,14 +130,10 @@ gst_pulse_gst_to_channel_map (pa_channel
if (!(pos =
gst_audio_get_channel_positions (gst_caps_get_structure (spec->caps,
0)))) {
-/* g_debug("%s: No channel positions!\n", G_STRFUNC); */
return NULL;
}
-/* g_debug("%s: Got channel positions:\n", G_STRFUNC); */
-
for (i = 0; i < spec->channels; i++) {
-
if (pos[i] == GST_AUDIO_CHANNEL_POSITION_NONE) {
/* no valid mappings for these channels */
g_free (pos);
@@ -147,15 +142,12 @@ gst_pulse_gst_to_channel_map (pa_channel
map->map[i] = gst_pos_to_pa[pos[i]];
else
map->map[i] = PA_CHANNEL_POSITION_INVALID;
-
- /*g_debug(" channel %d: gst: %d pulse: %d\n", i, pos[i], map->map[i]); */
}
g_free (pos);
map->channels = spec->channels;
if (!pa_channel_map_valid (map)) {
-/* g_debug("generated invalid map!\n"); */
return NULL;
}
Index: gstreamer-plugins-good.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-good/F-11/gstreamer-plugins-good.spec,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -p -r1.91 -r1.92
--- gstreamer-plugins-good.spec 25 Feb 2009 01:35:52 -0000 1.91
+++ gstreamer-plugins-good.spec 14 May 2009 09:57:20 -0000 1.92
@@ -6,7 +6,7 @@
Name: %{gstreamer}-plugins-good
Version: 0.10.14
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: GStreamer plug-ins with good code and licensing
Group: Applications/Multimedia
@@ -16,6 +16,8 @@ Source: http://gstreamer.freedes
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# http://bugzilla.gnome.org/show_bug.cgi?id=570995
Patch0: h264pay-compiler-warning.diff
+# Upstream changes
+Patch1: pulsesink-0.10.14-update.patch
Requires: %{gstreamer} >= %{_gst}
Requires(pre): GConf2
@@ -100,6 +102,7 @@ This is a dummy package to make gstreame
%prep
%setup -q -n gst-plugins-good-%{version}
%patch0 -p1 -b .h264-compile
+%patch1 -p1 -b .pulse-fixes
%build
@@ -253,6 +256,10 @@ export GCONF_CONFIG_SOURCE=`gconftool-2
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gstreamer-%{majorminor}.schemas > /dev/null || :
%changelog
+* Thu May 14 2009 Bastien Nocera <bnocera at redhat.com> 0.10.14-3
+- Update pulsesink to latest upstream version, fixes assertion when
+ Rhythmbox tries to change the sound from the wrong thread
+
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
- Previous message: rpms/sqlite/devel sqlite-3.6.13-iotest-nodirsync.patch, NONE, 1.1 sqlite.spec, 1.59, 1.60
- Next message: rpms/fwknop/devel .cvsignore, 1.5, 1.6 fwknop.spec, 1.7, 1.8 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list