Commit graph

17 commits

Author SHA1 Message Date
Wim Taymans
5755e24379 queue2: Keep track of the seeking state
Set the seeking flag right before we send a seek event upstream and discard all
data untill we see a flush-stop again. We need to do this because we activate
the range that we seek to immediately after sending the seek event and it is
possible that we receive data in our chain function from before the seek
which would then be added to the wrong range resulting in data corruption.
2012-04-10 12:44:35 +02:00
Tim-Philipp Müller
cc279e6bdd queue2: use statically allocated GQueue 2011-11-03 22:41:13 +00:00
Mark Nauwelaerts
fe1dcbe6fa queue2: adjust input data rate estimation
... being aware of possible initial higher burst rate.
2011-05-16 12:20:51 +02:00
Edward Hervey
8a79c1aa98 queue2: Avoid useless segment_to_running_time() calculations.
* Cache src and sink time
* Use a boolean to known whether src/sink time needs to be recalculated

Avoids 50% of calls to gst_segment_to_running_time()
2010-12-02 19:04:56 +01:00
Sebastian Dröge
e554c7a1f6 queue2: Remove redundant variable
Other than saving an immense amount of 4 bytes of memory this
prevents clang from complaining and keeps the ring buffer state
in a single variable instead of two.
2010-12-02 19:02:08 +01:00
Tim-Philipp Müller
ce35fb79da queue2: don't send seeks beyond the end of the file upstream in pull mode
If downstream is operating in pull mode, short-circuit any pulls beyond
the end of the file and return FLOW_UNEXPECTED immediately instead of
sending a seek beyond the end of the file upstream, since this might
confuse upstream elements (and/or http servers, for example). Fixes
playback of apple trailers in totem and youtube/html5 clips in
WebkitGTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=632977
2010-11-01 12:34:15 +00:00
Robert Swain
9df54eb4ff queue2: extend ring buffer to support ram mode 2010-08-13 16:38:57 +02:00
Wim Taymans
ecd8d3be3a queue2: remove unused variable 2010-08-13 16:38:56 +02:00
Robert Swain
d1809558e5 queue2: ring buffer work in progress 2010-08-13 16:38:51 +02:00
Robert Swain
f093707189 queue2: Add use-ring-buffer and ring-buffer-max-size properties 2010-08-13 16:38:50 +02:00
Wim Taymans
bf1f6969bb queue2: add the buffering percent in BUFFERING query 2010-03-25 17:38:02 +01:00
Wim Taymans
11304c1257 queue2: implement flushing in download buffering
Maintain a separate variable to control src and sink flowreturn values so that
we can unlock the src part without shutting down the sink part.
Add flushing for upstream pull based elements that unblocks our getrange
function. This implements seeking when blocking for more data.
Add some arbitrary threshold before attempting a seek. Add a FIXME for this
because we need to find a sensible threshold based on the input rate.
2010-03-24 19:03:44 +01:00
Wim Taymans
3f4f5fa59d queue2: implement seeking in download mode
When in download mode and the requested offset is too far away, attempt to do a
seek request to fetch the data.
Keep track of all downloaded parts and merge ranges when needed.

Fixes #600877
2010-03-23 19:28:34 +01:00
Wim Taymans
183ffdc126 queue2: add option to remove the temp-file
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
2010-01-22 17:58:07 +01:00
Stefan Kost
69ea131cfa build: include stdio.h for FILE 2009-11-03 17:30:14 +02:00
Sebastian Dröge
40732dd308 queue2: Integrate into coreplugins 2009-10-29 11:30:11 +01:00
Sebastian Dröge
08e3cb531c queue2: Move struct declarations to a separate header 2009-10-29 11:21:36 +01:00