When stopping `ts-queue` & `ts-proxysink`, the pending queue is removed. There
is a short period of time when a buffer can be handled after the pending queue
is removed but before the element is actually stopped. Since the dataqueue no
longer accepts buffers and the pending queue is removed, a new pending queue was
created and the element was set to wait for queue space.
The stopping procedure is handled with `last_res` `Mutex` locked and set to
`Flushing`.
This commit adds a check to `last_res` before creating a new pending queue and
aborts if the element is `Flushing`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2428>
hlscmafsink already uses version 6 as use of tags like EXT-X-MAP
require version 5 and above.
As per RFC 8216, the value of EXT-X-VERSION tag (Section 4.3.1.2)
SHOULD NOT be greater than what is required for the tags & attributes
in the Playlist (see Section 7).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2415>
This can be useful when muxing in an original caption stream with
a newly-created one (eg transcription / translation), in which case one
might wish to discard select services from the original stream in order
to avoid garbled captions.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2389>
- add the handler for session-request signal from the signaller
to initiate an offer
- rename `handle_offer` function as `handle_remote_description` to use
if for the both remote offer and answer.
- in the function `remote_description_set` add checks to deal with answer and
offer separately
- in the session-description signal handler, call the handle_remote_description
for both offer and answer type remote description
- add a new member clock_rate in the Codec struct which is determined from the depayloader
pad templates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1545>
The threadshare async Task doesn't cancel a currently running iteration. If the
streaming thread is blocked, the iteration will not return blocking the state
change.
This commit skips the `pause` transition for the src elements, so a blocked
iteration can be interrupted transitioning to `Stop`.
Also make sure the stop transition is called chaining the state change up.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2380>
Users can now update the `inter-context` property of a `ts-intersrc`, which will
disconnect from the `ts-intersink` associated with previous value of
`inter-context` and attempt to connect to the `ts-intersink` associated with the
new value.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2378>
This commit implements optimizations to reduce the number of threads and
context switches necessary to handle items on src Pads.
1. A single task for all src pads in a session
Instead of starting one pad task (thread) per src pad in a session, we can
spawn a single async task that dequeues all ready items out of the jitter
buffers and pushes them to their respective src pads.
2. Handle downstream-travelling items immediately when possible
It is possible to immediately handle downstream-travelling items without queuing
them in the jitter buffer:
* for an RTP packet, if the packet is the next packet that we were expecting
and the src Pad's jitter buffer is empty.
* for a downstream query or event if the src Pad's jitter buffer is empty.
Otherwise, the item needs to be enqueued in the jitter buffer.
3. Making sure the above strategies play well together
If a jitter buffer is empty because the src pad task just dequeued items,
the sink pad might push incoming items before the src pad task had time to push
the dequeued items, which would break ordering.
In order to avoid this situation, each src pad uses a semaphore which is held
from the moment when the sink pad or the src pad makes decisions regarding the
jitter buffer and hold it as long as necessary so as to guarantee ordering.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2346>