First of all a keyframe seek should be done to the
keyframe right before the requested position and not
to the keyframe that is nearest to the requested position.
Use per track index arrays and use our new binary search function
from core to speed up the search.
It was previously sending the bogus buffer which was returned from
the bufferalloc (required for reverse negotiation apparently) instead
of the pending buffer.
This allows to set the Referer header among other things by
adding a "extra-headers" property that takes a GstStructure
with field=string pairs.
Fixes bug #581806.
Rewrite the quant table parsing to also handle multiple tables in one JPEG HDQ
segment.
Handle more jpeg types by keeping track of the tables used per component and
putting the used ones in the quant headers.
Store the offset and caps when allocating a buffer during seeking, and then
allocate a new buffer with buffer_alloc before we push it out. This ensures
that in all respects the first buffer decoded during seeking behaves like
all other buffers, including allowing downstream re-negotiation.
Read the timestamp of the incomming buffer before we push it in the adapter and
flush it out again as the buffer might be unreffed then and we read from invalid
memory.
Fixes#581444.
Don't require width/height on the caps. Use the SOF header to find width/height
and fall back to the caps if there is no SOF. Also use the SOF info to find the
subsampling and quantization tables used. This allows us to set the right type
value in the JPEG rtp header.
Deprecate the quality property, it's unused now and it was used wrongly before.
Always send full quant tables for now until we have some code to detect default
ones.
Fixes#580880
Use the width and the height from the payload headers and set them on the
output caps for added awesomeness.
Fix quant parsing, we need to check the type in the lower 6 bits.
Add first bits of caching quantization tables.
The libjpeg api says that we need to set the colorspace before we call
_set_defaults(). Indeed, if we don't do that we end up with some very freaky
non-standard quant table and huffman table indexes.
Server eof (e.g. connection closed) is announced as connection closed,
so better record state and act accordingly to prevent (read/write)
errors during subsequent teardown/cleanup sequences. #Fixes 580851.(c).