From 40c9501069eb16bbffbf43efde4eed3787cb1296 Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Fri, 16 Mar 2007 10:11:28 +0000 Subject: [PATCH] version bump Package-Manager: portage-2.1.2-r12 --- media-libs/gst-plugins-base/ChangeLog | 9 +- media-libs/gst-plugins-base/Manifest | 20 +- .../files/digest-gst-plugins-base-0.10.12 | 3 + .../gst-plugins-base.audioresample.patch | 200 ++++++++++++++++++ .../gst-plugins-base-0.10.12.ebuild | 55 +++++ 5 files changed, 282 insertions(+), 5 deletions(-) create mode 100644 media-libs/gst-plugins-base/files/digest-gst-plugins-base-0.10.12 create mode 100644 media-libs/gst-plugins-base/files/gst-plugins-base.audioresample.patch create mode 100644 media-libs/gst-plugins-base/gst-plugins-base-0.10.12.ebuild diff --git a/media-libs/gst-plugins-base/ChangeLog b/media-libs/gst-plugins-base/ChangeLog index ba7d2d1b4fca..a41fcec4822b 100644 --- a/media-libs/gst-plugins-base/ChangeLog +++ b/media-libs/gst-plugins-base/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-libs/gst-plugins-base # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins-base/ChangeLog,v 1.49 2007/02/16 12:55:17 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins-base/ChangeLog,v 1.50 2007/03/16 10:11:28 zaheerm Exp $ + +*gst-plugins-base-0.10.12 (16 Mar 2007) + + 16 Mar 2007; Zaheer Abbas Merali + +files/gst-plugins-base.audioresample.patch, + +gst-plugins-base-0.10.12.ebuild: + version bump 16 Feb 2007; Roy Marples gst-plugins-base-0.10.11.ebuild: diff --git a/media-libs/gst-plugins-base/Manifest b/media-libs/gst-plugins-base/Manifest index 1a7411821df3..15b723f83a71 100644 --- a/media-libs/gst-plugins-base/Manifest +++ b/media-libs/gst-plugins-base/Manifest @@ -2,8 +2,13 @@ AUX gst-plugins-base-0.10.4-typefindfunctions-m4v-NULL-terminator.diff 767 RMD16 MD5 3fa638ac92113f4a983f9c6098ac030f files/gst-plugins-base-0.10.4-typefindfunctions-m4v-NULL-terminator.diff 767 RMD160 8498d01d7d3a1d7869396367d33750b53456255d files/gst-plugins-base-0.10.4-typefindfunctions-m4v-NULL-terminator.diff 767 SHA256 af7a7f1e145b3b2f71e53dbbf359152fa74c2531fc678292c13e4e97a7b85268 files/gst-plugins-base-0.10.4-typefindfunctions-m4v-NULL-terminator.diff 767 +AUX gst-plugins-base.audioresample.patch 7617 RMD160 5bc3c3fa90f65da6faa0e15a2a227d3c7948df3b SHA1 7817dfa4d7ba380416a94c054b866a616a1a4760 SHA256 3a034f6e25f9ef61460fad0578ec5327755a6d916d6af96ab84db7b351308fb8 +MD5 bf66131cd7477b052f8223b88fb334a9 files/gst-plugins-base.audioresample.patch 7617 +RMD160 5bc3c3fa90f65da6faa0e15a2a227d3c7948df3b files/gst-plugins-base.audioresample.patch 7617 +SHA256 3a034f6e25f9ef61460fad0578ec5327755a6d916d6af96ab84db7b351308fb8 files/gst-plugins-base.audioresample.patch 7617 DIST gst-plugins-base-0.10.10.tar.bz2 1333651 RMD160 11b7f441d6499a3e462fc4a0ebc9dd026925e0ee SHA1 516daec5a6f5d1e8c6fd74e2170fc7a12305a0c1 SHA256 2246a5921ad060e86acd81cabec17a5022d1997849f950ac2c8f6f14f9291d3e DIST gst-plugins-base-0.10.11.tar.bz2 1409996 RMD160 94deb9061cd732139fddbf8608b125bbaa3d87f2 SHA1 93d18094a3459e02c0f640d69d4014bf02223d25 SHA256 2193e3f940f0fd2ca10a137efbb79bc1edc8a12543b618b9a97f680f9d15bfb4 +DIST gst-plugins-base-0.10.12.tar.bz2 1460658 RMD160 30ab89cb22b0e596749a651eea86421c72ba0425 SHA1 b323589b67f0ee3790d69341be2e545870d0a0e9 SHA256 b88a85b21499bd064a531a3b5d06ae69ee025ad5f88b6e86ed4af245509247ee DIST gst-plugins-base-0.10.4.tar.bz2 1097817 RMD160 da837968b10a130dbeaa1953a3ad9f27586ba683 SHA1 1874bfc701f75ff859615c6b6e5b65c50df6f53a SHA256 6c556051191364eacf05dcf01a9f3101240a6b6155e331e4cbcbfca55a91ca42 DIST gst-plugins-base-0.10.6.tar.bz2 1195072 RMD160 69659a40113b38b7eb1569c1da49ee5c37a5fd24 SHA1 58c1177e530d2ff91ddfa3a9322ab5ba3e0ddbb4 SHA256 0ef1b8cbe6d7e898d0636342479de46a780f720033c1b4f7217c903aac6d80ad DIST gst-plugins-base-0.10.7.tar.bz2 1166071 RMD160 67957a8d62fcf2b3170c57ea8bc4b58ce227306b SHA1 832b54fc9f3bc7f4c0a5337363081a25171d2662 SHA256 7be5984162333dae48d8f7e58e6c7f4b43726c78e2ca13aca6618b1342af8d37 @@ -17,6 +22,10 @@ EBUILD gst-plugins-base-0.10.11.ebuild 1435 RMD160 38cea181b360685832db5782408b5 MD5 372fdc6cb18c71031978c7f8551163bc gst-plugins-base-0.10.11.ebuild 1435 RMD160 38cea181b360685832db5782408b52e31ffe8c3c gst-plugins-base-0.10.11.ebuild 1435 SHA256 8533fb7a0c5493b76c13e86e9aa79435a572dd02ab3792822128cc20c9593cc9 gst-plugins-base-0.10.11.ebuild 1435 +EBUILD gst-plugins-base-0.10.12.ebuild 1527 RMD160 61755cae15ae81b46adb4c368c9fe8f264b0fa41 SHA1 ca84b5538de7a1eed56ad4cf714e6f4b062bd817 SHA256 bd897b2d6f9e4307838c96396ec4050a845e7626dbed73683628ab153912b602 +MD5 9a0b82d77c2956abbacd5b98d21d6cf2 gst-plugins-base-0.10.12.ebuild 1527 +RMD160 61755cae15ae81b46adb4c368c9fe8f264b0fa41 gst-plugins-base-0.10.12.ebuild 1527 +SHA256 bd897b2d6f9e4307838c96396ec4050a845e7626dbed73683628ab153912b602 gst-plugins-base-0.10.12.ebuild 1527 EBUILD gst-plugins-base-0.10.4-r1.ebuild 1554 RMD160 781d05d64ea220abed887a604a844d635fe4e904 SHA1 0ab1c5d32e02ec9b421327ec531744cfd2d4fd57 SHA256 75d671d980a3fcbe83737d298940e15918c6d84e786e2afef1ee332a45e6d665 MD5 a9f6af88021e5a9366b8c51845d3fdd5 gst-plugins-base-0.10.4-r1.ebuild 1554 RMD160 781d05d64ea220abed887a604a844d635fe4e904 gst-plugins-base-0.10.4-r1.ebuild 1554 @@ -37,10 +46,10 @@ EBUILD gst-plugins-base-0.10.9.ebuild 1434 RMD160 5570badbfc70e7725fd72972a2aece MD5 6b281ffbe0c32ba7e6b627d2425b80db gst-plugins-base-0.10.9.ebuild 1434 RMD160 5570badbfc70e7725fd72972a2aece18c42535e0 gst-plugins-base-0.10.9.ebuild 1434 SHA256 4148d9e83333f1d77a29b77a3be3cb393605315a43bfbf8a20fdc498e3ffe006 gst-plugins-base-0.10.9.ebuild 1434 -MISC ChangeLog 6804 RMD160 95ca6d4acb909463c490bcfafe6c7965733e2c97 SHA1 843aebca94a034f688e4d64118068bfe50828fad SHA256 b2f40a9f0e2c06f2bb78a6c4faf5abdf4e14612dbd0d6b087975e5f1eca3a948 -MD5 0c55d89620755c73e558923f8d2e574f ChangeLog 6804 -RMD160 95ca6d4acb909463c490bcfafe6c7965733e2c97 ChangeLog 6804 -SHA256 b2f40a9f0e2c06f2bb78a6c4faf5abdf4e14612dbd0d6b087975e5f1eca3a948 ChangeLog 6804 +MISC ChangeLog 6999 RMD160 6ae9aecb353b7ca75dc3eeb78401f25ad097e423 SHA1 39d6b1b01a21d18f820998df7406041acf9ce636 SHA256 10400563245bbce5e394ba07b66550ef818aa629b0549d694739215b29c3ba93 +MD5 519817d26b4218d488d5b8bdfd693959 ChangeLog 6999 +RMD160 6ae9aecb353b7ca75dc3eeb78401f25ad097e423 ChangeLog 6999 +SHA256 10400563245bbce5e394ba07b66550ef818aa629b0549d694739215b29c3ba93 ChangeLog 6999 MISC metadata.xml 162 RMD160 c6078d82a9ff46dbb283bc14ade9d117144cca67 SHA1 f46f8ccd62374b17183b5aca523c4dcf60d718f9 SHA256 3ac891ee23de8c6e2bef32e0c7aa3e6607e808de76ed723fbe7a1fb92f6093f1 MD5 6050196ef420c3e4025029ebee5a813f metadata.xml 162 RMD160 c6078d82a9ff46dbb283bc14ade9d117144cca67 metadata.xml 162 @@ -51,6 +60,9 @@ SHA256 a138219ddbf7c54e2a8f45fb3e5b693440948c8bb27158e361963ee538117046 files/di MD5 889cfa4d442701ade1a1b2b2876c1ff0 files/digest-gst-plugins-base-0.10.11 280 RMD160 041aee221b2cd237d4c947d9658d2daabc538024 files/digest-gst-plugins-base-0.10.11 280 SHA256 48e1ce06b28edcfea1294dbc106ad0ca6dda6f33e9509b430d95b101c8bf63fb files/digest-gst-plugins-base-0.10.11 280 +MD5 569b21ec15a384fbb25bc5c4235230c3 files/digest-gst-plugins-base-0.10.12 280 +RMD160 b1b4d4c2ae6992ef0895f54cb8501224778cbdfd files/digest-gst-plugins-base-0.10.12 280 +SHA256 6def950590c49906fc5d265f27cfdf7f8c8fff582ea429650b7b685c62d435f8 files/digest-gst-plugins-base-0.10.12 280 MD5 3477ec0d04649ccfcc545e28e0911bd3 files/digest-gst-plugins-base-0.10.4-r1 277 RMD160 bee1889727ca635912779fbcac2958f0ceba48b0 files/digest-gst-plugins-base-0.10.4-r1 277 SHA256 f47f4fd7829d14012ef690db4a45f568549f7a5015a00bd9ba03a41f3584e654 files/digest-gst-plugins-base-0.10.4-r1 277 diff --git a/media-libs/gst-plugins-base/files/digest-gst-plugins-base-0.10.12 b/media-libs/gst-plugins-base/files/digest-gst-plugins-base-0.10.12 new file mode 100644 index 000000000000..9f429b6590ae --- /dev/null +++ b/media-libs/gst-plugins-base/files/digest-gst-plugins-base-0.10.12 @@ -0,0 +1,3 @@ +MD5 0ee35455a4eb507bcfbfcd44d9e15d1e gst-plugins-base-0.10.12.tar.bz2 1460658 +RMD160 30ab89cb22b0e596749a651eea86421c72ba0425 gst-plugins-base-0.10.12.tar.bz2 1460658 +SHA256 b88a85b21499bd064a531a3b5d06ae69ee025ad5f88b6e86ed4af245509247ee gst-plugins-base-0.10.12.tar.bz2 1460658 diff --git a/media-libs/gst-plugins-base/files/gst-plugins-base.audioresample.patch b/media-libs/gst-plugins-base/files/gst-plugins-base.audioresample.patch new file mode 100644 index 000000000000..46a28fd3df24 --- /dev/null +++ b/media-libs/gst-plugins-base/files/gst-plugins-base.audioresample.patch @@ -0,0 +1,200 @@ +--- gst/audioresample/gstaudioresample.c 2006/10/28 16:00:51 1.22 ++++ gst/audioresample/gstaudioresample.c 2007/03/15 10:52:21 1.25 +@@ -194,6 +194,8 @@ + gst_pad_set_bufferalloc_function (trans->sinkpad, NULL); + + audioresample->filter_length = DEFAULT_FILTERLEN; ++ ++ audioresample->need_discont = FALSE; + } + + /* vmethods */ +@@ -371,7 +373,7 @@ + gboolean use_internal = FALSE; /* whether we use the internal state */ + gboolean ret = TRUE; + +- GST_DEBUG_OBJECT (base, "asked to transform size %d in direction %s", ++ GST_LOG_OBJECT (base, "asked to transform size %d in direction %s", + size, direction == GST_PAD_SINK ? "SINK" : "SRC"); + if (direction == GST_PAD_SINK) { + sinkcaps = caps; +@@ -406,7 +408,7 @@ + + /* we make room for one extra sample, given that the resampling filter + * can output an extra one for non-integral i_rate/o_rate */ +- GST_DEBUG_OBJECT (base, "transformed size %d to %d", size, *othersize); ++ GST_LOG_OBJECT (base, "transformed size %d to %d", size, *othersize); + + if (!use_internal) { + resample_free (state); +@@ -492,8 +494,7 @@ + r = audioresample->resample; + + outsize = resample_get_output_size (r); +- GST_DEBUG_OBJECT (audioresample, "audioresample can give me %d bytes", +- outsize); ++ GST_LOG_OBJECT (audioresample, "audioresample can give me %d bytes", outsize); + + /* protect against mem corruption */ + if (outsize > GST_BUFFER_SIZE (outbuf)) { +@@ -540,8 +541,8 @@ + /* check for possible mem corruption */ + if (outsize > GST_BUFFER_SIZE (outbuf)) { + /* this is an error that when it happens, would need fixing in the +- * resample library; we told +- * it we wanted only GST_BUFFER_SIZE (outbuf), and it gave us more ! */ ++ * resample library; we told it we wanted only GST_BUFFER_SIZE (outbuf), ++ * and it gave us more ! */ + GST_WARNING_OBJECT (audioresample, + "audioresample, you memory corrupting bastard. " + "you gave me outsize %d while my buffer was size %d", +@@ -556,9 +557,51 @@ + } + GST_BUFFER_SIZE (outbuf) = outsize; + ++ if (G_UNLIKELY (audioresample->need_discont)) { ++ GST_DEBUG_OBJECT (audioresample, ++ "marking this buffer with the DISCONT flag"); ++ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); ++ audioresample->need_discont = FALSE; ++ } ++ ++ GST_LOG_OBJECT (audioresample, "transformed to buffer of %ld bytes, ts %" ++ GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT ", offset %" ++ G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT, ++ outsize, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)), ++ GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)), ++ GST_BUFFER_OFFSET (outbuf), GST_BUFFER_OFFSET_END (outbuf)); ++ ++ + return GST_FLOW_OK; + } + ++/* llabs() is C99, so we might not have it; just use a simple macro... */ ++#define LLABS(x) ((x>0)?x:-x) ++static gboolean ++audioresample_check_discont (GstAudioresample * audioresample, ++ GstClockTime timestamp) ++{ ++ if (timestamp != GST_CLOCK_TIME_NONE && ++ audioresample->prev_ts != GST_CLOCK_TIME_NONE && ++ audioresample->prev_duration != GST_CLOCK_TIME_NONE && ++ timestamp != audioresample->prev_ts + audioresample->prev_duration) { ++ /* Potentially a discontinuous buffer. However, it turns out that many ++ * elements generate imperfect streams due to rounding errors, so we permit ++ * a small error (up to one sample) without triggering a filter ++ * flush/restart (if triggered incorrectly, this will be audible) */ ++ GstClockTimeDiff diff = timestamp - ++ (audioresample->prev_ts + audioresample->prev_duration); ++ ++ if (LLABS (diff) > GST_SECOND / audioresample->i_rate) { ++ GST_WARNING_OBJECT (audioresample, ++ "encountered timestamp discontinuity of %" G_GINT64_FORMAT, diff); ++ return TRUE; ++ } ++ } ++ ++ return FALSE; ++} ++ + static GstFlowReturn + audioresample_transform (GstBaseTransform * base, GstBuffer * inbuf, + GstBuffer * outbuf) +@@ -576,7 +619,22 @@ + size = GST_BUFFER_SIZE (inbuf); + timestamp = GST_BUFFER_TIMESTAMP (inbuf); + +- GST_DEBUG_OBJECT (audioresample, "got buffer of %ld bytes", size); ++ GST_LOG_OBJECT (audioresample, "transforming buffer of %ld bytes, ts %" ++ GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT ", offset %" ++ G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT, ++ size, GST_TIME_ARGS (timestamp), ++ GST_TIME_ARGS (GST_BUFFER_DURATION (inbuf)), ++ GST_BUFFER_OFFSET (inbuf), GST_BUFFER_OFFSET_END (inbuf)); ++ ++ /* check for timestamp discontinuities and flush/reset if needed */ ++ if (G_UNLIKELY (audioresample_check_discont (audioresample, timestamp))) { ++ /* Flush internal samples */ ++ audioresample_pushthrough (audioresample); ++ /* Inform downstream element about discontinuity */ ++ audioresample->need_discont = TRUE; ++ /* We want to recalculate the offset */ ++ audioresample->ts_offset = -1; ++ } + + if (audioresample->ts_offset == -1) { + /* if we don't know the initial offset yet, calculate it based on the +@@ -584,19 +642,21 @@ + if (GST_CLOCK_TIME_IS_VALID (timestamp)) { + GstClockTime stime; + +- /* offset used to calculate the timestamps. We use the sample offset for this +- * to make it more accurate. We want the first buffer to have the same timestamp +- * as the incomming timestamp. */ ++ /* offset used to calculate the timestamps. We use the sample offset for ++ * this to make it more accurate. We want the first buffer to have the ++ * same timestamp as the incoming timestamp. */ + audioresample->next_ts = timestamp; + audioresample->ts_offset = + gst_util_uint64_scale_int (timestamp, r->o_rate, GST_SECOND); +- /* offset used to set as the buffer offset, this offset is always relative +- * to the stream time, note that timestamp is not... */ ++ /* offset used to set as the buffer offset, this offset is always ++ * relative to the stream time, note that timestamp is not... */ + stime = (timestamp - base->segment.start) + base->segment.time; + audioresample->offset = + gst_util_uint64_scale_int (stime, r->o_rate, GST_SECOND); + } + } ++ audioresample->prev_ts = timestamp; ++ audioresample->prev_duration = GST_BUFFER_DURATION (inbuf); + + /* need to memdup, resample takes ownership. */ + datacopy = g_memdup (data, size); +@@ -618,17 +678,25 @@ + r = audioresample->resample; + + outsize = resample_get_output_size (r); +- if (outsize == 0) ++ if (outsize == 0) { ++ GST_DEBUG_OBJECT (audioresample, "no internal buffers needing flush"); + goto done; ++ } ++ ++ trans = GST_BASE_TRANSFORM (audioresample); + +- outbuf = gst_buffer_new_and_alloc (outsize); ++ res = gst_pad_alloc_buffer (trans->srcpad, GST_BUFFER_OFFSET_NONE, outsize, ++ GST_PAD_CAPS (trans->srcpad), &outbuf); ++ if (G_UNLIKELY (res != GST_FLOW_OK)) { ++ GST_WARNING_OBJECT (audioresample, "failed allocating buffer of %d bytes", ++ outsize); ++ goto done; ++ } + + res = audioresample_do_output (audioresample, outbuf); +- if (res != GST_FLOW_OK) ++ if (G_UNLIKELY (res != GST_FLOW_OK)) + goto done; + +- trans = GST_BASE_TRANSFORM (audioresample); +- + res = gst_pad_push (trans->srcpad, outbuf); + + done: +--- gst/audioresample/gstaudioresample.h 2006/06/01 19:19:50 1.6 ++++ gst/audioresample/gstaudioresample.h 2007/03/14 17:16:30 1.7 +@@ -53,10 +53,12 @@ + GstCaps *srccaps, *sinkcaps; + + gboolean passthru; ++ gboolean need_discont; + + guint64 offset; + guint64 ts_offset; + GstClockTime next_ts; ++ GstClockTime prev_ts, prev_duration; + int channels; + + int i_rate; + diff --git a/media-libs/gst-plugins-base/gst-plugins-base-0.10.12.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-0.10.12.ebuild new file mode 100644 index 000000000000..69552f2b14ae --- /dev/null +++ b/media-libs/gst-plugins-base/gst-plugins-base-0.10.12.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/gst-plugins-base/gst-plugins-base-0.10.12.ebuild,v 1.1 2007/03/16 10:11:28 zaheerm Exp $ + +# order is important, gnome2 after gst-plugins +inherit gst-plugins-base gst-plugins10 gnome2 eutils flag-o-matic libtool + +DESCRIPTION="Basepack of plugins for gstreamer" +HOMEPAGE="http://gstreamer.net/" +SRC_URI="http://gstreamer.freedesktop.org/src/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="alsa esd oss X xv" + +RDEPEND=">=dev-libs/glib-2.8 + >=media-libs/gstreamer-0.10.11 + >=dev-libs/liboil-0.3.8" +DEPEND="${RDEPEND} + >=sys-devel/gettext-0.11.5 + >=dev-util/pkgconfig-0.9" +PDEPEND="oss? ( >=media-plugins/gst-plugins-oss-0.10 ) + alsa? ( >=media-plugins/gst-plugins-alsa-0.10 ) + esd? ( >=media-plugins/gst-plugins-esd-0.10 ) + X? ( >=media-plugins/gst-plugins-x-0.10 ) + xv? ( >=media-plugins/gst-plugins-xvideo-0.10 )" + +DOCS="AUTHORS INSTALL README RELEASE TODO" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}.audioresample.patch +} + +src_compile() { + elibtoolize + + # gst doesnt handle optimisations well + strip-flags + replace-flags "-O3" "-O2" + filter-flags "-fprefetch-loop-arrays" # see bug 22249 + if use alpha || use amd64 || use ia64 || use hppa; then + append-flags -fPIC + fi + + gst-plugins-base_src_configure + + emake || die +} + +# override eclass +src_install() { + gnome2_src_install +} -- 2.26.2