* pop_on mode requires incrementing the frame timestamp until
end_of_caption is encountered.
* caption_frame_decode now always updates the timestamp of the
frame when the timestamp parameter != -1. This requires that callers
only pass a valid timestamp when a new one is encountered, for
example with SCC the timestamp at the start of the cue, then -1
until the next new timestamp.
* A new enum member is added for the return value, LIBCAPTION_CLEAR.
It allows the caller to determine that closed captions should not
be displayed anymore, in order to finish the previous cue earlier
than the start of the next cue.
Whenever a new sticky event arrives we must make sure to forward it
downstream before the next buffer.
Also make sure to unlock all our mutexes when they're not needed
anymore.
Instead of directly forwarding the list, handle each buffer separately
for now. Previously we would directly forward the lists from any pad,
including inactive ones, downstream.
GstElementClass.release_pad() may be called after the element
has transitioned back to NULL, we need to keep our sink_pads
map around until then.
They should also not be affected by state transitions at all but only be
removed once the user does so or the element is destroyed, so they need
to live independent of the state.
Replaces the RTPJitterBufferItem.get_buffer() method with an
into_buffer() version, ensuring that when we make it mutable we
don't make a copy (unless necessary)
The biggest changes are
- Many functions are not asynchronous anymore as it would be difficult
to run them correctly with our mix of synchronous C code and Rust
code.
- The pad context and its corresponding custom event are gone and
instead thread local storage and task local storage are used. This
makes it easier to correctly pass it through the different layers
of Rust and C code and back.
- Sink events have a different function for serialized and oob events,
src events are handled correctly by default now by simply forwarding
them.
- Task::prepare() has a separate variant that takes a preparation
function as this is a very common task.
- The task loop function can signal via its return value if it wants to
be called again or not.
When a new payload type is encountered, we first check whether
it matches the caps received as an event before emitting the
request-pt-map signal if not, which means we shouldn't consider
errors from the first call to parse_caps as fatal.
- Implemented a simple gif encoder based on the rust crate "gif".
- Currently supported input pixel formats are RGB and RGBA
- The encoder dynamically changes frame delays to approximate the actual
input framerate
- For the moment, each frame uses its own local colorpalette, leading to
good image quality, but big files
- Every frame is currently a full frame. No incremental frames for now
- The produced GIF is currently compressed (LZW)
When emptying the pending queue, we need to break as soon as
as we failed to push an item to the data queue, otherwise only
the last failed item is pushed back to the front of the pending
queue, and all the previously failed items in the loop get
discarded