From e3dc7a1572e2f34c1a957be6edb494e7b61f6a74 Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Fri, 22 Mar 2013 11:41:46 -0400 Subject: [PATCH 1/4] Update to 1.0.6. - Drop alsa delay patch. Fixed upstream. --- .gitignore | 1 + alsa-delay-lock.patch | 91 ------------------------------------ gstreamer1-plugins-base.spec | 10 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 96 deletions(-) delete mode 100644 alsa-delay-lock.patch diff --git a/.gitignore b/.gitignore index c1314b2..deb7a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /gst-plugins-base-1.0.3.tar.xz /gst-plugins-base-1.0.4.tar.xz /gst-plugins-base-1.0.5.tar.xz +/gst-plugins-base-1.0.6.tar.xz diff --git a/alsa-delay-lock.patch b/alsa-delay-lock.patch deleted file mode 100644 index f378414..0000000 --- a/alsa-delay-lock.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 67a7b5a99317ca1f92fb6a88542647aa3ad92c4b Mon Sep 17 00:00:00 2001 -From: yanghuolin -Date: Thu, 15 Nov 2012 08:31:47 +0000 -Subject: alsasink: don't use 100% CPU - -The root cause is that alsa-lib is not thread safe for the same handle. -There are two threads in the gstreamer accessing alsa-lib not serilized. -The race condition happens when one thread holds the old framebuffer app_ptr -position in the kernel, another thread advances the framebuffer app_ptr. -when the former thread is scheduled to run again, it overwrites the app_ptr -to old value by copying from kernel.Thus,the app_ptr in the upper -alsa-lib(pcm_rate) become one period size more advanced than the lower -alsa-lib(pcm_hw & kernel). - -gstreamer uses noblock and poll method to communicate with the alsa-lib. -The app_ptr unsync situation as described above makes the poll return immediately because -it concludes there is enough space for the ring-buffer via the low-level alsa-lib. -The write function returns immediately because it concludes there is not enough -space for the ring-buffer from the upper-level alsa-lib. Then the loop of poll -and write runs again and again until another period size is available for -ring-buffer.This leads to the cpu 100 problem. - -delay_lock is used to avoid the race condition. - -Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=690937 ---- -diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c -index 1ef6b91..81731b6 100644 ---- a/ext/alsa/gstalsasink.c -+++ b/ext/alsa/gstalsasink.c -@@ -118,6 +118,7 @@ gst_alsasink_finalise (GObject * object) - - g_free (sink->device); - g_mutex_clear (&sink->alsa_lock); -+ g_mutex_clear (&sink->delay_lock); - - g_mutex_lock (&output_mutex); - --output_ref; -@@ -255,6 +256,7 @@ gst_alsasink_init (GstAlsaSink * alsasink) - alsasink->handle = NULL; - alsasink->cached_caps = NULL; - g_mutex_init (&alsasink->alsa_lock); -+ g_mutex_init (&alsasink->delay_lock); - - g_mutex_lock (&output_mutex); - if (output_ref == 0) { -@@ -1011,7 +1013,9 @@ gst_alsasink_write (GstAudioSink * asink, gpointer data, guint length) - if (err < 0) { - GST_DEBUG_OBJECT (asink, "wait error, %d", err); - } else { -+ GST_DELAY_SINK_LOCK (asink); - err = snd_pcm_writei (alsa->handle, ptr, cptr); -+ GST_DELAY_SINK_UNLOCK (asink); - } - - GST_DEBUG_OBJECT (asink, "written %d frames out of %d", err, cptr); -@@ -1057,7 +1061,9 @@ gst_alsasink_delay (GstAudioSink * asink) - - alsa = GST_ALSA_SINK (asink); - -+ GST_DELAY_SINK_LOCK (asink); - res = snd_pcm_delay (alsa->handle, &delay); -+ GST_DELAY_SINK_UNLOCK (asink); - if (G_UNLIKELY (res < 0)) { - /* on errors, report 0 delay */ - GST_DEBUG_OBJECT (alsa, "snd_pcm_delay returned %d", res); -diff --git a/ext/alsa/gstalsasink.h b/ext/alsa/gstalsasink.h -index 3a64a92..8c4c1b0 100644 ---- a/ext/alsa/gstalsasink.h -+++ b/ext/alsa/gstalsasink.h -@@ -43,6 +43,10 @@ typedef struct _GstAlsaSinkClass GstAlsaSinkClass; - #define GST_ALSA_SINK_LOCK(obj) (g_mutex_lock (GST_ALSA_SINK_GET_LOCK (obj))) - #define GST_ALSA_SINK_UNLOCK(obj) (g_mutex_unlock (GST_ALSA_SINK_GET_LOCK (obj))) - -+#define GST_DELAY_SINK_GET_LOCK(obj) (&GST_ALSA_SINK_CAST (obj)->delay_lock) -+#define GST_DELAY_SINK_LOCK(obj) (g_mutex_lock (GST_DELAY_SINK_GET_LOCK (obj))) -+#define GST_DELAY_SINK_UNLOCK(obj) (g_mutex_unlock (GST_DELAY_SINK_GET_LOCK (obj))) -+ - /** - * GstAlsaSink: - * -@@ -73,6 +77,7 @@ struct _GstAlsaSink { - GstCaps *cached_caps; - - GMutex alsa_lock; -+ GMutex delay_lock; - }; - - struct _GstAlsaSinkClass { --- -cgit v0.9.0.2-2-gbebe diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index e11a432..1f0efe6 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -1,15 +1,14 @@ %global majorminor 1.0 Name: gstreamer1-plugins-base -Version: 1.0.5 -Release: 3%{?dist} +Version: 1.0.6 +Release: 1%{?dist} Summary: GStreamer streaming media framework base plugins License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ Source0: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz Patch0: 0001-missing-plugins-Remove-the-mpegaudioversion-field.patch -Patch1: alsa-delay-lock.patch BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gobject-introspection-devel >= 1.31.1 @@ -90,7 +89,6 @@ for the GStreamer Base Plugins library. %prep %setup -q -n gst-plugins-base-%{version} %patch0 -p1 -%patch1 -p1 %build @@ -335,6 +333,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-discoverer-1.0 %changelog +* Fri Mar 22 2013 Brian Pepple - 1.0.6-1 +- Update to 1.0.6. +- Drop alsa delay patch. Fixed upstream. + * Thu Jan 24 2013 Daniel Drake - 1.0.5-3 - Add upstream fix for excessive alsasink CPU usage diff --git a/sources b/sources index 26583d6..8a6d316 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cd16dc3f1a44a0f70b2c7d9b2673140e gst-plugins-base-1.0.5.tar.xz +7123a7f9955bbf1a5a7bb75192c15427 gst-plugins-base-1.0.6.tar.xz From 3b9a0922ba58404bbcf960390f108d27c135af12 Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Fri, 22 Mar 2013 12:56:08 -0400 Subject: [PATCH 2/4] Drop BR on PyXML. --- gstreamer1-plugins-base.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index 1f0efe6..33feaf3 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -29,7 +29,6 @@ BuildRequires: chrpath # documentation BuildRequires: gtk-doc >= 1.3 -BuildRequires: PyXML Requires: iso-codes @@ -335,6 +334,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-discoverer-1.0 %changelog * Fri Mar 22 2013 Brian Pepple - 1.0.6-1 - Update to 1.0.6. +- Drop BR on PyXML. - Drop alsa delay patch. Fixed upstream. * Thu Jan 24 2013 Daniel Drake - 1.0.5-3 From 56e58e87d89f14ee62eed01dcbacc3e203579c7c Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Wed, 3 Apr 2013 10:10:49 -0400 Subject: [PATCH 3/4] Drop gst-visualise mention from description. (#947658) --- gstreamer1-plugins-base.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index 33feaf3..4843976 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -2,7 +2,7 @@ Name: gstreamer1-plugins-base Version: 1.0.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GStreamer streaming media framework base plugins License: LGPLv2+ @@ -61,7 +61,6 @@ This package contains the command-line tools for the base plugins. These include: * gst-discoverer -* gst-visualise %package devel @@ -332,6 +331,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-discoverer-1.0 %changelog +* Wed Apr 3 2013 Brian Pepple - 1.0.6-2 +- Drop gst-visualise mention from description. (#947658) + * Fri Mar 22 2013 Brian Pepple - 1.0.6-1 - Update to 1.0.6. - Drop BR on PyXML. From 264a725c414aab6e99c080496b7b31d336df5a0c Mon Sep 17 00:00:00 2001 From: Brian Pepple Date: Fri, 26 Apr 2013 10:11:58 -0400 Subject: [PATCH 4/4] Update to 1.0.7. --- .gitignore | 1 + gstreamer1-plugins-base.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index deb7a5b..c3f21b1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /gst-plugins-base-1.0.4.tar.xz /gst-plugins-base-1.0.5.tar.xz /gst-plugins-base-1.0.6.tar.xz +/gst-plugins-base-1.0.7.tar.xz diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index 4843976..bb4b201 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -1,8 +1,8 @@ %global majorminor 1.0 Name: gstreamer1-plugins-base -Version: 1.0.6 -Release: 2%{?dist} +Version: 1.0.7 +Release: 1%{?dist} Summary: GStreamer streaming media framework base plugins License: LGPLv2+ @@ -331,6 +331,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-discoverer-1.0 %changelog +* Fri Apr 26 2013 Brian Pepple - 1.0.7-1 +- Update to 1.0.7. + * Wed Apr 3 2013 Brian Pepple - 1.0.6-2 - Drop gst-visualise mention from description. (#947658) diff --git a/sources b/sources index 8a6d316..0607d8d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7123a7f9955bbf1a5a7bb75192c15427 gst-plugins-base-1.0.6.tar.xz +b5b43cfbf82b413ce2e07a190d87e68f gst-plugins-base-1.0.7.tar.xz