Element base_time is a signed quantity, which leads to basesink returning
a position of 0 when dealing with a negative base time - which are quite
legal when clocks (such as the audio clock) are close to 0.
This doesn't manifest in normal pipelines, of course - but can happen
(at least) when manually setting the base time on a pipeline.
This returns the internal feature list cookie, which changes every
time a feature is added or removed. This can be used by elements
to check if they should update their cached feature lists.
Cast the variable to gint to conform to the printf format used.
It is casted rather than changing the format because the
message is created with a cast to gint too.
queue2 would crash when using small buffer sizes because
it would overflow when calculating the percentage, resulting
in the buffering GstMessage not being created and trying to be
used. This patch uses a gint64 instead of a gint to do the
percentage math, making it harder to overflow.
If no plugin is given, print the info for all plugins. This can be used as a
starting point to generate a profile about what the gstreamer installation can
potentialy handle (e.g. for MTP or DLNA).
Check if we've been interrupted only four times per second instead
of twenty times per second, to wake up the cpu less often and
save power (see bug #600922).
Force printf format checking for debug messages if GST_DISABLE_PRINTF_EXTENSION
is defined. This is useful to quickly check code for printf format mismatches
in debugging messages that would usually not be caught (with glibc+gcc and
printf extensions being used).
To use: make clean; make CFLAGS='-g -O2 -DGST_DISABLE_PRINTF_EXTENSION'
Using the current fill level of the queue, and the average input
rate, we can determine how long it will take to finish downloading
the whole stream to the temporary file.
Fixes#600726
The logic to handle short reads/writes was incorrect, causing the
packet handler to attempt to handle incomplete packets.
Grow the packet transmit buffer in proportion to observed usage,
causing fewer reallocs.
Add some more debug in the registry chunks code.
When invalid registry chunks are received from the child, and parsing
fails, don't access an invalid plugin pointer. Instead attempt to
figure out which plugin caused the problem and blacklist it.
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a sixteenth of a polar bear.
If a downstream element returns an error while upstream has already
put all data into queue2 (including EOS), upstream will no longer
chain into queue2, so it is up to queue2 to perform some
EOS handling / message posting in such cases. See #589991.
Keep track of the max requested position and compare this to the write position
in the temp file to get the current amount of buffered data.
Fix memleak of all incomming buffers.
Fixes#588551