Updated gst_segment_position_from_stream_time and gst_segment_to_stream_time to reflect correct calculations for the case when the applied rate is negative.
Pasting from design docs:
===============================
Stream time is calculated using the buffer times and the preceding SEGMENT
event as follows:
stream_time = (B.timestamp - S.start) * ABS (S.applied_rate) + S.time
For negative rates, B.timestamp will go backwards from S.stop to S.start,
making the stream time go backwards.
===============================
Therefore, the calculation for applied_rate < 0 should be:
stream_time = (S.stop - B.timestamp) * ABS (S.applied_rate) + S.time
and the reverse:
B.timestamp = S.stop - (stream_time - S.time) / ABS (S.applied_rate)
https://bugzilla.gnome.org/show_bug.cgi?id=756810
An ASYNC READY->PAUSED might have failed without the bin code noticing during
the state change, in which case we will never get PAUSED->READY and would leak
messages.
https://bugzilla.gnome.org/show_bug.cgi?id=756611
Previously this code was just blindly setting the cached flow return
of downstream to GST_FLOW_OK when we get a SEGMENT.
The problem is that this can not be done blindly. If downstream was
not linked, the corresponding sinqlequeue source pad thread might be
waiting for the next ID to be woken up upon.
By blindly setting the cached return value to GST_FLOW_OK, and if that
stream was the only one that was NOT_LINKED, then the next time we
check (from any other thread) to see if we need to wake up a source pad
thread ... we won't even try, because none of the cached flow return
are equal to GST_FLOW_NOT_LINKED.
This would result in that thread never being woken up
https://bugzilla.gnome.org/show_bug.cgi?id=756645
The previous change (see bgo #756069) was causing us to free the same pointer
multiple times. If we actually get a sample back, the test fails, no need to
free anything in that case.
In file included from gst-ptp-helper.c:40:0:
/usr/include/net/if.h:265:19: error: field 'ifru_addr' has incomplete type
struct sockaddr ifru_addr;
https://bugzilla.gnome.org/show_bug.cgi?id=756136
Broke this when I removed the G_GNUC_PRINTF in a previous
commit to fix indentation, since it was not really needed.
Turns out unlike gcc clang warns though if a non-literal
format string is passed then. Fix indentation differently.
http://clang.llvm.org/docs/AttributeReference.html#format-gnu-format
Iterator may need to be resynced, for instance if pads are released
during state change.
got_eos should be protected by the object lock of the element, not of
the pad, as is the case throughout the rest of the funnel code.
https://bugzilla.gnome.org/show_bug.cgi?id=755343
This fixes a race where a state change may return failure if it has
request pads that are deactivated and removed (and thus have no
parent) at the same time as the element changes state and (de)activates
its pads.
https://bugzilla.gnome.org/show_bug.cgi?id=755342
After doing gst_pad_push() in case of sync_streams and cache_buffers,
if the buffer can not be kept in cache, it should be unreffed to avoid
memory leackage.
https://bugzilla.gnome.org/show_bug.cgi?id=755141
In order for gst_harness_new_full to be MT-safe the increase and
decrease of HARNESS_REF must be MT-safe. This allows for creating
multiple harnesses from different threads wrapping the same element.
https://bugzilla.gnome.org/show_bug.cgi?id=754661
This caused problems with oggdemux when queue2 was
operating in queue mode and the souphttpsrc upstream
is not seekable because the server doesn't support
range requests. It would then still claim seekability
and then things go wrong from there.
This reverts commit 7b0b93dafe.
https://bugzilla.gnome.org/show_bug.cgi?id=753887
1. Get a list of pad templates from the element class, not the
factory. This allows us to interact with test-elements that does
not have a factory.
2. Use the pad_template_caps in caps-queries when caps is not set
explicitly on the pad. Not doing so is simply wrong, and prohibits
interactions with special templates used for testing.
https://bugzilla.gnome.org/show_bug.cgi?id=754193
There exist cases where a reconfigure event was propagated from
downstream, but caps didn't change. In this case, we would
reconfigure only when the next buffer arrives. The problem is that
due to the allocation query being cached, the return query parameters
endup outdated.
In this patch we refactor the reconfigurating code into a function, and
along with reconfiguring when a new buffer comes in, we also reconfigure
when a query allocation arrives.
https://bugzilla.gnome.org/show_bug.cgi?id=753850
As this test is using a short sleep (GST_USECOND, which is 10ms
in microsecond), sometimes that EOS event is received before the
loop in basesrc have run _do_seek() and pushed the update segment.
To solve this issue, we wait for the initial segment (and flush it)
then we wait for the second segment before sending EOS.
https://bugzilla.gnome.org/show_bug.cgi?id=753365