diff options
author | Marinus Schraal <foser@gentoo.org> | 2004-04-03 01:28:13 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2004-04-03 01:28:13 +0000 |
commit | 92932243c71e5012eceaca9291444a9252f5a99d (patch) | |
tree | a2dabeba0bb7d5248ab44dc6828a73a78fddff04 /media-libs/gst-plugins | |
parent | fix typo (Manifest recommit) (diff) | |
download | gentoo-2-92932243c71e5012eceaca9291444a9252f5a99d.tar.gz gentoo-2-92932243c71e5012eceaca9291444a9252f5a99d.tar.bz2 gentoo-2-92932243c71e5012eceaca9291444a9252f5a99d.zip |
minor fixes
Diffstat (limited to 'media-libs/gst-plugins')
-rw-r--r-- | media-libs/gst-plugins/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/gst-plugins/files/gst-plugins-0.8.0-audioconvert_stereo.patch | 121 | ||||
-rw-r--r-- | media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild | 18 |
3 files changed, 136 insertions, 9 deletions
diff --git a/media-libs/gst-plugins/ChangeLog b/media-libs/gst-plugins/ChangeLog index 82d8debb31ae..9d5afe1caa01 100644 --- a/media-libs/gst-plugins/ChangeLog +++ b/media-libs/gst-plugins/ChangeLog @@ -1,7 +1,11 @@ # ChangeLog for media-libs/gst-plugins # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 # Distributed under the terms of the GNU General Public License, v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins/ChangeLog,v 1.62 2004/03/24 01:14:24 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins/ChangeLog,v 1.63 2004/04/03 01:28:13 foser Exp $ + + 03 Apr 2004; foser <foser@gentoo.org> gst-plugins-0.8.0-r1.ebuild : + Add pdepends on some sinks to be on the safe side + Add patch to make audioconvert do stereo again (#46408) *gst-plugins-0.8.0-r1 (23 Mar 2004) diff --git a/media-libs/gst-plugins/files/gst-plugins-0.8.0-audioconvert_stereo.patch b/media-libs/gst-plugins/files/gst-plugins-0.8.0-audioconvert_stereo.patch new file mode 100644 index 000000000000..5eba4d14e00c --- /dev/null +++ b/media-libs/gst-plugins/files/gst-plugins-0.8.0-audioconvert_stereo.patch @@ -0,0 +1,121 @@ +diff -u -r1.39 -r1.40 +--- gstreamer/gst-plugins/gst/audioconvert/gstaudioconvert.c 2004/03/15 19:32:00 1.39 ++++ gstreamer/gst-plugins/gst/audioconvert/gstaudioconvert.c 2004/03/21 02:54:37 1.40 +@@ -109,6 +109,7 @@ + static void gst_audio_convert_chain (GstPad * pad, GstData * _data); + static GstPadLinkReturn gst_audio_convert_link (GstPad * pad, + const GstCaps * caps); ++static GstCaps *gst_audio_convert_fixate (GstPad * pad, const GstCaps * caps); + static GstCaps *gst_audio_convert_getcaps (GstPad * pad); + static GstElementStateReturn gst_audio_convert_change_state (GstElement * + element); +@@ -202,6 +203,7 @@ + (&gst_audio_convert_sink_template), "sink"); + gst_pad_set_getcaps_function (this->sink, gst_audio_convert_getcaps); + gst_pad_set_link_function (this->sink, gst_audio_convert_link); ++ gst_pad_set_fixate_function (this->sink, gst_audio_convert_fixate); + gst_element_add_pad (GST_ELEMENT (this), this->sink); + + /* srcpad */ +@@ -210,6 +212,7 @@ + (&gst_audio_convert_src_template), "src"); + gst_pad_set_getcaps_function (this->src, gst_audio_convert_getcaps); + gst_pad_set_link_function (this->src, gst_audio_convert_link); ++ gst_pad_set_fixate_function (this->src, gst_audio_convert_fixate); + gst_element_add_pad (GST_ELEMENT (this), this->src); + + gst_pad_set_chain_function (this->sink, gst_audio_convert_chain); +@@ -386,6 +389,12 @@ + } + } + } ++ if (this->sink == pad) { ++ this->sinkcaps = ac_caps; ++ } else { ++ this->srccaps = ac_caps; ++ } ++ GST_LOG_OBJECT (this, "trying to set caps to %" GST_PTR_FORMAT, othercaps); + ret = gst_pad_try_set_caps_nonfixed (otherpad, othercaps); + gst_caps_free (othercaps); + if (ret < GST_PAD_LINK_OK) +@@ -406,11 +415,77 @@ + this->sinkcaps = other_ac_caps; + } + +- GST_DEBUG ("negotiated pad to %" GST_PTR_FORMAT, caps); +- GST_DEBUG ("negotiated otherpad to %" GST_PTR_FORMAT, othercaps); ++ GST_DEBUG_OBJECT (this, "negotiated pad to %" GST_PTR_FORMAT, caps); ++ GST_DEBUG_OBJECT (this, "negotiated otherpad to %" GST_PTR_FORMAT, othercaps); + return GST_PAD_LINK_OK; + } + ++gboolean ++_fixate_caps_to_int (GstCaps ** caps, const gchar * field, gint value) ++{ ++ GstCaps *try, *intersection; ++ gboolean ret = FALSE; ++ guint i; ++ ++ try = ++ gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE, ++ G_MININT, value - 1, NULL), gst_caps_append (try, ++ gst_caps_new_simple ("audio/x-raw-float", field, GST_TYPE_INT_RANGE, ++ G_MININT, value - 1, NULL)); ++ intersection = gst_caps_intersect (*caps, try); ++ if (!gst_caps_is_empty (intersection)) { ++ gst_caps_free (try); ++ try = ++ gst_caps_new_simple ("audio/x-raw-int", field, GST_TYPE_INT_RANGE, ++ value, G_MAXINT, NULL), gst_caps_append (try, ++ gst_caps_new_simple ("audio/x-raw-float", field, GST_TYPE_INT_RANGE, ++ value, G_MAXINT, NULL)); ++ gst_caps_free (intersection); ++ intersection = gst_caps_intersect (*caps, try); ++ if (!gst_caps_is_empty (intersection)) { ++ gst_caps_free (*caps); ++ *caps = intersection; ++ ret = TRUE; ++ } else { ++ gst_caps_free (intersection); ++ } ++ } ++ for (i = 0; i < gst_caps_get_size (*caps); i++) { ++ GstStructure *structure = gst_caps_get_structure (*caps, i); ++ ++ if (gst_structure_has_field (structure, field)) ++ ret |= ++ gst_caps_structure_fixate_field_nearest_int (structure, field, value); ++ } ++ return ret; ++} ++ ++static GstCaps * ++gst_audio_convert_fixate (GstPad * pad, const GstCaps * caps) ++{ ++ GstAudioConvert *this = ++ GST_AUDIO_CONVERT (gst_object_get_parent (GST_OBJECT (pad))); ++ GstPad *otherpad = (pad == this->sink ? this->src : this->sink); ++ GstAudioConvertCaps ac_caps = ++ (pad == this->sink ? this->srccaps : this->sinkcaps); ++ GstCaps *copy; ++ ++ /* only fixate when we're proxying, so we don't fixate to some crap the other side doesn't want */ ++ if (!GST_PAD_IS_NEGOTIATING (otherpad)) ++ return NULL; ++ ++ copy = gst_caps_copy (caps); ++ if (_fixate_caps_to_int (©, "channels", ac_caps.channels)) ++ return copy; ++ if (_fixate_caps_to_int (©, "width", ac_caps.is_int ? ac_caps.width : 16)) ++ return copy; ++ if (_fixate_caps_to_int (©, "depth", ac_caps.is_int ? ac_caps.depth : 16)) ++ return copy; ++ ++ gst_caps_free (copy); ++ return NULL; ++} ++ + static GstElementStateReturn + gst_audio_convert_change_state (GstElement * element) + { + diff --git a/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild b/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild index e8b83eddeebb..0c3126487531 100644 --- a/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild +++ b/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild,v 1.1 2004/03/24 01:14:24 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins/gst-plugins-0.8.0-r1.ebuild,v 1.2 2004/04/03 01:28:13 foser Exp $ # IMPORTANT # @@ -16,8 +16,9 @@ inherit gst-plugins gnome2 eutils flag-o-matic DESCRIPTION="Basepack of plugins for gstreamer" HOMEPAGE="http://gstreamer.net/" - LICENSE="GPL-2" + +IUSE="esd alsa oss" KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~amd64 ~ia64 ~mips" RDEPEND="=media-libs/gstreamer-${PV}* @@ -27,7 +28,9 @@ DEPEND="${RDEPEND} >=sys-devel/gettext-0.11.5 >=dev-util/pkgconfig-0.9" -#PDEPEND=">=media-plugins/gst-plugins-oss-${PV}" +PDEPEND="oss? ( >=media-plugins/gst-plugins-oss-${PV} ) + alsa? ( >=media-plugins/gst-plugins-alsa-${PV} ) + esd? ( >=media-plugins/gst-plugins-esd-${PV} )" # we need x for the x overlay to get linked GST_PLUGINS_BUILD="x xshm" @@ -37,6 +40,9 @@ src_unpack() { unpack ${A} cd ${S} + # fix audioconvert (# + epatch ${FILESDIR}/${P}-audioconvert_stereo.patch + # ppc asm included in the resample plugin seems to be broken, # using a slower but working version for now # @@ -69,7 +75,6 @@ src_compile() { src_install() { gnome2_src_install -# gst-plugins_remove_unversioned_binaries # forgotten header, should be included next release insinto /usr/include/gstreamer-0.8/gst/xoverlay/ @@ -86,10 +91,7 @@ pkg_postinst () { echo "" einfo "The Gstreamer plugins setup has changed quite a bit on Gentoo," - einfo "applications now should provide you with the basic plugins." -# echo "" -# einfo "Right now this package installs at least an OSS output plugin to have" -# einfo "a standard sound output plugin, but this might change in the future." + einfo "applications now should provide the basic plugins needed." echo "" einfo "The new seperate plugins are all named 'gst-plugins-<plugin>'." einfo "To get a listing of currently available plugins execute 'emerge -s gst-plugins-'." |