Post the structure change messages on the sinkpads of the elements. This allows
us to catch unlinked pads earlier without ending up with inconsistent element
degrees.
When we detect a pad unlink in progress, we will not be updating the degree of
the parent element. This can cause false loop detected warnings because the
degree counter is invalid. Handle this case by marking the iterator as 'dirty'
when we detect a pad unlink and avoid emiting the warning in this case. We have
to continue our state change as good as we can, we will eventually resync when
the pad unlink completed.
When an element is added to the bin, only set the index if we have a
cached index, rather than setting a NULL index on elements that might
have a default index object of their own.
elementfactory field is filled in by gst_element_base_class_init,
but it needs some info set on the element's type, so have it
available prior to class structure creation spinning up.
This affects elements that have a well-known/public type (e.g. pipeline)
and can be created by other means than gst_element_factory_make
(which will also fill in the element's factory).
Cache the last index that was set with _set_index() and return this in the
_get_index() call.
Set the cached index on newly added elements.
Fixes#566881
Based on clock implementation by Håvard Graff <havard.graff@tandberg.com>
Try to get the time on windows using the performance counters. These have a much
higher resolution and accuracy than the regular getcurrenttime(). Be careful to
fall back to regular getcurrenttime() or posix clocks when performance counters
are not available.
We can use a shift for scaling the denominator instead of a divide since the
denom is always positive. This avoids having the compiler generate code for the
different rounding rules when scaling negative values.
64bit x86 has native 64x64->128 bit multiply that we can use with some inline
assembler to speed up large multiplications.
Use bsr to find the number of leading zeros more efficiently.
The internal links function is deprecated since some time and
there already were GST_REMOVE_DEPRECATED markers in the source file,
now add them to the header too.
Fixes bug #592209.
Before the signal handler would get the ghostpad passed as second
argument but it could've already been unreffed and destroyed.
This would then lead to crashes and all that.
Now we get the ghostpad from the proxy pad, which we get from the
target pad as it's peer.
Fixes bug #591318.
The new functions are
gst_util_uint64_scale_int_round()
gst_util_uint64_scale_int_ceil()
gst_util_uint64_scale_round()
gst_util_uint64_scale_ceil()
Fixes bug #590919.
Before it returned that [start,stop] is inside the segment and that the
difference between segment_start and start needs to be clipped. If the
clipping is done on a buffer (like in baseaudiosink) this will result
in the data pointer being at a invalid memory position.
Fixes bug #589849.
Check for metadata writability when setting caps on buffer or when copying
metadata flags. Only enable these extra assertions in git versions.
This should help us find bad elements.
Often we don't need the result of the intersection. Add a variant that only
tries to intersect. It can break out earlier and does less GValue copying.
API: gst_caps_can_intersect()