When max is GST_CLOCK_TIME_NONE in the query, it should not
be set in the query handler, this otherwise could lead to
impossible situations, where the minimum latency ended up
greater than the maximum.
https://bugzilla.gnome.org/show_bug.cgi?id=796603
The flush function immediately returned when pitch->next_buffer_offset
was 0.
This is clearly wrong, as next_buffer_offset can be 0 when a single
input buffer has been received, and no output buffer has been produced
before receiving EOS.
Simply remove that condition.
https://bugzilla.gnome.org/show_bug.cgi?id=796603
The segment is transformed to match the pitch conversion
being applied, so make sure the timestamps being output
match the configured downstream segment accordingly, and
adjust the downstream segment position to match the stream time
ratio also.
There's no guarantee whatsoever that the first buffer to output will
start at the segment.start.
Instead, wait for the first buffer after a segment, and use that timestamp
Absorb inbound segments with rate != 1.0 and output a segment with
rate taken from the new output-rate property, adjusting the segment
applied_rate, stream duration and timestamps as necessary to
compensate
Because config.h defines __MSVCRT_VERSION__, which should be defined
before inclusion of any system header.
Also fixes mpegdemux Makefile.am LIBADD typo.
Fixes#606665
Original commit message from CVS:
* ext/soundtouch/gstpitch.cc:
* ext/soundtouch/gstpitch.hh:
Implement LATENCY query and notify about latency changes.
Unfortunately we don't have a fixed latency but it changes
a bit with each buffer so we only send an LATENCY event with
the maximum latency if it changes.
Always calculate the timestamp, duration, etc from the sample
rate instead of using a pre-calculated duration for one sample
to prevent large rounding errors.
Original commit message from CVS:
* ext/soundtouch/Makefile.am:
* ext/soundtouch/gstbpmdetect.cc:
* ext/soundtouch/gstbpmdetect.hh:
* ext/soundtouch/plugin.c: (plugin_init):
Add BPM detection plugin based on SoundTouch's libBPM.
* ext/soundtouch/gstpitch.cc:
Allow sample rates until MAX instead of only 48kHz and remove the
buffer-frames field from that caps.
Clear the remaining samples completely when necessary to get into
a clean state again.
Original commit message from CVS:
* ext/soundtouch/gstpitch.cc:
Allow seeking only in TIME and DEFAULT format, other formats will
not work as expected. Also handle a stop position of -1 correctly
for seeks, newsegment events and the queries. This fixes playback
with the pitch element if upstream doesn't know the duration or has
-1 as stop position in NEWSEGMENT events for other reasons. Before
simply nothing was played as the segment was going from 0 to 0.
Send a GST_MESSAGE_DURATION whenever the rate or tempo is changed
so applications can update their cached duration. Fixes bug #503308.
Some random cleanup and memory leak closing.
Original commit message from CVS:
* configure.ac:
* ext/soundtouch/gstpitch.cc:
Add support for libsoundtouch 1.3.1 and add an ugly workaround for
the header definined PACKAGE and other variables for which we need
our own values from config.h.
Original commit message from CVS:
* configure.ac:
Require core CVS. This is implicit in the -base CVS
requirement already, so we might just well spell it
out. Also, we do need at least 0.10.14 for
gst_element_class_set_details_simple(). Make check
for gmyth a bit more restrictive so things don't break
if the next version changes API.
* ext/alsaspdif/alsaspdifsink.c:
Work around alsa alloca macros triggering 'always evaluates to
true' warnings with gcc-4.2 and fix compilation with gcc-4.2.
Also don't leak the device string.
* ext/mpeg2enc/gstmpeg2enc.cc:
* ext/soundtouch/gstpitch.cc:
* gst/modplug/gstmodplug.cc:
Fix compilation with g++4.2 and -Wall -Werror (also needs plugin
define fix from core CVS). Fixes#462737.
Original commit message from CVS:
* ext/soundtouch/gstpitch.cc:
If we receive a new segment event, don't try to push buffers out
in response (without first sending it on!).
Instead, flush internal buffers on receiving flush events.
Fixes playback after seeking.
Original commit message from CVS:
Patch by: Wouter Paesen <wouter at kangaroot net>
* ext/soundtouch/Makefile.am:
* ext/soundtouch/gstpitch.cc:
Make pitch element controllable via GstController interface
(#344821).
* configure.ac:
Up core requirements to 0.10.8.1/CVS because earlier
GstControllers can't handle float properties correctly.
Check for GstController CFLAGS and LIBS.
* tests/icles/Makefile.am:
* tests/icles/pitch-test.c: (main):
Add small test program for the above (welcome to the 80s!).