cea608mux is set to force-live=true, which means it will not wait for a
first buffer to select a start time.
There was however a problem when manually syncing the state of its
containing bin as we do: when doing so while the state of the containing
bin is still transitioning to Playing, the element first gets a 0 base
time distributed, before its containing bin finally gets the correct
base time and redistributes it.
In this interval cea608mux could pick a start time, then end up waiting
for ever to timeout.
This commit works around the issue by simply unlocking the state of the
inner bins but not syncing it when in Paused, as the subsequent state
change to Playing, if it happens, will trigger the state change of the
elements anyway.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2115>
with recent enough cccombiner.
Originally, dropping transcriptions was enough to support
caption-source=inband, as cccombiner did not implement output
scheduling.
However now that it does, even if no captions arrive on the caption pad
the combiner will still output padding.
Recent-enough combiners however expose an `input-meta-processing`
property which lets us achieve the desired behavior, we thus make use of
it when available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2115>
Previously, transcriberbin only supported updating translation languages
while playing by resetting the state of the transcriber to NULL
beforehand, as for instance the speechmatics transcriber needs to
reestablish a connection to request new languages.
Now that translationbin exists, we can request new languages without
restarting the transcriber (this commit also implements support for this
in translationbin).
There is some code duplication as the old method still needs to be
supported, and not all code was trivially factorizable, but after some
refactoring most of the code for updating languages is shared
nevertheless.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2072>
As stated in the spec:
> Bit b7 of the LINE value is the field number (0 for field 2;
> 1 for field 1). Bits b6 and b5 are 0. Bits b4-b0 form a 5-bit unsigned
> integer which represents the offset [..]
Here, b7 is the most significant bit, this is what both cccombiner
and ccconverter agree on.
The overlay elements previously looked at the least significant bit,
which led to garbled text when both fields were actually present
in the CC meta.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2069>
The original awstranscribe element has grown too complex when
integrating translations for reasons that in retrospect were wrong:
As awstranscribe outputs words one by one, I decided we wanted to
perform translations there with larger sentences if available, but an
alternative design where a separate translation element is composed
downstream is also possible, as long as that element accumulates words
and enough latency is set on the transcriber.
An important difference is that the new elements do not expose unsynced
pads, this use case is instead now served by simple messages on the bus.
The elements should otherwise be at feature parity with the original
element.
A higher-level bin is also provided for convenience (and usage within
transcriberbin): translationbin.
A transcriber element can be provided to this bin, which exposes an
always audio sink pad, and an always text sink pad (for the
transcripts).
Additional source pads can be requested for translations, for now the
bin always uses `awstranslate` as the translator, but this can be made
configurable.
This element is usable as a transcriber in `transcriberbin`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2055>
As the application expects to have the bin buffer the audio stream
internally and output it again unchanged, and transcribers might
expect a set number of channels, we need to expose a property to
let the user control how to downmix the audio stream teed through
the transcriber.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1969>