Compare commits

...

4 Commits
master ... f10

Author SHA1 Message Date
Fedora Release Engineering
39536ae46e dist-git conversion 2010-07-28 17:12:05 +00:00
Bill Nottingham
027741c81a Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 02:03:47 +00:00
Tom Callaway
6290d15ed0 fix gnome bz 555631 2008-11-12 15:01:45 +00:00
Jesse Keating
ca33995de1 Initialize branch F-10 for gstreamer 2008-11-07 03:48:08 +00:00
4 changed files with 175 additions and 23 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: gstreamer
# $Id: Makefile,v 1.1 2004/09/09 05:53:09 cvsdist Exp $
NAME := gstreamer
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,164 @@
diff -up gstreamer-0.10.21/libs/gst/base/gstbasetransform.c.BAD gstreamer-0.10.21/libs/gst/base/gstbasetransform.c
--- gstreamer-0.10.21/libs/gst/base/gstbasetransform.c.BAD 2008-11-11 16:45:10.000000000 -0500
+++ gstreamer-0.10.21/libs/gst/base/gstbasetransform.c 2008-11-11 16:45:16.000000000 -0500
@@ -251,7 +251,7 @@ struct _GstBaseTransformPrivate
/* upstream caps and size suggestions */
GstCaps *sink_suggest;
guint size_suggest;
- gint suggest_pending;
+ gboolean suggest_pending;
gboolean reconfigure;
};
@@ -896,6 +896,18 @@ gst_base_transform_find_transform (GstBa
gst_pad_fixate_caps (otherpad, othercaps);
}
GST_DEBUG_OBJECT (trans, "after fixating %" GST_PTR_FORMAT, othercaps);
+ } else {
+ /* else caps are fixed but the subclass may want to add fields */
+ if (klass->fixate_caps) {
+ othercaps = gst_caps_make_writable (othercaps);
+
+ GST_DEBUG_OBJECT (trans, "doing fixate %" GST_PTR_FORMAT
+ " using caps %" GST_PTR_FORMAT
+ " on pad %s:%s using fixate_caps vmethod", othercaps, caps,
+ GST_DEBUG_PAD_NAME (otherpad));
+
+ klass->fixate_caps (trans, GST_PAD_DIRECTION (pad), caps, othercaps);
+ }
}
/* caps should be fixed now, if not we have to fail. */
@@ -1074,6 +1086,8 @@ gst_base_transform_prepare_output_buffer
priv = trans->priv;
+ *out_buf = NULL;
+
/* figure out how to allocate a buffer based on the current configuration */
if (trans->passthrough) {
GST_DEBUG_OBJECT (trans, "doing passthrough alloc");
@@ -1224,7 +1238,7 @@ gst_base_transform_prepare_output_buffer
gst_caps_unref (priv->sink_suggest);
priv->sink_suggest = gst_caps_ref (othercaps);
priv->size_suggest = size_suggest;
- g_atomic_int_set (&trans->priv->suggest_pending, 1);
+ trans->priv->suggest_pending = TRUE;
GST_OBJECT_UNLOCK (trans->sinkpad);
}
gst_caps_unref (othercaps);
@@ -1366,7 +1380,7 @@ gst_base_transform_buffer_alloc (GstPad
GstBaseTransform *trans;
GstBaseTransformPrivate *priv;
GstFlowReturn res;
- gboolean proxy, suggest;
+ gboolean proxy, suggest, same_caps;
GstCaps *sink_suggest;
guint size_suggest;
@@ -1384,8 +1398,12 @@ gst_base_transform_buffer_alloc (GstPad
/* we remember our previous alloc request to quickly see if we can proxy or
* not. We skip this check if we have a pending suggestion. */
- if (g_atomic_int_get (&priv->suggest_pending) == 0 && caps &&
- gst_caps_is_equal (priv->sink_alloc, caps)) {
+ GST_OBJECT_LOCK (pad);
+ same_caps = !priv->suggest_pending && caps &&
+ gst_caps_is_equal (priv->sink_alloc, caps);
+ GST_OBJECT_UNLOCK (pad);
+
+ if (same_caps) {
/* we have seen this before, see below if we need to proxy */
GST_DEBUG_OBJECT (trans, "have old caps");
sink_suggest = caps;
@@ -1414,7 +1432,7 @@ gst_base_transform_buffer_alloc (GstPad
size_suggest = size;
suggest = FALSE;
}
- g_atomic_int_set (&priv->suggest_pending, 0);
+ priv->suggest_pending = FALSE;
GST_OBJECT_UNLOCK (pad);
/* check if we actually handle this format on the sinkpad */
@@ -1462,7 +1480,10 @@ gst_base_transform_buffer_alloc (GstPad
}
}
/* remember the new caps */
+ GST_OBJECT_LOCK (pad);
gst_caps_replace (&priv->sink_alloc, sink_suggest);
+ GST_OBJECT_UNLOCK (pad);
+
proxy = priv->proxy_alloc;
GST_DEBUG_OBJECT (trans, "doing default alloc, proxy %d", proxy);
@@ -1487,11 +1508,13 @@ gst_base_transform_buffer_alloc (GstPad
if (!gst_caps_is_equal (newcaps, caps)) {
GST_DEBUG_OBJECT (trans, "caps are new");
/* we have new caps, see if we can proxy downstream */
- if (gst_pad_peer_accept_caps (trans->sinkpad, newcaps)) {
+ if (gst_pad_peer_accept_caps (pad, newcaps)) {
/* peer accepts the caps, return a buffer in this format */
GST_DEBUG_OBJECT (trans, "peer accepted new caps");
/* remember the format */
+ GST_OBJECT_LOCK (pad);
gst_caps_replace (&priv->sink_alloc, newcaps);
+ GST_OBJECT_UNLOCK (pad);
} else {
GST_DEBUG_OBJECT (trans, "peer did not accept new caps");
/* peer does not accept the caps, free the buffer we received and
@@ -1694,6 +1717,7 @@ gst_base_transform_handle_buffer (GstBas
GST_OBJECT_UNLOCK (trans);
if (G_UNLIKELY (reconfigure)) {
+ GST_DEBUG_OBJECT (trans, "we had a pending reconfigure");
/* if we need to reconfigure we pretend a buffer with new caps arrived. This
* will reconfigure the transform with the new output format. We can only
* do this if the buffer actually has caps. */
@@ -1853,15 +1877,25 @@ gst_base_transform_getrange (GstPad * pa
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
ret = gst_pad_pull_range (trans->sinkpad, offset, length, &inbuf);
- if (ret == GST_FLOW_OK) {
- GST_BASE_TRANSFORM_LOCK (trans);
- ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
- GST_BASE_TRANSFORM_UNLOCK (trans);
- }
+ if (G_UNLIKELY (ret != GST_FLOW_OK))
+ goto pull_error;
+
+ GST_BASE_TRANSFORM_LOCK (trans);
+ ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
+ GST_BASE_TRANSFORM_UNLOCK (trans);
+done:
gst_object_unref (trans);
return ret;
+
+ /* ERRORS */
+pull_error:
+ {
+ GST_DEBUG_OBJECT (trans, "failed to pull a buffer: %s",
+ gst_flow_get_name (ret));
+ goto done;
+ }
}
static GstFlowReturn
@@ -2305,7 +2339,7 @@ gst_base_transform_suggest (GstBaseTrans
caps = gst_caps_copy (caps);
trans->priv->sink_suggest = caps;
trans->priv->size_suggest = size;
- g_atomic_int_set (&trans->priv->suggest_pending, 1);
+ trans->priv->suggest_pending = TRUE;
GST_DEBUG_OBJECT (trans, "new suggest %" GST_PTR_FORMAT, caps);
GST_OBJECT_UNLOCK (trans->sinkpad);
}
@@ -2326,6 +2360,7 @@ gst_base_transform_reconfigure (GstBaseT
g_return_if_fail (GST_IS_BASE_TRANSFORM (trans));
GST_OBJECT_LOCK (trans);
+ GST_DEBUG_OBJECT (trans, "marking reconfigure");
trans->priv->reconfigure = TRUE;
GST_OBJECT_UNLOCK (trans);
}

View File

@ -6,7 +6,7 @@
Name: %{gstreamer}
Version: 0.10.21
Release: 1%{?dist}
Release: 2%{?dist}
Summary: GStreamer streaming media framework runtime
Group: Applications/Multimedia
@ -27,6 +27,8 @@ BuildRequires: m4
BuildRequires: check-devel
BuildRequires: gtk-doc >= 1.3
BuildRequires: gettext
# We need to use the system libtool or else we end up with RPATHs
BuildRequires: libtool
# because AM_PROG_LIBTOOL was used in configure.ac
BuildRequires: gcc-c++
@ -35,6 +37,8 @@ BuildRequires: gcc-c++
Patch1: gstreamer-inspect-rpm-format.patch
Source1: gstreamer.prov
Source2: macros.gstreamer
# From: http://bugzilla.gnome.org/show_bug.cgi?id=555631
Patch2: gstreamer-0.10.21-fixgnomebz555631.patch
### documentation requirements
BuildRequires: python2
@ -101,6 +105,7 @@ with different major/minor versions of GStreamer.
pushd tools/
%patch1 -p0 -b .rpm-provides
popd
%patch2 -p1 -b .gnomebz555631
%build
# 0.10.0: manuals do not build due to an openjade error; disable for now
@ -113,7 +118,7 @@ popd
#make %{?_smp_mflags}
# FIXME: docs building doesn't work with smp yet
make ERROR_CFLAGS=""
make ERROR_CFLAGS="" LIBTOOL="%{_bindir}/libtool"
%install
rm -rf $RPM_BUILD_ROOT
@ -212,6 +217,10 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/rpm/macros.gstreamer
%changelog
* Tue Nov 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.10.21-2
- fix gnome bz 555631 with patch from upstream cvs
- use system libtool to prevent rpaths
* Fri Oct 03 2008 - Bastien Nocera <bnocera@redhat.com> - 0.10.21-1
- Update to 0.10.21