rpms/gstreamer-plugins-good/devel 0001-flacdec-fix-intermittent-FLAC__STREAM_DECODER_ABORTE.patch, NONE, 1.1 gst-plugins-good-0.10.15-v4l2-no-framerate.patch, NONE, 1.1 gstreamer-plugins-good.spec, 1.99, 1.100
Hans de Goede
jwrdegoede at fedoraproject.org
Tue Aug 11 15:04:12 UTC 2009
Author: jwrdegoede
Update of /cvs/pkgs/rpms/gstreamer-plugins-good/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13420
Modified Files:
gstreamer-plugins-good.spec
Added Files:
0001-flacdec-fix-intermittent-FLAC__STREAM_DECODER_ABORTE.patch
gst-plugins-good-0.10.15-v4l2-no-framerate.patch
Log Message:
* Tue Aug 11 2009 Hans de Goede <hdegoede at redhat.com> 0.10.15-6
- Fix usage of webcamdrivers which do not implement VIDIOC_G_PARM (#467961)
- Include "Fix FLAC seeking" patch from F-11 package (#515886)
0001-flacdec-fix-intermittent-FLAC__STREAM_DECODER_ABORTE.patch:
gstflacdec.c | 36 +++++++++++++++++++++++++++++++-----
gstflacdec.h | 3 ++-
2 files changed, 33 insertions(+), 6 deletions(-)
--- NEW FILE 0001-flacdec-fix-intermittent-FLAC__STREAM_DECODER_ABORTE.patch ---
>From ee98c0f1d06e5f401218f88b96e39e33f0d2c7aa Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Tim-Philipp=20M=C3=BCller?= <tim.muller at collabora.co.uk>
Date: Tue, 21 Jul 2009 19:46:55 +0100
Subject: [PATCH] flacdec: fix intermittent FLAC__STREAM_DECODER_ABORTED errors when seeking
When seeking in a local flac file (ie. operating pull-based), the decoder
would often just error out after the loop function sees a DECODER_ABORTED
status. This, however, is the read callback's way of telling our loop
function that pull_range failed and streaming should stop, in this case
because of the flush-start event that the seek handler pushed upstream
from the seeking thread. Handle this slightly better by storing the last
flow return from pull_range, so the loop function can evaluate it properly
when it encounters a DECODER_ABORTED and take the right action.
Fixes #578612.
---
ext/flac/gstflacdec.c | 36 +++++++++++++++++++++++++++++++-----
ext/flac/gstflacdec.h | 2 ++
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c
index 3f9c75f..4d04702 100644
--- a/ext/flac/gstflacdec.c
+++ b/ext/flac/gstflacdec.c
@@ -773,15 +773,25 @@ static FLAC__StreamDecoderReadStatus
gst_flac_dec_read_seekable (const FLAC__StreamDecoder * decoder,
FLAC__byte buffer[], size_t * bytes, void *client_data)
{
+ GstFlowReturn flow;
GstFlacDec *flacdec;
-
GstBuffer *buf;
flacdec = GST_FLAC_DEC (client_data);
- if (gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes,
- &buf) != GST_FLOW_OK)
- return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+ flow = gst_pad_pull_range (flacdec->sinkpad, flacdec->offset, *bytes, &buf);
+
+ GST_PAD_STREAM_LOCK (flacdec->sinkpad);
+ flacdec->pull_flow = flow;
+ GST_PAD_STREAM_UNLOCK (flacdec->sinkpad);
+
+ if (G_UNLIKELY (flow != GST_FLOW_OK)) {
+ GST_INFO_OBJECT (flacdec, "pull_range flow: %s", gst_flow_get_name (flow));
+ if (flow == GST_FLOW_UNEXPECTED)
+ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ else
+ return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+ }
GST_DEBUG_OBJECT (flacdec, "Read %d bytes at %" G_GUINT64_FORMAT,
GST_BUFFER_SIZE (buf), flacdec->offset);
@@ -1152,9 +1162,23 @@ analyze_state:
goto eos_and_pause;
}
+ /* gst_flac_dec_read_seekable() returned ABORTED */
+ case FLAC__STREAM_DECODER_ABORTED:
+ {
+ GST_INFO_OBJECT (flacdec, "read aborted: last pull_range flow = %s",
+ gst_flow_get_name (flacdec->pull_flow));
+ if (!GST_FLOW_IS_FATAL (flacdec->pull_flow)) {
+ /* it seems we need to flush the decoder here to reset the decoder
+ * state after the abort for FLAC__stream_decoder_seek_absolute()
+ * to work properly */
+ GST_DEBUG_OBJECT (flacdec, "flushing decoder to reset decoder state");
+ FLAC__stream_decoder_flush (flacdec->seekable_decoder);
+ goto pause;
+ }
+ /* fall through */
+ }
case FLAC__STREAM_DECODER_OGG_ERROR:
case FLAC__STREAM_DECODER_SEEK_ERROR:
- case FLAC__STREAM_DECODER_ABORTED:
case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
case FLAC__STREAM_DECODER_UNINITIALIZED:
default:{
@@ -1782,8 +1806,10 @@ gst_flac_dec_handle_seek_event (GstFlacDec * flacdec, GstEvent * event)
* callbacks that need to behave differently when seeking */
flacdec->seeking = TRUE;
+ GST_LOG_OBJECT (flacdec, "calling seek_absolute");
seek_ok = FLAC__stream_decoder_seek_absolute (flacdec->seekable_decoder,
flacdec->segment.last_stop);
+ GST_LOG_OBJECT (flacdec, "done with seek_absolute, seek_ok=%d", seek_ok);
flacdec->seeking = FALSE;
diff --git a/ext/flac/gstflacdec.h b/ext/flac/gstflacdec.h
index a9daf3e..e6a76bb 100644
--- a/ext/flac/gstflacdec.h
+++ b/ext/flac/gstflacdec.h
@@ -74,6 +74,8 @@ struct _GstFlacDec {
GstEvent *start_segment;
GstTagList *tags;
+ GstFlowReturn pull_flow; /* last flow from pull_range */ /* STREAM_LOCK */
+
GstFlowReturn last_flow; /* the last flow return received from either
* gst_pad_push or gst_pad_buffer_alloc */
--
1.6.3.3
gst-plugins-good-0.10.15-v4l2-no-framerate.patch:
gstv4l2src.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
--- NEW FILE gst-plugins-good-0.10.15-v4l2-no-framerate.patch ---
diff -up gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c.foo gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c
--- gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c.foo 2009-05-12 02:00:07.000000000 +0200
+++ gst-plugins-good-0.10.15/sys/v4l2/gstv4l2src.c 2009-08-11 16:13:20.000000000 +0200
@@ -1371,20 +1371,21 @@ gst_v4l2src_create (GstPushSrc * src, Gs
GST_OBJECT_UNLOCK (v4l2src);
if (clock) {
- GstClockTime latency;
-
/* the time now is the time of the clock minus the base time */
timestamp = gst_clock_get_time (clock) - timestamp;
gst_object_unref (clock);
- latency =
- gst_util_uint64_scale_int (GST_SECOND, v4l2src->fps_d,
- v4l2src->fps_n);
+ /* if we have a framerate adjust timestamp for frame latency */
+ if (v4l2src->fps_n > 0 && v4l2src->fps_d > 0) {
+ GstClockTime latency =
+ gst_util_uint64_scale_int (GST_SECOND, v4l2src->fps_d,
+ v4l2src->fps_n);
- if (timestamp > latency)
- timestamp -= latency;
- else
- timestamp = 0;
+ if (timestamp > latency)
+ timestamp -= latency;
+ else
+ timestamp = 0;
+ }
}
/* FIXME: use the timestamp from the buffer itself! */
Index: gstreamer-plugins-good.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-good/devel/gstreamer-plugins-good.spec,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -p -r1.99 -r1.100
--- gstreamer-plugins-good.spec 25 Jul 2009 01:37:06 -0000 1.99
+++ gstreamer-plugins-good.spec 11 Aug 2009 15:04:12 -0000 1.100
@@ -6,13 +6,15 @@
Name: %{gstreamer}-plugins-good
Version: 0.10.15
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: GStreamer plug-ins with good code and licensing
Group: Applications/Multimedia
License: LGPLv2+
URL: http://gstreamer.freedesktop.org/
Source: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.bz2
+Patch1: gst-plugins-good-0.10.15-v4l2-no-framerate.patch
+Patch2: 0001-flacdec-fix-intermittent-FLAC__STREAM_DECODER_ABORTE.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{gstreamer} >= %{_gst}
@@ -106,6 +108,8 @@ This is a dummy package to make gstreame
# Farsight plugins
%patch0 -p1 -b .farsight
+%patch1 -p1 -b .v4l2
+%patch2 -p1 -b .flac
libtoolize -f
autoreconf
@@ -271,6 +275,10 @@ export GCONF_CONFIG_SOURCE=`gconftool-2
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gstreamer-%{majorminor}.schemas > /dev/null || :
%changelog
+* Tue Aug 11 2009 Hans de Goede <hdegoede at redhat.com> 0.10.15-6
+- Fix usage of webcamdrivers which do not implement VIDIOC_G_PARM (#467961)
+- Include "Fix FLAC seeking" patch from F-11 package (#515886)
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the fedora-extras-commits
mailing list