Add an option to automatically remove the temp file (TRUE by default). This
should make it possible for the application to keep the temp file by other means
than hardlinking or holding an fd open.
Fixes#607739
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.
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