gst-plugins-rs/video/closedcaption/src
Mathieu Duponchelle 17d7997137 transcriberbin: add support for consuming secondary audio streams
In some situations, a translated alternate audio stream for a content
might be available.

Instead of going through transcription and translation of the original
audio stream, it may be preferrable for accuracy purposes to simply
transcribe the secondary audio stream.

This MR adds support for doing just that:

* Secondary audio sink pads can be requested as "sink_audio_%u"

* Sometimes audio source pads are added at that point to pass through
  the audio, as "src_audio_%u"

* The main transcription bin now contains per-input stream transcription
  bins. Those can be individually controlled through properties on the
  sink pads, for instance translation-languages can be dynamically set
  per audio stream

* Some properties that originally existed on the main element still
  remain, but are now simply mapped to the always audio sink pad

* Releasing of secondary sink pads is nominally implemented, but not
  tested in states other than NULL

An example launch line for this would be:

```
$ gst-launch-1.0 transcriberbin name=transcriberbin latency=8000 accumulate-time=0 \
      cc-caps="closedcaption/x-cea-708, format=cc_data" sink_audio_0::language-code="es-US" \
      sink_audio_0::translation-languages="languages, transcript=cc3"
    uridecodebin uri=file:///home/meh/Music/chaplin.mkv name=d
      d. ! videoconvert ! transcriberbin.sink_video
      d. ! clocksync ! audioconvert ! transcriberbin.sink_audio
      transcriberbin.src_video ! cea608overlay field=1 ! videoconvert ! autovideosink \
      transcriberbin.src_audio ! audioconvert ! fakesink \
    uridecodebin uri=file:///home/meh/Music/chaplin-spanish.webm name=d2 \
      d2. ! audioconvert ! transcriberbin.sink_audio_0 \
      transcriberbin.src_audio_0 ! fakesink
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1546>
2024-04-25 11:56:01 +02:00
..
ccdetect Use once_cell crate directly again 2024-01-31 18:07:57 +02:00
cea608overlay cea608overlay: Fix black-background setting 2024-04-15 15:38:31 +00:00
cea608tocea708 closedcaption: use cea608-types for parsing 608 captions instead of libcaption 2024-04-05 19:29:24 +11:00
cea608tojson closedcaption: use cea608-types for parsing 608 captions instead of libcaption 2024-04-05 19:29:24 +11:00
cea608tott cea608tott: use our own CEA-608 frame handling instead of libcaption 2024-04-05 19:29:24 +11:00
cea708mux cea708mux: add element muxing multiple 708 caption services together 2024-03-28 13:46:28 +11:00
cea708overlay closedcaption: implement cea708overlay element 2024-04-10 06:55:34 +00:00
jsontovtt Use once_cell crate directly again 2024-01-31 18:07:57 +02:00
mcc_enc Use once_cell crate directly again 2024-01-31 18:07:57 +02:00
mcc_parse Fix clippy warnings after upgrade to Rust 1.77 2024-03-21 17:33:32 +00:00
scc_enc Use once_cell crate directly again 2024-01-31 18:07:57 +02:00
scc_parse Fix clippy warnings after upgrade to Rust 1.77 2024-03-21 17:33:32 +00:00
transcriberbin transcriberbin: add support for consuming secondary audio streams 2024-04-25 11:56:01 +02:00
tttocea608 closedcaption: use cea608-types for parsing 608 captions instead of libcaption 2024-04-05 19:29:24 +11:00
tttocea708 closedcaption: use cea608-types for parsing 608 captions instead of libcaption 2024-04-05 19:29:24 +11:00
tttojson Use once_cell crate directly again 2024-01-31 18:07:57 +02:00
ccutils.rs closedcaption: implement cea708overlay element 2024-04-10 06:55:34 +00:00
cea608utils.rs cea608overlay: move Send impl lower in the stack 2024-04-10 06:55:34 +00:00
cea708utils.rs closedcaption: implement cea708overlay element 2024-04-10 06:55:34 +00:00
lib.rs closedcaption: implement cea708overlay element 2024-04-10 06:55:34 +00:00
line_reader.rs Provide explicit type to Iterator::sum() calls to avoid ambiguity 2022-11-17 10:16:26 +02:00
parser_utils.rs closedcaption: Port from nom to winnow 2024-02-26 14:00:08 +02:00
ttutils.rs tttocea608: move functionality to a separate object 2024-03-28 13:46:28 +11:00