[arch-commits] CVS update of extra/multimedia/gstreamer0.10 (3 files)
Jan de Groot
jgc at archlinux.org
Sun Mar 30 13:50:32 UTC 2008
Date: Sunday, March 30, 2008 @ 09:50:32
Author: jgc
Path: /home/cvs-extra/extra/multimedia/gstreamer0.10
Added: bgo524041.patch (1.1)
Modified: PKGBUILD (1.16 -> 1.17)
Removed: gstfdsrc-revert.patch (1.1)
upgpkg: gstreamer0.10 0.10.18-3
Use official patch
-----------------------+
PKGBUILD | 10 +-
bgo524041.patch | 22 +++++
gstfdsrc-revert.patch | 207 ------------------------------------------------
3 files changed, 27 insertions(+), 212 deletions(-)
Index: extra/multimedia/gstreamer0.10/PKGBUILD
diff -u extra/multimedia/gstreamer0.10/PKGBUILD:1.16 extra/multimedia/gstreamer0.10/PKGBUILD:1.17
--- extra/multimedia/gstreamer0.10/PKGBUILD:1.16 Sun Mar 23 19:38:28 2008
+++ extra/multimedia/gstreamer0.10/PKGBUILD Sun Mar 30 09:50:32 2008
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD,v 1.16 2008/03/23 23:38:28 jgc Exp $
+# $Id: PKGBUILD,v 1.17 2008/03/30 13:50:32 jgc Exp $
# Maintainer: Jan de Groot <jgc at archlinux.org>
pkgname=gstreamer0.10
pkgver=0.10.18
-pkgrel=2
+pkgrel=3
pkgdesc="GStreamer Multimedia Framework"
arch=(i686 x86_64)
license=('LGPL')
@@ -12,12 +12,12 @@
makedepends=('perlxml' 'pkgconfig')
options=('!libtool')
source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.bz2
- gstfdsrc-revert.patch)
-md5sums=('3b2f9b2b50f7265bbaac8ea10a8279b8' '02d4bd63167f36d14f1ad5fbc312289e')
+ bgo524041.patch)
+md5sums=('3b2f9b2b50f7265bbaac8ea10a8279b8' 'b87b55ceda21239658ec6e294f12585f')
build() {
cd ${startdir}/src/gstreamer-${pkgver}
- patch -Np0 -R -i ${startdir}/src/gstfdsrc-revert.patch || return 1
+ patch -Np0 -i ${startdir}/src/bgo524041.patch || return 1
./configure --prefix=/usr \
--sysconfdir=/etc --localstatedir=/var \
--disable-docs-build || return 1
Index: extra/multimedia/gstreamer0.10/bgo524041.patch
diff -u /dev/null extra/multimedia/gstreamer0.10/bgo524041.patch:1.1
--- /dev/null Sun Mar 30 09:50:32 2008
+++ extra/multimedia/gstreamer0.10/bgo524041.patch Sun Mar 30 09:50:32 2008
@@ -0,0 +1,22 @@
+--- plugins/elements/gstfdsink.c 2008/03/22 14:56:15 1.51
++++ plugins/elements/gstfdsink.c 2008/03/24 16:31:30 1.52
+@@ -233,7 +233,7 @@
+ GST_DEBUG_OBJECT (fdsink, "going into select, have %d bytes to write",
+ size);
+ retval = gst_poll_wait (fdsink->fdset, GST_CLOCK_TIME_NONE);
+- } while (retval == -1 && errno == EINTR);
++ } while (retval == -1 && (errno == EINTR || errno == EAGAIN));
+
+ if (retval == -1) {
+ if (errno == EBUSY)
+--- plugins/elements/gstfdsrc.c 2008/03/22 14:56:15 1.81
++++ plugins/elements/gstfdsrc.c 2008/03/24 16:31:30 1.82
+@@ -342,7 +342,7 @@
+ #ifndef HAVE_WIN32
+ do {
+ retval = gst_poll_wait (src->fdset, GST_CLOCK_TIME_NONE);
+- } while (retval == -1 && errno == EINTR);
++ } while (retval == -1 && (errno == EINTR || errno == EAGAIN)); /* retry if interrupted */
+
+ if (retval == -1) {
+ if (errno == EBUSY)
Index: extra/multimedia/gstreamer0.10/gstfdsrc-revert.patch
diff -u extra/multimedia/gstreamer0.10/gstfdsrc-revert.patch:1.1 extra/multimedia/gstreamer0.10/gstfdsrc-revert.patch:removed
--- extra/multimedia/gstreamer0.10/gstfdsrc-revert.patch:1.1 Sun Mar 23 19:38:44 2008
+++ extra/multimedia/gstreamer0.10/gstfdsrc-revert.patch Sun Mar 30 09:50:32 2008
@@ -1,207 +0,0 @@
---- plugins/elements/gstfdsrc.h 2007/08/13 13:33:07 1.22
-+++ plugins/elements/gstfdsrc.h 2008/02/28 10:18:02 1.23
-@@ -64,7 +64,7 @@
-
- gchar *uri;
-
-- gint control_sock[2];
-+ GstPoll *fdset;
-
- gulong curoffset; /* current offset in file */
- };
---- plugins/elements/gstfdsrc.c 2007/11/21 00:24:04 1.72
-+++ plugins/elements/gstfdsrc.c 2008/03/07 15:39:44 1.80
-@@ -50,24 +50,6 @@
-
- #include "gstfdsrc.h"
-
--/* the select call is also performed on the control sockets, that way
-- * we can send special commands to unblock the select call */
--#define CONTROL_STOP 'S' /* stop the select call */
--#define CONTROL_SOCKETS(src) src->control_sock
--#define WRITE_SOCKET(src) src->control_sock[1]
--#define READ_SOCKET(src) src->control_sock[0]
--
--#define SEND_COMMAND(src, command) \
--G_STMT_START { \
-- unsigned char c; c = command; \
-- write (WRITE_SOCKET(src), &c, 1); \
--} G_STMT_END
--
--#define READ_COMMAND(src, command, res) \
--G_STMT_START { \
-- res = read(READ_SOCKET(src), &command, 1); \
--} G_STMT_END
--
- #define DEFAULT_BLOCKSIZE 4096
-
- static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
-@@ -193,6 +175,21 @@
- {
- struct stat stat_results;
-
-+ /* we need to always update the fdset since it may not have existed when
-+ * gst_fd_src_update_fd() was called earlier */
-+ if (src->fdset != NULL) {
-+ GstPollFD fd = GST_POLL_FD_INIT;
-+
-+ if (src->fd >= 0) {
-+ fd.fd = src->fd;
-+ gst_poll_remove_fd (src->fdset, &fd);
-+ }
-+
-+ fd.fd = src->new_fd;
-+ gst_poll_add_fd (src->fdset, &fd);
-+ gst_poll_fd_ctl_read (src->fdset, &fd, TRUE);
-+ }
-+
- if (src->fd != src->new_fd) {
- GST_INFO_OBJECT (src, "Updating to fd %d", src->new_fd);
-
-@@ -227,20 +224,13 @@
- gst_fd_src_start (GstBaseSrc * bsrc)
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-- gint control_sock[2];
-
- src->curoffset = 0;
-
-- gst_fd_src_update_fd (src);
--
-- if (socketpair (PF_UNIX, SOCK_STREAM, 0, control_sock) < 0)
-+ if ((src->fdset = gst_poll_new (TRUE)) == NULL)
- goto socket_pair;
-
-- READ_SOCKET (src) = control_sock[0];
-- WRITE_SOCKET (src) = control_sock[1];
--
-- fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK);
-- fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK);
-+ gst_fd_src_update_fd (src);
-
- return TRUE;
-
-@@ -258,8 +248,10 @@
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-
-- close (READ_SOCKET (src));
-- close (WRITE_SOCKET (src));
-+ if (src->fdset) {
-+ gst_poll_free (src->fdset);
-+ src->fdset = NULL;
-+ }
-
- return TRUE;
- }
-@@ -269,8 +261,10 @@
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-
-- GST_LOG_OBJECT (src, "sending unlock command");
-- SEND_COMMAND (src, CONTROL_STOP);
-+ GST_LOG_OBJECT (src, "Flushing");
-+ GST_OBJECT_LOCK (src);
-+ gst_poll_set_flushing (src->fdset, TRUE);
-+ GST_OBJECT_UNLOCK (src);
-
- return TRUE;
- }
-@@ -280,22 +274,10 @@
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-
-- GST_LOG_OBJECT (src, "clearing unlock command queue");
--
-- /* read all stop commands */
-- while (TRUE) {
-- gchar command;
-- int res;
--
-- GST_LOG_OBJECT (src, "reading command");
--
-- READ_COMMAND (src, command, res);
-- if (res < 0) {
-- GST_LOG_OBJECT (src, "no more commands");
-- /* no more commands */
-- break;
-- }
-- }
-+ GST_LOG_OBJECT (src, "No longer flushing");
-+ GST_OBJECT_LOCK (src);
-+ gst_poll_set_flushing (src->fdset, FALSE);
-+ GST_OBJECT_UNLOCK (src);
-
- return TRUE;
- }
-@@ -352,26 +334,22 @@
- guint blocksize;
-
- #ifndef HAVE_WIN32
-- fd_set readfds;
- gint retval;
- #endif
-
- src = GST_FD_SRC (psrc);
-
- #ifndef HAVE_WIN32
-- FD_ZERO (&readfds);
-- FD_SET (src->fd, &readfds);
-- FD_SET (READ_SOCKET (src), &readfds);
--
- do {
-- retval = select (FD_SETSIZE, &readfds, NULL, NULL, NULL);
-- } while ((retval == -1 && errno == EINTR));
--
-- if (retval == -1)
-- goto select_error;
-+ retval = gst_poll_wait (src->fdset, GST_CLOCK_TIME_NONE);
-+ } while (retval == -1 && errno == EINTR);
-
-- if (FD_ISSET (READ_SOCKET (src), &readfds))
-- goto stopped;
-+ if (retval == -1) {
-+ if (errno == EBUSY)
-+ goto stopped;
-+ else
-+ goto select_error;
-+ }
- #endif
-
- blocksize = GST_BASE_SRC (src)->blocksize;
-@@ -433,7 +411,7 @@
- }
- }
-
--gboolean
-+static gboolean
- gst_fd_src_is_seekable (GstBaseSrc * bsrc)
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-@@ -441,7 +419,7 @@
- return src->seekable_fd;
- }
-
--gboolean
-+static gboolean
- gst_fd_src_get_size (GstBaseSrc * bsrc, guint64 * size)
- {
- GstFdSrc *src = GST_FD_SRC (bsrc);
-@@ -467,7 +445,7 @@
- }
- }
-
--gboolean
-+static gboolean
- gst_fd_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
- {
- gint res;
-@@ -530,7 +508,7 @@
- }
- g_free (protocol);
-
-- if (sscanf (uri, "fd://%d", &fd) != 1)
-+ if (sscanf (uri, "fd://%d", &fd) != 1 || fd < 0)
- return FALSE;
-
- src->new_fd = fd;
More information about the arch-commits
mailing list