Commit graph

107 commits

Author SHA1 Message Date
Wim Taymans
4fb67fb0da audioresample: fix for event handler change 2011-07-22 21:19:08 +02:00
Wim Taymans
40d567153a Merge branch 'master' into 0.11 2011-06-13 19:09:05 +02:00
David Schleef
4db89c82bb convert M_PI to G_PI, for msvc 2011-06-10 23:56:34 -07:00
Wim Taymans
0ac9bb7d99 Merge branch 'master' into 0.11
Conflicts:
	tests/examples/audio/Makefile.am
	tests/examples/v4l/Makefile.am
2011-06-10 12:14:57 +02:00
Tim-Philipp Müller
c692191c33 GST_PLUGINS_BASE_LIBS is not defined in -base. 2011-06-08 12:21:43 +01:00
Sebastian Dröge
a2162b07ad audioresample: Optimize transform_caps()
If the second and next caps structures are a subset of the already existing
transformed caps we can safely skip them because we would transform them to
the same caps again.
2011-05-27 14:31:02 +02:00
Sebastian Dröge
d8e0af1fc1 gst: Update for the GstBaseTransform::transform_caps() changes 2011-05-27 12:13:14 +02:00
Sebastian Dröge
318ed07598 Revert "-base_port to new query API"
This reverts commit c9f4e0676b.
2011-05-17 11:25:31 +02:00
Sebastian Dröge
2b9845e60f audioresample: Update for negotiation related API changes 2011-05-16 15:35:40 +02:00
Wim Taymans
94dfe80f71 -base: port to new SEGMENT API 2011-05-16 13:48:11 +02:00
Wim Taymans
c9f4e0676b -base_port to new query API 2011-05-10 18:39:07 +02:00
Wim Taymans
ec57868488 -base: don't use buffer caps
Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
2011-05-09 13:05:12 +02:00
Wim Taymans
86a4771f8e remove buffer_alloc 2011-04-29 13:28:17 +02:00
Wim Taymans
079c152e62 Merge branch 'master' into 0.11
Conflicts:
	gst/videoscale/gstvideoscale.c
2011-04-25 11:20:45 +02:00
Marc Plano-Lesay
2ccd243d55 audioresample: fix unused-but-set-variable warnings with gcc 4.6
https://bugzilla.gnome.org/show_bug.cgi?id=647294
2011-04-24 12:43:33 +01:00
Sebastian Dröge
fc4d766e28 audioresample: Remove filter-length property, it only existed for backward compatibility 2011-04-19 11:36:35 +02:00
Sebastian Dröge
f10a8f0986 gst: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:35:53 +02:00
Wim Taymans
6e160bed3d Merge branch 'master' into 0.11
Conflicts:
	android/alsa.mk
	android/app.mk
	android/app_plugin.mk
	android/audio.mk
	android/audioconvert.mk
	android/decodebin.mk
	android/decodebin2.mk
	android/gdp.mk
	android/interfaces.mk
	android/netbuffer.mk
	android/pbutils.mk
	android/playbin.mk
	android/queue2.mk
	android/riff.mk
	android/rtp.mk
	android/rtsp.mk
	android/sdp.mk
	android/tag.mk
	android/tcp.mk
	android/typefindfunctions.mk
	android/video.mk
2011-04-11 11:37:51 +02:00
Alessandro Decina
030f639a8e android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the
needed Android.mk files.
Androgenizer can be found here:
http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:23:21 +02:00
Havard Graff
8ff295a788 audioresample: Make src query MT-safe
It is possible that the element might be going down while the event arrives
2011-04-08 15:04:41 +02:00
Wim Taymans
4007076b55 Merge branch 'master' into 0.11
Conflicts:
	ext/theora/gsttheoraenc.c
2011-04-06 16:33:56 +02:00
Mark Nauwelaerts
5c8ed3bd47 audioresample: minor simplification
... which avoids crashing in the off-chance that structure == NULL.
2011-04-06 12:26:08 +02:00
Wim Taymans
3b03e23559 plugins: port some plugins to the new memory API 2011-03-27 16:35:28 +02:00
Leo Singer
5bfe1baab3 audioresample: corrected buffer duration calculation to account for nonzero initial timestamp
Since we calculate timestamps by:

  timestamp = t0 + (out samples) / (out rate)

and durations by:

  duration = ((out samples) + (processed samples)) / (out rate) - timestamp

if t0 is nonzero, this would simplify to

  duration = t0 + (processed samples) / (out rate).

This duration is too large by the amount t0.  We should have done:

  duration = t0 + ((out samples) + (processed samples)) / (out rate) - timestamp

so that

  duration = (processed samples) / (out rate).
2010-12-17 19:34:42 +01:00
Leo Singer
25a154be5f audioresample: changed num_gap_samples, num_nongap_samples from guint32 to guint64 so that gaps of greater than or equal to 2^32 samples do not cause integer overflow 2010-12-17 19:34:42 +01:00
Leo Singer
d6d2aa44ab audioresample: push half a history length, instead of a full history length, at end-of-stream so that output segment and input segment have same duration 2010-12-17 19:34:42 +01:00
Leo Singer
aac8b21678 audioresample: renamed count_gap, count_nongap to more descriptive num_gap_samples, num_nongap_samples 2010-12-17 19:34:42 +01:00
Leo Singer
6832b38527 audioresample: replaced void* with gpointer 2010-12-17 19:34:42 +01:00
Leo Singer
87f2422737 audioresample: initial filter transient discarded; unit tests passing 2010-12-17 19:34:41 +01:00
Leo Singer
b4cd3329a9 Revert "Revert "audioresample: Add GAP flag support""
This reverts commit 35c76b3409.

Conflicts:

	gst/audioresample/gstaudioresample.c
	gst/audioresample/gstaudioresample.h
2010-12-17 19:34:41 +01:00
Mark Nauwelaerts
93d68ec77d audioresample: relax discont checking slightly 2010-12-13 10:10:30 +01:00
Mark Nauwelaerts
a7cf165289 audioresample: provide as much valid output ts and offset as valid input
... by independently tracking time and offset, rather than having no offset
leading to no output ts.
2010-12-13 10:10:15 +01:00
Stefan Kost
83c14483ed various: add a missing G_PARAM_STATIC_STRINGS flag to object properties 2010-10-13 16:13:31 +03:00
Sebastian Dröge
35c76b3409 Revert "audioresample: Add GAP flag support"
This reverts commit 129af0d8e6.

This shouldn't be committed at all, it isn't ready and apparently
was in the wrong branch locally.
2010-09-15 11:28:29 +02:00
Leo Singer
129af0d8e6 audioresample: Add GAP flag support
Fixes bug #586570.
2010-09-15 11:01:45 +02:00
Tim-Philipp Müller
164a91d10d Fix build if orc is not installed
Orc is not a hard requirement. Things should still compile and
work without orc, but slow fallback code may be used in this
case. Fix up configure to not error out if orc is not installed
and wrap use of orc profiling in audioresample in #ifdefs.

Fixes #620136 some more.
2010-06-08 13:26:53 +01:00
David Schleef
e39e729a70 audioresample: convert from liboil to orc 2010-06-07 23:58:54 -07:00
Sebastian Dröge
6723bf429f audioresample: Update speex resampler to latest GIT 2009-11-10 12:22:27 +01:00
Robert Swain
fc56adc2e3 audioresample: fix printf variable type
Change printf variable type from %lu to %" G_GUINT64_FORMAT " as it
should be for guint64.

Fixes #596981
2009-10-06 22:37:00 +02:00
Sebastian Dröge
1e450f21f8 audioresample: Fix drain processing
In case we have to convert internally don't process output length input samples
but history length input samples.
2009-08-26 09:10:18 +02:00
Sebastian Dröge
2e585ac7ac audioresample: On the first buffer we need discont handling
Otherwise we won't get upstream timestamps and everything and all
output buffers would have -1 timestamps.
2009-08-26 09:10:18 +02:00
Kipp Cannon
86b4c51c8c audioresample: Fix buffer overflow when pushing the drain 2009-08-26 09:10:17 +02:00
Kipp Cannon
a69068d70d audioresample: Fix timestamp drift
Fixes bug #591934.
2009-08-26 09:10:17 +02:00
Edward Hervey
8cd1b5209b gst: Remove dead assignments and resulting unused variables 2009-08-08 15:54:02 +02:00
Kipp Cannon
4689acd68f audioresample: Take the output offsets from the input if possible
Fixes bug #588915.
2009-08-06 06:43:33 +02:00
David Schleef
1dae15d762 Run liboil benchmark multiple times
The statistics function requires multiple runs, otherwise
it causes a divide by zero error.
2009-05-22 17:34:56 -07:00
Edward Hervey
65c046b1ea audioresample: Don't drain remaining buffers after a flush.
If we were resetted (due to a flush), we can not drain the remaining
buffers since they would be pushed before a valid new newsegment event.
2009-05-19 11:20:19 +02:00
Jan Schmidt
02a7b31f0e audioresample: Fix buffer size transformations
When calculating the input/output buffer sizes in the transform_size function,
take the number of channels into account, so we don't end up calculating
a buffer size that only contains a partial number of audio frames.

Also, when going from output size to input size, round down rather than
up, so as to calculate the minimum number of samples that *might* yield
a buffer of the intended destination size.

Fixes: #580470 and #580952
2009-05-01 16:47:53 +01:00
René Stadler
22a69b49a3 audioresample: Fix unused variable in compilation with --disable-gst-debug
Fixes: #579668
2009-04-21 22:18:02 +01:00
Tim-Philipp Müller
d271c8de53 audioresample: fix negotiation so that upstream can actually fixate to downstream's rate
If one side has a preference for a particular sample rate or set of sample rates, we
should honour this in the caps we advertise and transform to and from, so that elements
actually know about the other side's sample rate preference and can negotiate to it
if supported. Also add unit test for this.
2009-04-01 15:36:38 +01:00