[gstreamer-plugins-base: 68/216] fix my typo
by Dominik Mierzejewski
commit 6364e4301eee443e1afd0a8f9ea08c13df970421
Author: Jeremy Katz <katzj(a)fedoraproject.org>
Date: Wed Sep 24 17:29:39 2008 +0000
fix my typo
gstreamer-plugins-base.spec | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 227e6f8..2e6b91f 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.20
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -77,7 +77,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_bindir}/gst-visualise*
-rm -f $RPM_BUILD_ROOT%{_docdir}/man1/gst-visualise*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/gst-visualise*
%find_lang gst-plugins-base-%{majorminor}
@@ -240,7 +240,7 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
-* Wed Sep 24 2008 Jeremy Katz <katzj(a)redhat.com> - 0.10.20-5
+* Wed Sep 24 2008 Jeremy Katz <katzj(a)redhat.com> - 0.10.20-6
- gst-visualize is just a test program that we don't really need to include
and having it means that perl gets pulled into small images (#462620)
4 years, 4 months
[gstreamer-plugins-base: 67/216] - gst-visualize is just a test program that we don't really need to include and having it means
by Dominik Mierzejewski
commit c001173a94eab5161fde5b856836f211d37a34db
Author: Jeremy Katz <katzj(a)fedoraproject.org>
Date: Wed Sep 24 17:20:04 2008 +0000
- gst-visualize is just a test program that we don't really need to include
and having it means that perl gets pulled into small images (#462620)
gstreamer-plugins-base.spec | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 1819ec1..227e6f8 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.20
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -76,6 +76,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+rm -f $RPM_BUILD_ROOT%{_bindir}/gst-visualise*
+rm -f $RPM_BUILD_ROOT%{_docdir}/man1/gst-visualise*
%find_lang gst-plugins-base-%{majorminor}
@@ -86,10 +88,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-, root, root)
%doc AUTHORS COPYING README REQUIREMENTS
-# helper programs
-%{_bindir}/gst-visualise-%{majorminor}
-%{_mandir}/man1/gst-visualise-%{majorminor}*
-
# libraries
%{_libdir}/libgstinterfaces-%{majorminor}.so.*
%{_libdir}/libgstaudio-%{majorminor}.so.*
@@ -242,6 +240,10 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Wed Sep 24 2008 Jeremy Katz <katzj(a)redhat.com> - 0.10.20-5
+- gst-visualize is just a test program that we don't really need to include
+ and having it means that perl gets pulled into small images (#462620)
+
* Fri Sep 12 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-4
- Another rebuild
4 years, 4 months
[gstreamer-plugins-base: 66/216] - Another rebuild
by Dominik Mierzejewski
commit 22834ae030a254e0abf54fd2352727664a859c03
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Thu Sep 11 23:50:09 2008 +0000
- Another rebuild
gstreamer-plugins-base.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 53932a1..1819ec1 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.20
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -242,6 +242,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Fri Sep 12 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-4
+- Another rebuild
+
* Thu Sep 11 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-3
- Rebuild for new RPM provides
4 years, 4 months
[gstreamer-plugins-base: 65/216] - Rebuild for new RPM provides
by Dominik Mierzejewski
commit ddb7d2771cf7be296d599324c3b3e78224092206
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Thu Sep 11 18:03:03 2008 +0000
- Rebuild for new RPM provides
gstreamer-plugins-base.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index fe2b08f..53932a1 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.20
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -242,6 +242,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Thu Sep 11 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-3
+- Rebuild for new RPM provides
+
* Sat Aug 23 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-2
- Fix useless codeina popup when playing recent ogg files (#458404)
4 years, 4 months
[gstreamer-plugins-base: 64/216] - Fix useless codeina popup when playing recent ogg files (#458404)
by Dominik Mierzejewski
commit f7909a094e9390132f32bbc3ccb37a6d57059adb
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Fri Aug 22 23:48:30 2008 +0000
- Fix useless codeina popup when playing recent ogg files (#458404)
gstpb-0.10.20-ogg-skeleton.patch | 28 ++++++++++++++++++++++++++++
gstreamer-plugins-base.spec | 9 ++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
---
diff --git a/gstpb-0.10.20-ogg-skeleton.patch b/gstpb-0.10.20-ogg-skeleton.patch
new file mode 100644
index 0000000..184f845
--- /dev/null
+++ b/gstpb-0.10.20-ogg-skeleton.patch
@@ -0,0 +1,28 @@
+Index: ext/ogg/gstoggdemux.c
+===================================================================
+RCS file: /cvs/gstreamer/gst-plugins-base/ext/ogg/gstoggdemux.c,v
+retrieving revision 1.195
+diff -u -r1.195 gstoggdemux.c
+--- ext/ogg/gstoggdemux.c 7 Aug 2008 15:58:50 -0000 1.195
++++ ext/ogg/gstoggdemux.c 9 Aug 2008 11:55:54 -0000
+@@ -1746,6 +1746,9 @@
+ for (i = 0; i < chain->streams->len; i++) {
+ GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i);
+
++ if (pad->is_skeleton)
++ continue;
++
+ gst_pad_push_event (GST_PAD_CAST (pad), gst_event_new_eos ());
+
+ GST_DEBUG_OBJECT (ogg, "removing pad %" GST_PTR_FORMAT, pad);
+@@ -1786,6 +1789,10 @@
+ GstOggPad *pad;
+
+ pad = g_array_index (chain->streams, GstOggPad *, i);
++
++ if (pad->is_skeleton)
++ continue;
++
+ GST_DEBUG_OBJECT (ogg, "adding pad %" GST_PTR_FORMAT, pad);
+
+ /* mark discont */
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 5e2f7c1..fe2b08f 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.20
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -15,6 +15,9 @@ Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: gstpb-0.10.15-cd-speed.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=458404
+# http://bugzilla.gnome.org/show_bug.cgi?id=537599
+Patch1: gstpb-0.10.20-ogg-skeleton.patch
Requires: %{gstreamer} >= %{_gst}
Requires: liboil >= 0.3.12-9
@@ -51,6 +54,7 @@ This package contains a set of well-maintained base plug-ins.
%prep
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1 -b .cd-speed
+%patch1 -p0 -b .skeleton
%build
%configure \
@@ -238,6 +242,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Sat Aug 23 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-2
+- Fix useless codeina popup when playing recent ogg files (#458404)
+
* Wed Jun 18 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-1
- Update to 0.10.20
4 years, 4 months
[gstreamer-plugins-base: 63/216] Remove upstreamed patches
by Dominik Mierzejewski
commit e5e99f8275062fa0d2c078078a8547ceb7659df2
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Thu Jun 19 08:51:21 2008 +0000
Remove upstreamed patches
....19-alsasink-mixed-record-playback-tracks.patch | 60 --
gstreamer-plugins-base-0.10.19-gio-fixes.patch | 892 ---------------------
gstreamer-plugins-base.spec | 6 -
3 files changed, 958 deletions(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 5422603..5e2f7c1 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -15,10 +15,6 @@ Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: gstpb-0.10.15-cd-speed.patch
-# http://bugzilla.gnome.org/show_bug.cgi?id=518082
-Patch1: gstreamer-0.10.19-alsasink-mixed-record-playback-tracks.patch
-# http://bugzilla.gnome.org/show_bug.cgi?id=536849
-Patch2: gstreamer-plugins-base-0.10.19-gio-fixes.patch
Requires: %{gstreamer} >= %{_gst}
Requires: liboil >= 0.3.12-9
@@ -55,8 +51,6 @@ This package contains a set of well-maintained base plug-ins.
%prep
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1 -b .cd-speed
-%patch1 -p1 -b .alsasink
-%patch2 -p1 -b .gio
%build
%configure \
4 years, 4 months
[gstreamer-plugins-base: 62/216] - Update to 0.10.20
by Dominik Mierzejewski
commit d8751d5c1097cb1d984757cb028dede378c9c77b
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Wed Jun 18 16:59:55 2008 +0000
- Update to 0.10.20
.cvsignore | 2 +-
gstreamer-plugins-base.spec | 9 ++++++---
sources | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/.cvsignore b/.cvsignore
index f943586..7efe143 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-gst-plugins-base-0.10.19.tar.bz2
+gst-plugins-base-0.10.20.tar.bz2
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index b00878d..5422603 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -1,11 +1,11 @@
%define gstreamer gstreamer
%define majorminor 0.10
-%define _gst 0.10.19
+%define _gst 0.10.20
Name: %{gstreamer}-plugins-base
-Version: 0.10.19
-Release: 6%{?dist}
+Version: 0.10.20
+Release: 1%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -244,6 +244,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Wed Jun 18 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.20-1
+- Update to 0.10.20
+
* Wed Jun 11 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.19-6
- Add patch full of gio fixes
diff --git a/sources b/sources
index 29029ee..ff4bdab 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9c9614cbb6497b7fee1c954b9d5ae3b7 gst-plugins-base-0.10.19.tar.bz2
+180dd3452438b31fba732d2216e55eb6 gst-plugins-base-0.10.20.tar.bz2
4 years, 4 months
[gstreamer-plugins-base: 61/216] Update gio patch from current CVS HEAD
by Dominik Mierzejewski
commit a07580bc97321fb12db0c82eaa439f7be5320bdf
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Thu Jun 12 14:22:41 2008 +0000
Update gio patch from current CVS HEAD
gstreamer-plugins-base-0.10.19-gio-fixes.patch | 797 ++++++++++++++++++++++---
gstreamer-plugins-base.spec | 4 +-
2 files changed, 712 insertions(+), 89 deletions(-)
---
diff --git a/gstreamer-plugins-base-0.10.19-gio-fixes.patch b/gstreamer-plugins-base-0.10.19-gio-fixes.patch
index 62fa459..60cf973 100644
--- a/gstreamer-plugins-base-0.10.19-gio-fixes.patch
+++ b/gstreamer-plugins-base-0.10.19-gio-fixes.patch
@@ -1,15 +1,39 @@
-? .gstgiobasesrc.c.swp
-? .gstgiobasesrc.h.swp
-? .log.swp
-? log
-Index: gstgiobasesrc.c
-===================================================================
-RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.c,v
-retrieving revision 1.8
-diff -u -p -r1.8 gstgiobasesrc.c
---- gstgiobasesrc.c 22 Mar 2008 14:13:55 -0000 1.8
-+++ gstgiobasesrc.c 9 Jun 2008 16:03:43 -0000
-@@ -107,6 +107,11 @@ gst_gio_base_src_finalize (GObject * obj
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiobasesrc.c gst-plugins-base-0.10.19/ext/gio/gstgiobasesrc.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiobasesrc.c 2008-03-18 06:54:12.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiobasesrc.c 2008-06-12 15:19:17.000000000 +0100
+@@ -37,14 +37,21 @@
+ GST_TYPE_BASE_SRC);
+
+ static void gst_gio_base_src_finalize (GObject * object);
++
+ static gboolean gst_gio_base_src_start (GstBaseSrc * base_src);
++
+ static gboolean gst_gio_base_src_stop (GstBaseSrc * base_src);
++
+ static gboolean gst_gio_base_src_get_size (GstBaseSrc * base_src,
+ guint64 * size);
+ static gboolean gst_gio_base_src_is_seekable (GstBaseSrc * base_src);
++
+ static gboolean gst_gio_base_src_unlock (GstBaseSrc * base_src);
++
+ static gboolean gst_gio_base_src_unlock_stop (GstBaseSrc * base_src);
++
+ static gboolean gst_gio_base_src_check_get_range (GstBaseSrc * base_src);
++
+ static GstFlowReturn gst_gio_base_src_create (GstBaseSrc * base_src,
+ guint64 offset, guint size, GstBuffer ** buf);
+
+@@ -64,7 +71,9 @@
+ gst_gio_base_src_class_init (GstGioBaseSrcClass * klass)
+ {
+ GObjectClass *gobject_class;
++
+ GstElementClass *gstelement_class;
++
+ GstBaseSrcClass *gstbasesrc_class;
+
+ gobject_class = (GObjectClass *) klass;
+@@ -107,6 +116,11 @@
src->stream = NULL;
}
@@ -21,12 +45,60 @@ diff -u -p -r1.8 gstgiobasesrc.c
GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
-@@ -296,55 +301,110 @@ gst_gio_base_src_create (GstBaseSrc * ba
+@@ -132,7 +146,9 @@
+ gst_gio_base_src_stop (GstBaseSrc * base_src)
+ {
+ GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
++
+ gboolean success;
++
+ GError *err = NULL;
+
+ if (G_IS_INPUT_STREAM (src->stream)) {
+@@ -167,6 +183,7 @@
+
+ if (G_IS_FILE_INPUT_STREAM (src->stream)) {
+ GFileInfo *info;
++
+ GError *err = NULL;
+
+ info = g_file_input_stream_query_info (G_FILE_INPUT_STREAM (src->stream),
+@@ -189,11 +206,17 @@
+
+ g_clear_error (&err);
+ }
+- } else if (GST_GIO_STREAM_IS_SEEKABLE (src->stream)) {
++ }
++
++ if (GST_GIO_STREAM_IS_SEEKABLE (src->stream)) {
+ goffset old;
++
+ goffset stream_size;
++
+ gboolean ret;
++
+ GSeekable *seekable = G_SEEKABLE (src->stream);
++
+ GError *err = NULL;
+
+ old = g_seekable_tell (seekable);
+@@ -246,6 +269,7 @@
+ gst_gio_base_src_is_seekable (GstBaseSrc * base_src)
{
GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
++
+ gboolean seekable;
+
+ seekable = GST_GIO_STREAM_IS_SEEKABLE (src->stream);
+@@ -293,56 +317,114 @@
+ GstBuffer ** buf_return)
+ {
+ GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
++
GstBuffer *buf;
- gssize read;
- gboolean success, eos;
++
GstFlowReturn ret = GST_FLOW_OK;
- GError *err = NULL;
@@ -43,8 +115,6 @@ diff -u -p -r1.8 gstgiobasesrc.c
- else
- return ret;
- }
--
-- buf = gst_buffer_new_and_alloc (size);
+ /* If we have the requested part in our cache take a subbuffer of that,
+ * otherwise fill the cache again with at least 4096 bytes from the
+ * requested offset and return a subbuffer of that.
@@ -53,59 +123,69 @@ diff -u -p -r1.8 gstgiobasesrc.c
+ * over DBus if our backend is GVfs and this is painfully slow. */
+ if (src->cache && offset >= GST_BUFFER_OFFSET (src->cache) &&
+ offset + size <= GST_BUFFER_OFFSET_END (src->cache)) {
-+
+
+- buf = gst_buffer_new_and_alloc (size);
+ GST_DEBUG_OBJECT (src, "Creating subbuffer from cached buffer: offset %"
+ G_GUINT64_FORMAT " length %u", offset, size);
-+
+
+- GST_LOG_OBJECT (src, "reading %u bytes from offset %" G_GUINT64_FORMAT,
+- size, offset);
+ buf = gst_buffer_create_sub (src->cache,
-+ offset - GST_BUFFER_OFFSET (src->cache),
-+ size);
-+
-+ GST_BUFFER_OFFSET (buf) = offset;
++ offset - GST_BUFFER_OFFSET (src->cache), size);
+
+- read =
+- g_input_stream_read (G_INPUT_STREAM (src->stream), GST_BUFFER_DATA (buf),
+- size, src->cancel, &err);
+-
+- success = (read >= 0);
+- eos = (size > 0 && read == 0);
+-
+- if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
+- GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
+- ("Could not read from stream: %s", err->message));
+- g_clear_error (&err);
+- }
+-
+- if (success && !eos) {
+- src->position += read;
+ GST_BUFFER_OFFSET (buf) = offset;
+- GST_BUFFER_SIZE (buf) = read;
+- *buf_return = buf;
+ GST_BUFFER_OFFSET_END (buf) = offset + size;
+ GST_BUFFER_SIZE (buf) = size;
-+ } else {
+ } else {
+- /* !success || eos */
+- gst_buffer_unref (buf);
+ guint cachesize = MAX (4096, size);
++
+ gssize read, res;
++
+ gboolean success, eos;
++
+ GError *err = NULL;
-
-- GST_LOG_OBJECT (src, "reading %u bytes from offset %" G_GUINT64_FORMAT,
-- size, offset);
++
+ if (src->cache) {
+ gst_buffer_unref (src->cache);
+ src->cache = NULL;
+ }
-+
++
+ if (G_UNLIKELY (offset != src->position)) {
+ if (!GST_GIO_STREAM_IS_SEEKABLE (src->stream))
+ return GST_FLOW_NOT_SUPPORTED;
+
+ GST_DEBUG_OBJECT (src, "Seeking to position %" G_GUINT64_FORMAT, offset);
+ ret = gst_gio_seek (src, G_SEEKABLE (src->stream), offset, src->cancel);
-+
++
+ if (ret == GST_FLOW_OK)
+ src->position = offset;
+ else
+ return ret;
+ }
-
-- read =
-- g_input_stream_read (G_INPUT_STREAM (src->stream), GST_BUFFER_DATA (buf),
-- size, src->cancel, &err);
--
-- success = (read >= 0);
-- eos = (size > 0 && read == 0);
--
-- if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
-- GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
-- ("Could not read from stream: %s", err->message));
-- g_clear_error (&err);
-- }
++
+ src->cache = gst_buffer_new_and_alloc (cachesize);
-+
++
+ GST_LOG_OBJECT (src, "Reading %u bytes from offset %" G_GUINT64_FORMAT,
-+ cachesize, offset);
++ cachesize, offset);
+
+ /* GIO sometimes gives less bytes than requested although
+ * it's not at the end of file. SMB for example only
@@ -114,29 +194,21 @@ diff -u -p -r1.8 gstgiobasesrc.c
+ * nothing. */
+ read = 0;
+ while (size - read > 0 && (res =
-+ g_input_stream_read (G_INPUT_STREAM (src->stream),
-+ GST_BUFFER_DATA (src->cache) + read, cachesize - read,
-+ src->cancel, &err))) {
++ g_input_stream_read (G_INPUT_STREAM (src->stream),
++ GST_BUFFER_DATA (src->cache) + read, cachesize - read,
++ src->cancel, &err)) > 0) {
+ read += res;
+ }
-+
++
+ success = (read >= 0);
+ eos = (cachesize > 0 && read == 0);
-+
++
+ if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
+ GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
-+ ("Could not read from stream: %s", err->message));
++ ("Could not read from stream: %s", err->message));
+ g_clear_error (&err);
+ }
-
-- if (success && !eos) {
-- src->position += read;
-- GST_BUFFER_OFFSET (buf) = offset;
-- GST_BUFFER_SIZE (buf) = read;
-- *buf_return = buf;
-- } else {
-- /* !success || eos */
-- gst_buffer_unref (buf);
++
+ if (success && !eos) {
+ src->position += read;
+ GST_BUFFER_SIZE (src->cache) = read;
@@ -146,11 +218,10 @@ diff -u -p -r1.8 gstgiobasesrc.c
+
+ GST_DEBUG_OBJECT (src, "Read successful");
+ GST_DEBUG_OBJECT (src, "Creating subbuffer from new "
-+ "cached buffer: offset %" G_GUINT64_FORMAT " length %u", offset,
-+ size);
++ "cached buffer: offset %" G_GUINT64_FORMAT " length %u", offset,
++ size);
+
-+ buf = gst_buffer_create_sub (src->cache,
-+ 0, MIN (size, read));
++ buf = gst_buffer_create_sub (src->cache, 0, MIN (size, read));
+
+ GST_BUFFER_OFFSET (buf) = offset;
+ GST_BUFFER_OFFSET_END (buf) = offset + MIN (size, read);
@@ -161,7 +232,7 @@ diff -u -p -r1.8 gstgiobasesrc.c
+ src->cache = NULL;
+ buf = NULL;
+ }
-+
++
+ if (eos)
+ ret = GST_FLOW_UNEXPECTED;
}
@@ -172,14 +243,18 @@ diff -u -p -r1.8 gstgiobasesrc.c
return ret;
}
-Index: gstgiobasesrc.h
-===================================================================
-RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.h,v
-retrieving revision 1.2
-diff -u -p -r1.2 gstgiobasesrc.h
---- gstgiobasesrc.h 29 Dec 2007 17:29:16 -0000 1.2
-+++ gstgiobasesrc.h 9 Jun 2008 16:03:43 -0000
-@@ -49,6 +49,8 @@ struct _GstGioBaseSrc
+@@ -351,6 +433,7 @@
+ gst_gio_base_src_set_stream (GstGioBaseSrc * src, GInputStream * stream)
+ {
+ gboolean success;
++
+ GError *err = NULL;
+
+ g_return_if_fail (G_IS_INPUT_STREAM (stream));
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiobasesrc.h gst-plugins-base-0.10.19/ext/gio/gstgiobasesrc.h
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiobasesrc.h 2007-12-29 17:29:16.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiobasesrc.h 2008-06-12 15:18:52.000000000 +0100
+@@ -49,6 +49,8 @@
GCancellable *cancel;
guint64 position;
GInputStream *stream;
@@ -188,13 +263,308 @@ diff -u -p -r1.2 gstgiobasesrc.h
};
struct _GstGioBaseSrcClass
-Index: gstgiosrc.c
-===================================================================
-RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiosrc.c,v
-retrieving revision 1.10
-diff -u -p -r1.10 gstgiosrc.c
---- gstgiosrc.c 20 Apr 2008 10:11:54 -0000 1.10
-+++ gstgiosrc.c 9 Jun 2008 16:03:43 -0000
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgio.c gst-plugins-base-0.10.19/ext/gio/gstgio.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgio.c 2008-03-03 06:03:44.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgio.c 2008-04-20 11:11:54.000000000 +0100
+@@ -29,6 +29,8 @@
+ #include "gstgiostreamsink.h"
+ #include "gstgiostreamsrc.h"
+
++#include <string.h>
++
+ GST_DEBUG_CATEGORY_STATIC (gst_gio_debug);
+ #define GST_CAT_DEFAULT gst_gio_debug
+
+@@ -91,11 +93,49 @@
+ return ret;
+ }
+
++static gpointer
++_internal_get_supported_protocols (gpointer data)
++{
++ const gchar *const *schemes;
++ gchar **our_schemes;
++ guint num;
++ gint i, j;
++
++ schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
++ num = g_strv_length ((gchar **) schemes);
++
++ if (num == 0) {
++ GST_WARNING ("No GIO supported URI schemes found");
++ return NULL;
++ }
++
++ our_schemes = g_new0 (gchar *, num + 1);
++
++ /* - Filter http/https as we can't support the icy stuff with GIO.
++ * Use souphttpsrc if you need that.
++ * - Filter cdda as it doesn't support musicbrainz stuff and everything
++ * else one expects from a cdda source. Use cdparanoiasrc or cdiosrc
++ * for cdda.
++ */
++ for (i = 0, j = 0; i < num; i++) {
++ if (strcmp (schemes[i], "http") == 0 || strcmp (schemes[i], "https") == 0
++ || strcmp (schemes[i], "cdda") == 0)
++ continue;
++
++ our_schemes[j] = g_strdup (schemes[i]);
++ j++;
++ }
++
++ return our_schemes;
++}
++
+ static gchar **
+ gst_gio_get_supported_protocols (void)
+ {
+- return g_strdupv ((gchar **)
+- g_vfs_get_supported_uri_schemes (g_vfs_get_default ()));
++ static GOnce once = G_ONCE_INIT;
++
++ g_once (&once, _internal_get_supported_protocols, NULL);
++ return (gchar **) once.retval;
+ }
+
+ static GstURIType
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiosink.c gst-plugins-base-0.10.19/ext/gio/gstgiosink.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiosink.c 2008-02-17 05:15:45.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiosink.c 2008-04-20 11:11:54.000000000 +0100
+@@ -84,7 +84,8 @@
+ enum
+ {
+ ARG_0,
+- ARG_LOCATION
++ ARG_LOCATION,
++ ARG_FILE
+ };
+
+ GST_BOILERPLATE_FULL (GstGioSink, gst_gio_sink, GstGioBaseSink,
+@@ -100,18 +101,15 @@
+ static void
+ gst_gio_sink_base_init (gpointer gclass)
+ {
+- static GstElementDetails element_details = {
+- "GIO sink",
+- "Sink/File",
+- "Write to any GIO-supported location",
+- "Ren\xc3\xa9 Stadler <mail(a)renestadler.de>, "
+- "Sebastian Dröge <slomo(a)circular-chaos.org>"
+- };
+ GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
+
+ GST_DEBUG_CATEGORY_INIT (gst_gio_sink_debug, "gio_sink", 0, "GIO sink");
+
+- gst_element_class_set_details (element_class, &element_details);
++ gst_element_class_set_details_simple (element_class, "GIO sink",
++ "Sink/File",
++ "Write to any GIO-supported location",
++ "Ren\xc3\xa9 Stadler <mail(a)renestadler.de>, "
++ "Sebastian Dröge <slomo(a)circular-chaos.org>");
+ }
+
+ static void
+@@ -131,7 +129,18 @@
+
+ g_object_class_install_property (gobject_class, ARG_LOCATION,
+ g_param_spec_string ("location", "Location", "URI location to write to",
+- NULL, G_PARAM_READWRITE));
++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ /**
++ * GstGioSink:file
++ *
++ * %GFile to write to.
++ *
++ * Since: 0.10.20
++ **/
++ g_object_class_install_property (gobject_class, ARG_FILE,
++ g_param_spec_object ("file", "File", "GFile to write to",
++ G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_gio_sink_start);
+ }
+@@ -146,9 +155,9 @@
+ {
+ GstGioSink *sink = GST_GIO_SINK (object);
+
+- if (sink->location) {
+- g_free (sink->location);
+- sink->location = NULL;
++ if (sink->file) {
++ g_object_unref (sink->file);
++ sink->file = NULL;
+ }
+
+ GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+@@ -161,13 +170,49 @@
+ GstGioSink *sink = GST_GIO_SINK (object);
+
+ switch (prop_id) {
+- case ARG_LOCATION:
++ case ARG_LOCATION:{
++ const gchar *uri = NULL;
++
++ if (GST_STATE (sink) == GST_STATE_PLAYING ||
++ GST_STATE (sink) == GST_STATE_PAUSED) {
++ GST_WARNING
++ ("Setting a new location or GFile not supported in PLAYING or PAUSED state");
++ break;
++ }
++
++ GST_OBJECT_LOCK (GST_OBJECT (sink));
++ if (sink->file)
++ g_object_unref (sink->file);
++
++ uri = g_value_get_string (value);
++
++ if (uri) {
++ sink->file = g_file_new_for_uri (uri);
++
++ if (!sink->file) {
++ GST_ERROR ("Could not create GFile for URI '%s'", uri);
++ }
++ } else {
++ sink->file = NULL;
++ }
++ GST_OBJECT_UNLOCK (GST_OBJECT (sink));
++ break;
++ }
++ case ARG_FILE:
+ if (GST_STATE (sink) == GST_STATE_PLAYING ||
+- GST_STATE (sink) == GST_STATE_PAUSED)
++ GST_STATE (sink) == GST_STATE_PAUSED) {
++ GST_WARNING
++ ("Setting a new location or GFile not supported in PLAYING or PAUSED state");
+ break;
++ }
++
++ GST_OBJECT_LOCK (GST_OBJECT (sink));
++ if (sink->file)
++ g_object_unref (sink->file);
++
++ sink->file = g_value_dup_object (value);
+
+- g_free (sink->location);
+- sink->location = g_strdup (g_value_get_string (value));
++ GST_OBJECT_UNLOCK (GST_OBJECT (sink));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -182,8 +227,24 @@
+ GstGioSink *sink = GST_GIO_SINK (object);
+
+ switch (prop_id) {
+- case ARG_LOCATION:
+- g_value_set_string (value, sink->location);
++ case ARG_LOCATION:{
++ gchar *uri;
++
++ GST_OBJECT_LOCK (GST_OBJECT (sink));
++ if (sink->file) {
++ uri = g_file_get_uri (sink->file);
++ g_value_set_string (value, uri);
++ g_free (uri);
++ } else {
++ g_value_set_string (value, NULL);
++ }
++ GST_OBJECT_UNLOCK (GST_OBJECT (sink));
++ break;
++ }
++ case ARG_FILE:
++ GST_OBJECT_LOCK (GST_OBJECT (sink));
++ g_value_set_object (value, sink->file);
++ GST_OBJECT_UNLOCK (GST_OBJECT (sink));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -195,33 +256,28 @@
+ gst_gio_sink_start (GstBaseSink * base_sink)
+ {
+ GstGioSink *sink = GST_GIO_SINK (base_sink);
+- GFile *file;
+ GOutputStream *stream;
+ GCancellable *cancel = GST_GIO_BASE_SINK (sink)->cancel;
+ gboolean success;
+ GError *err = NULL;
++ gchar *uri;
+
+- if (sink->location == NULL) {
++ if (sink->file == NULL) {
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL),
+- ("No location given"));
++ ("No location or GFile given"));
+ return FALSE;
+ }
+
+- file = g_file_new_for_uri (sink->location);
+-
+- if (file == NULL) {
+- GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL),
+- ("Malformed URI or protocol not supported (%s)", sink->location));
+- return FALSE;
+- }
++ uri = g_file_get_uri (sink->file);
++ if (!uri)
++ uri = g_strdup ("(null)");
+
+ stream =
+- G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, cancel, &err));
++ G_OUTPUT_STREAM (g_file_create (sink->file, G_FILE_CREATE_NONE, cancel,
++ &err));
+
+ success = (stream != NULL);
+
+- g_object_unref (file);
+-
+ if (!success && !gst_gio_error (sink, "g_file_create", &err, NULL)) {
+
+ /*if (GST_GIO_ERROR_MATCHES (err, EXISTS)) */
+@@ -229,20 +285,21 @@
+
+ if (GST_GIO_ERROR_MATCHES (err, NOT_FOUND))
+ GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND, (NULL),
+- ("Could not open location %s for writing: %s",
+- sink->location, err->message));
++ ("Could not open location %s for writing: %s", uri, err->message));
+ else
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_READ, (NULL),
+- ("Could not open location %s for writing: %s",
+- sink->location, err->message));
++ ("Could not open location %s for writing: %s", uri, err->message));
+
++ g_free (uri);
+ g_clear_error (&err);
+ }
+
+ if (!success)
+ return FALSE;
+
+- GST_DEBUG_OBJECT (sink, "opened location %s", sink->location);
++ GST_DEBUG_OBJECT (sink, "opened location %s", uri);
++
++ g_free (uri);
+
+ gst_gio_base_sink_set_stream (GST_GIO_BASE_SINK (sink), stream);
+
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiosink.h gst-plugins-base-0.10.19/ext/gio/gstgiosink.h
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiosink.h 2008-02-15 11:58:06.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiosink.h 2008-04-20 11:11:54.000000000 +0100
+@@ -53,10 +53,7 @@
+ GstGioBaseSink sink;
+
+ /*< private >*/
+- gchar *location;
+-
+- GMainLoop *loop;
+- gboolean mount_successful;
++ GFile *file;
+ };
+
+ struct _GstGioSinkClass
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiosrc.c gst-plugins-base-0.10.19/ext/gio/gstgiosrc.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiosrc.c 2008-02-17 05:15:45.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiosrc.c 2008-06-12 15:19:17.000000000 +0100
@@ -72,6 +72,7 @@
#endif
@@ -203,18 +573,78 @@ diff -u -p -r1.10 gstgiosrc.c
GST_DEBUG_CATEGORY_STATIC (gst_gio_src_debug);
#define GST_CAT_DEFAULT gst_gio_src_debug
-@@ -91,7 +92,9 @@ static void gst_gio_src_set_property (GO
+@@ -79,41 +80,45 @@
+ enum
+ {
+ ARG_0,
+- ARG_LOCATION
++ ARG_LOCATION,
++ ARG_FILE
+ };
+
+ GST_BOILERPLATE_FULL (GstGioSrc, gst_gio_src, GstGioBaseSrc,
+ GST_TYPE_GIO_BASE_SRC, gst_gio_uri_handler_do_init);
+
+ static void gst_gio_src_finalize (GObject * object);
++
+ static void gst_gio_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_gio_src_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+
static gboolean gst_gio_src_start (GstBaseSrc * base_src);
-+static gboolean gst_gio_src_check_get_range (GstBaseSrc * base_src);
++static gboolean gst_gio_src_check_get_range (GstBaseSrc * base_src);
++
static void
gst_gio_src_base_init (gpointer gclass)
-@@ -138,6 +141,8 @@ gst_gio_src_class_init (GstGioSrcClass *
- G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ {
+- static GstElementDetails element_details = {
+- "GIO source",
+- "Source/File",
+- "Read from any GIO-supported location",
+- "Ren\xc3\xa9 Stadler <mail(a)renestadler.de>, "
+- "Sebastian Dröge <slomo(a)circular-chaos.org>"
+- };
+ GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
+
+ GST_DEBUG_CATEGORY_INIT (gst_gio_src_debug, "gio_src", 0, "GIO source");
+
+- gst_element_class_set_details (element_class, &element_details);
++ gst_element_class_set_details_simple (element_class, "GIO source",
++ "Source/File",
++ "Read from any GIO-supported location",
++ "Ren\xc3\xa9 Stadler <mail(a)renestadler.de>, "
++ "Sebastian Dröge <slomo(a)circular-chaos.org>");
+ }
+
+ static void
+ gst_gio_src_class_init (GstGioSrcClass * klass)
+ {
+ GObjectClass *gobject_class;
++
+ GstElementClass *gstelement_class;
++
+ GstBaseSrcClass *gstbasesrc_class;
+
+ gobject_class = (GObjectClass *) klass;
+@@ -126,9 +131,22 @@
+
+ g_object_class_install_property (gobject_class, ARG_LOCATION,
+ g_param_spec_string ("location", "Location", "URI location to read from",
+- NULL, G_PARAM_READWRITE));
++ NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ /**
++ * GstGioSrc:file
++ *
++ * %GFile to read from.
++ *
++ * Since: 0.10.20
++ **/
++ g_object_class_install_property (gobject_class, ARG_FILE,
++ g_param_spec_object ("file", "File", "GFile to read from",
++ G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_gio_src_start);
+ gstbasesrc_class->check_get_range =
@@ -222,13 +652,108 @@ diff -u -p -r1.10 gstgiosrc.c
}
static void
-@@ -248,6 +253,42 @@ gst_gio_src_get_property (GObject * obje
+@@ -141,9 +159,9 @@
+ {
+ GstGioSrc *src = GST_GIO_SRC (object);
+
+- if (src->location) {
+- g_free (src->location);
+- src->location = NULL;
++ if (src->file) {
++ g_object_unref (src->file);
++ src->file = NULL;
+ }
+
+ GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+@@ -156,13 +174,49 @@
+ GstGioSrc *src = GST_GIO_SRC (object);
+
+ switch (prop_id) {
+- case ARG_LOCATION:
++ case ARG_LOCATION:{
++ const gchar *uri = NULL;
++
++ if (GST_STATE (src) == GST_STATE_PLAYING ||
++ GST_STATE (src) == GST_STATE_PAUSED) {
++ GST_WARNING
++ ("Setting a new location or GFile not supported in PLAYING or PAUSED state");
++ break;
++ }
++
++ GST_OBJECT_LOCK (GST_OBJECT (src));
++ if (src->file)
++ g_object_unref (src->file);
++
++ uri = g_value_get_string (value);
++
++ if (uri) {
++ src->file = g_file_new_for_uri (uri);
++
++ if (!src->file) {
++ GST_ERROR ("Could not create GFile for URI '%s'", uri);
++ }
++ } else {
++ src->file = NULL;
++ }
++ GST_OBJECT_UNLOCK (GST_OBJECT (src));
++ break;
++ }
++ case ARG_FILE:
+ if (GST_STATE (src) == GST_STATE_PLAYING ||
+- GST_STATE (src) == GST_STATE_PAUSED)
++ GST_STATE (src) == GST_STATE_PAUSED) {
++ GST_WARNING
++ ("Setting a new location or GFile not supported in PLAYING or PAUSED state");
+ break;
++ }
++
++ GST_OBJECT_LOCK (GST_OBJECT (src));
++ if (src->file)
++ g_object_unref (src->file);
+
+- g_free (src->location);
+- src->location = g_strdup (g_value_get_string (value));
++ src->file = g_value_dup_object (value);
++
++ GST_OBJECT_UNLOCK (GST_OBJECT (src));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -177,8 +231,24 @@
+ GstGioSrc *src = GST_GIO_SRC (object);
+
+ switch (prop_id) {
+- case ARG_LOCATION:
+- g_value_set_string (value, src->location);
++ case ARG_LOCATION:{
++ gchar *uri;
++
++ GST_OBJECT_LOCK (GST_OBJECT (src));
++ if (src->file) {
++ uri = g_file_get_uri (src->file);
++ g_value_set_string (value, uri);
++ g_free (uri);
++ } else {
++ g_value_set_string (value, NULL);
++ }
++ GST_OBJECT_UNLOCK (GST_OBJECT (src));
++ break;
++ }
++ case ARG_FILE:
++ GST_OBJECT_LOCK (GST_OBJECT (src));
++ g_value_set_object (value, src->file);
++ GST_OBJECT_UNLOCK (GST_OBJECT (src));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -187,52 +257,87 @@
}
static gboolean
+gst_gio_src_check_get_range (GstBaseSrc * base_src)
+{
+ GstGioSrc *src = GST_GIO_SRC (base_src);
++
+ gchar *scheme;
+
+ if (src->file == NULL)
@@ -242,16 +767,15 @@ diff -u -p -r1.10 gstgiosrc.c
+ GST_LOG_OBJECT (src, "local URI, assuming random access is possible");
+ g_free (scheme);
+ return TRUE;
-+ } else if (strcmp (scheme, "http") == 0 ||
-+ strcmp (scheme, "https") == 0) {
++ } else if (strcmp (scheme, "http") == 0 || strcmp (scheme, "https") == 0) {
+ GST_LOG_OBJECT (src, "blacklisted protocol '%s', "
+ "no random access possible", scheme);
+ g_free (scheme);
+ return FALSE;
-+ }
++ }
+
+ g_free (scheme);
-+
++
+done:
+
+ GST_DEBUG_OBJECT (src, "undecided about random access, asking base class");
@@ -265,3 +789,104 @@ diff -u -p -r1.10 gstgiosrc.c
gst_gio_src_start (GstBaseSrc * base_src)
{
GstGioSrc *src = GST_GIO_SRC (base_src);
+- GFile *file;
++
+ GError *err = NULL;
++
+ GInputStream *stream;
+- GCancellable *cancel = GST_GIO_BASE_SRC (src)->cancel;
+
+- if (src->location == NULL) {
+- GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL), ("No location given"));
+- return FALSE;
+- }
++ GCancellable *cancel = GST_GIO_BASE_SRC (src)->cancel;
+
+- file = g_file_new_for_uri (src->location);
++ gchar *uri = NULL;
+
+- if (file == NULL) {
++ if (src->file == NULL) {
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
+- ("Malformed URI or protocol not supported (%s)", src->location));
++ ("No location or GFile given"));
+ return FALSE;
+ }
+
+- stream = G_INPUT_STREAM (g_file_read (file, cancel, &err));
++ uri = g_file_get_uri (src->file);
++ if (!uri)
++ uri = g_strdup ("(null)");
+
+- g_object_unref (file);
++ stream = G_INPUT_STREAM (g_file_read (src->file, cancel, &err));
+
+ if (stream == NULL && !gst_gio_error (src, "g_file_read", &err, NULL)) {
+-
+ if (GST_GIO_ERROR_MATCHES (err, NOT_FOUND)) {
+ GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL),
+- ("Could not open location %s for reading: %s",
+- src->location, err->message));
++ ("Could not open location %s for reading: %s", uri, err->message));
+ } else {
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
+- ("Could not open location %s for reading: %s",
+- src->location, err->message));
++ ("Could not open location %s for reading: %s", uri, err->message));
+ }
+
++ g_free (uri);
+ g_clear_error (&err);
+ return FALSE;
+ } else if (stream == NULL) {
++ g_free (uri);
+ return FALSE;
+ }
+
+ gst_gio_base_src_set_stream (GST_GIO_BASE_SRC (src), stream);
+
+- GST_DEBUG_OBJECT (src, "opened location %s", src->location);
++ GST_DEBUG_OBJECT (src, "opened location %s", uri);
++ g_free (uri);
+
+ return GST_BASE_SRC_CLASS (parent_class)->start (base_src);
+ }
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiosrc.h gst-plugins-base-0.10.19/ext/gio/gstgiosrc.h
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiosrc.h 2008-02-15 11:58:06.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiosrc.h 2008-04-20 11:11:54.000000000 +0100
+@@ -53,10 +53,7 @@
+ GstGioBaseSrc src;
+
+ /*< private >*/
+- gchar *location;
+-
+- GMainLoop *loop;
+- gboolean mount_successful;
++ GFile *file;
+ };
+
+ struct _GstGioSrcClass
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiostreamsink.c gst-plugins-base-0.10.19/ext/gio/gstgiostreamsink.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiostreamsink.c 2008-02-12 09:24:10.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiostreamsink.c 2008-03-22 15:00:42.000000000 +0000
+@@ -129,7 +129,7 @@
+
+ g_object_class_install_property (gobject_class, ARG_STREAM,
+ g_param_spec_object ("stream", "Stream", "Stream to write to",
+- G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE));
++ G_TYPE_OUTPUT_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ }
+
+ static void
+diff -ur gst-plugins-base-0.10.19.orig/ext/gio/gstgiostreamsrc.c gst-plugins-base-0.10.19/ext/gio/gstgiostreamsrc.c
+--- gst-plugins-base-0.10.19.orig/ext/gio/gstgiostreamsrc.c 2008-02-12 09:24:10.000000000 +0000
++++ gst-plugins-base-0.10.19/ext/gio/gstgiostreamsrc.c 2008-03-22 15:00:42.000000000 +0000
+@@ -123,7 +123,7 @@
+
+ g_object_class_install_property (gobject_class, ARG_STREAM,
+ g_param_spec_object ("stream", "Stream", "Stream to read from",
+- G_TYPE_INPUT_STREAM, G_PARAM_READWRITE));
++ G_TYPE_INPUT_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ }
+
+ static void
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 8245855..b00878d 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -56,9 +56,7 @@ This package contains a set of well-maintained base plug-ins.
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1 -b .cd-speed
%patch1 -p1 -b .alsasink
-pushd ext/gio/
-%patch2 -p0 -b .gio
-popd
+%patch2 -p1 -b .gio
%build
%configure \
4 years, 4 months
[gstreamer-plugins-base: 60/216] - Add patch full of gio fixes
by Dominik Mierzejewski
commit 276715dd16248178570b1d489cb0906da24fc80f
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Wed Jun 11 12:53:30 2008 +0000
- Add patch full of gio fixes
gstreamer-plugins-base-0.10.19-gio-fixes.patch | 267 +++++++++++++++++++++++++
gstreamer-plugins-base.spec | 10 +-
2 files changed, 276 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer-plugins-base-0.10.19-gio-fixes.patch b/gstreamer-plugins-base-0.10.19-gio-fixes.patch
new file mode 100644
index 0000000..62fa459
--- /dev/null
+++ b/gstreamer-plugins-base-0.10.19-gio-fixes.patch
@@ -0,0 +1,267 @@
+? .gstgiobasesrc.c.swp
+? .gstgiobasesrc.h.swp
+? .log.swp
+? log
+Index: gstgiobasesrc.c
+===================================================================
+RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.c,v
+retrieving revision 1.8
+diff -u -p -r1.8 gstgiobasesrc.c
+--- gstgiobasesrc.c 22 Mar 2008 14:13:55 -0000 1.8
++++ gstgiobasesrc.c 9 Jun 2008 16:03:43 -0000
+@@ -107,6 +107,11 @@ gst_gio_base_src_finalize (GObject * obj
+ src->stream = NULL;
+ }
+
++ if (src->cache) {
++ gst_buffer_unref (src->cache);
++ src->cache = NULL;
++ }
++
+ GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+ }
+
+@@ -296,55 +301,110 @@ gst_gio_base_src_create (GstBaseSrc * ba
+ {
+ GstGioBaseSrc *src = GST_GIO_BASE_SRC (base_src);
+ GstBuffer *buf;
+- gssize read;
+- gboolean success, eos;
+ GstFlowReturn ret = GST_FLOW_OK;
+- GError *err = NULL;
+
+ g_return_val_if_fail (G_IS_INPUT_STREAM (src->stream), GST_FLOW_ERROR);
+
+- if (G_UNLIKELY (offset != src->position)) {
+- if (!GST_GIO_STREAM_IS_SEEKABLE (src->stream))
+- return GST_FLOW_NOT_SUPPORTED;
+-
+- ret = gst_gio_seek (src, G_SEEKABLE (src->stream), offset, src->cancel);
+-
+- if (ret == GST_FLOW_OK)
+- src->position = offset;
+- else
+- return ret;
+- }
+-
+- buf = gst_buffer_new_and_alloc (size);
++ /* If we have the requested part in our cache take a subbuffer of that,
++ * otherwise fill the cache again with at least 4096 bytes from the
++ * requested offset and return a subbuffer of that.
++ *
++ * We need caching because every read/seek operation will need to go
++ * over DBus if our backend is GVfs and this is painfully slow. */
++ if (src->cache && offset >= GST_BUFFER_OFFSET (src->cache) &&
++ offset + size <= GST_BUFFER_OFFSET_END (src->cache)) {
++
++ GST_DEBUG_OBJECT (src, "Creating subbuffer from cached buffer: offset %"
++ G_GUINT64_FORMAT " length %u", offset, size);
++
++ buf = gst_buffer_create_sub (src->cache,
++ offset - GST_BUFFER_OFFSET (src->cache),
++ size);
++
++ GST_BUFFER_OFFSET (buf) = offset;
++ GST_BUFFER_OFFSET_END (buf) = offset + size;
++ GST_BUFFER_SIZE (buf) = size;
++ } else {
++ guint cachesize = MAX (4096, size);
++ gssize read, res;
++ gboolean success, eos;
++ GError *err = NULL;
+
+- GST_LOG_OBJECT (src, "reading %u bytes from offset %" G_GUINT64_FORMAT,
+- size, offset);
++ if (src->cache) {
++ gst_buffer_unref (src->cache);
++ src->cache = NULL;
++ }
++
++ if (G_UNLIKELY (offset != src->position)) {
++ if (!GST_GIO_STREAM_IS_SEEKABLE (src->stream))
++ return GST_FLOW_NOT_SUPPORTED;
++
++ GST_DEBUG_OBJECT (src, "Seeking to position %" G_GUINT64_FORMAT, offset);
++ ret = gst_gio_seek (src, G_SEEKABLE (src->stream), offset, src->cancel);
++
++ if (ret == GST_FLOW_OK)
++ src->position = offset;
++ else
++ return ret;
++ }
+
+- read =
+- g_input_stream_read (G_INPUT_STREAM (src->stream), GST_BUFFER_DATA (buf),
+- size, src->cancel, &err);
+-
+- success = (read >= 0);
+- eos = (size > 0 && read == 0);
+-
+- if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
+- GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
+- ("Could not read from stream: %s", err->message));
+- g_clear_error (&err);
+- }
++ src->cache = gst_buffer_new_and_alloc (cachesize);
++
++ GST_LOG_OBJECT (src, "Reading %u bytes from offset %" G_GUINT64_FORMAT,
++ cachesize, offset);
++
++ /* GIO sometimes gives less bytes than requested although
++ * it's not at the end of file. SMB for example only
++ * supports reads up to 64k. So we loop here until we get at
++ * at least the requested amount of bytes or a read returns
++ * nothing. */
++ read = 0;
++ while (size - read > 0 && (res =
++ g_input_stream_read (G_INPUT_STREAM (src->stream),
++ GST_BUFFER_DATA (src->cache) + read, cachesize - read,
++ src->cancel, &err))) {
++ read += res;
++ }
++
++ success = (read >= 0);
++ eos = (cachesize > 0 && read == 0);
++
++ if (!success && !gst_gio_error (src, "g_input_stream_read", &err, &ret)) {
++ GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
++ ("Could not read from stream: %s", err->message));
++ g_clear_error (&err);
++ }
+
+- if (success && !eos) {
+- src->position += read;
+- GST_BUFFER_OFFSET (buf) = offset;
+- GST_BUFFER_SIZE (buf) = read;
+- *buf_return = buf;
+- } else {
+- /* !success || eos */
+- gst_buffer_unref (buf);
++ if (success && !eos) {
++ src->position += read;
++ GST_BUFFER_SIZE (src->cache) = read;
++
++ GST_BUFFER_OFFSET (src->cache) = offset;
++ GST_BUFFER_OFFSET_END (src->cache) = offset + read;
++
++ GST_DEBUG_OBJECT (src, "Read successful");
++ GST_DEBUG_OBJECT (src, "Creating subbuffer from new "
++ "cached buffer: offset %" G_GUINT64_FORMAT " length %u", offset,
++ size);
++
++ buf = gst_buffer_create_sub (src->cache,
++ 0, MIN (size, read));
++
++ GST_BUFFER_OFFSET (buf) = offset;
++ GST_BUFFER_OFFSET_END (buf) = offset + MIN (size, read);
++ GST_BUFFER_SIZE (buf) = MIN (size, read);
++ } else {
++ GST_DEBUG_OBJECT (src, "Read not successful");
++ gst_buffer_unref (src->cache);
++ src->cache = NULL;
++ buf = NULL;
++ }
++
++ if (eos)
++ ret = GST_FLOW_UNEXPECTED;
+ }
+
+- if (eos)
+- ret = GST_FLOW_UNEXPECTED;
++ *buf_return = buf;
+
+ return ret;
+ }
+Index: gstgiobasesrc.h
+===================================================================
+RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiobasesrc.h,v
+retrieving revision 1.2
+diff -u -p -r1.2 gstgiobasesrc.h
+--- gstgiobasesrc.h 29 Dec 2007 17:29:16 -0000 1.2
++++ gstgiobasesrc.h 9 Jun 2008 16:03:43 -0000
+@@ -49,6 +49,8 @@ struct _GstGioBaseSrc
+ GCancellable *cancel;
+ guint64 position;
+ GInputStream *stream;
++
++ GstBuffer *cache;
+ };
+
+ struct _GstGioBaseSrcClass
+Index: gstgiosrc.c
+===================================================================
+RCS file: /cvs/gstreamer/gst-plugins-base/ext/gio/gstgiosrc.c,v
+retrieving revision 1.10
+diff -u -p -r1.10 gstgiosrc.c
+--- gstgiosrc.c 20 Apr 2008 10:11:54 -0000 1.10
++++ gstgiosrc.c 9 Jun 2008 16:03:43 -0000
+@@ -72,6 +72,7 @@
+ #endif
+
+ #include "gstgiosrc.h"
++#include <string.h>
+
+ GST_DEBUG_CATEGORY_STATIC (gst_gio_src_debug);
+ #define GST_CAT_DEFAULT gst_gio_src_debug
+@@ -91,7 +92,9 @@ static void gst_gio_src_set_property (GO
+ const GValue * value, GParamSpec * pspec);
+ static void gst_gio_src_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec);
++
+ static gboolean gst_gio_src_start (GstBaseSrc * base_src);
++static gboolean gst_gio_src_check_get_range (GstBaseSrc * base_src);
+
+ static void
+ gst_gio_src_base_init (gpointer gclass)
+@@ -138,6 +141,8 @@ gst_gio_src_class_init (GstGioSrcClass *
+ G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_gio_src_start);
++ gstbasesrc_class->check_get_range =
++ GST_DEBUG_FUNCPTR (gst_gio_src_check_get_range);
+ }
+
+ static void
+@@ -248,6 +253,42 @@ gst_gio_src_get_property (GObject * obje
+ }
+
+ static gboolean
++gst_gio_src_check_get_range (GstBaseSrc * base_src)
++{
++ GstGioSrc *src = GST_GIO_SRC (base_src);
++ gchar *scheme;
++
++ if (src->file == NULL)
++ goto done;
++
++ scheme = g_file_get_uri_scheme (src->file);
++ if (scheme == NULL)
++ goto done;
++
++ if (strcmp (scheme, "file") == 0) {
++ GST_LOG_OBJECT (src, "local URI, assuming random access is possible");
++ g_free (scheme);
++ return TRUE;
++ } else if (strcmp (scheme, "http") == 0 ||
++ strcmp (scheme, "https") == 0) {
++ GST_LOG_OBJECT (src, "blacklisted protocol '%s', "
++ "no random access possible", scheme);
++ g_free (scheme);
++ return FALSE;
++ }
++
++ g_free (scheme);
++
++done:
++
++ GST_DEBUG_OBJECT (src, "undecided about random access, asking base class");
++
++ return GST_CALL_PARENT_WITH_DEFAULT (GST_BASE_SRC_CLASS,
++ check_get_range, (base_src), FALSE);
++}
++
++
++static gboolean
+ gst_gio_src_start (GstBaseSrc * base_src)
+ {
+ GstGioSrc *src = GST_GIO_SRC (base_src);
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 7e07bfb..8245855 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.19
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -17,6 +17,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: gstpb-0.10.15-cd-speed.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=518082
Patch1: gstreamer-0.10.19-alsasink-mixed-record-playback-tracks.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=536849
+Patch2: gstreamer-plugins-base-0.10.19-gio-fixes.patch
Requires: %{gstreamer} >= %{_gst}
Requires: liboil >= 0.3.12-9
@@ -54,6 +56,9 @@ This package contains a set of well-maintained base plug-ins.
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1 -b .cd-speed
%patch1 -p1 -b .alsasink
+pushd ext/gio/
+%patch2 -p0 -b .gio
+popd
%build
%configure \
@@ -241,6 +246,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Wed Jun 11 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.19-6
+- Add patch full of gio fixes
+
* Mon Jun 02 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.19-5
- Let the package build its own documentation
4 years, 4 months
[gstreamer-plugins-base: 59/216] - Let the package build its own documentation
by Dominik Mierzejewski
commit 39f69ee24f3b4b1d65c48f0eb74b6ea6ff2ff126
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Mon Jun 2 17:08:38 2008 +0000
- Let the package build its own documentation
gstreamer-plugins-base.spec | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index a1734a6..7e07bfb 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.19
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -59,7 +59,7 @@ This package contains a set of well-maintained base plug-ins.
%configure \
--with-package-name='Fedora gstreamer-plugins-base package' \
--with-package-origin='http://download.fedora.redhat.com/fedora' \
- --disable-gtk-doc \
+ --enable-gtk-doc \
--enable-experimental \
--disable-static
@@ -76,12 +76,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
-# Install the docs by hand, see http://bugzilla.gnome.org/show_bug.cgi?id=349099
-mkdir -p $RPM_BUILD_ROOT/%{_datadir}/gtk-doc/html/gst-plugins-base-libs-0.10/
-cp -ar docs/libs/html/ $RPM_BUILD_ROOT/%{_datadir}/gtk-doc/html/gst-plugins-base-libs-0.10/
-mkdir -p $RPM_BUILD_ROOT/%{_datadir}/gtk-doc/html/gst-plugins-base-plugins-0.10/
-cp -ar docs/plugins/html/ $RPM_BUILD_ROOT/%{_datadir}/gtk-doc/html/gst-plugins-base-plugins-0.10/
-
%find_lang gst-plugins-base-%{majorminor}
%clean
@@ -247,6 +241,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Mon Jun 02 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.19-5
+- Let the package build its own documentation
+
* Sat May 24 2008 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.19-4
- Remove the gnome-vfs plugin, and see what breaks
4 years, 4 months