Mathieu Duponchelle
7d26990d4a
tttocea608: insert carriage returns on speaker changes
...
This improves readability with speaker-detection capable elements
upstream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2055 >
2025-02-10 11:16:44 +00:00
Carlos Bentzen
7e2a4cf61c
cdg: fix typefind error with specific file sizes
...
Currently, the typefind logic for cdg can cause errors on files
with all conditions below:
- size multiple of NB_WINDOWS * CDG_PACKET_SIZE (8 * 24) = 192
- size less than TYPEFIND_SEARCH_WINDOW (28800)
- extension different than .cdg
With those conditions, the cdg typefind function may be the last one to
execute and cause gsttypefindhelper.c::helper_find_peek to return
GST_FLOW_EOS, and if it's the final call will then be turned to
GST_FLOW_ERROR in typefind.
That is because cdg's typefind will perform a last call to
typefind.peek(len, CDG_PACKET_SIZE) which is outside the range of typefind
(from 0 to len - 1).
Reproducer with file from cdg tests:
```
head -n 28608 BrotherJohn.cdg > BrotherJohn_short.bit
gst-play-1.0 BrotherJohn_short.bit
```
Fix this by correcting the loop bounds in the cdg typefind
logic. Perhaps the typefind helper logic should be rewritten to avoid
such cases too.
Then the example above works and unrelated files aren't affected by this
in typefind anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2056 >
2025-02-03 06:32:43 +00:00
Matthew Waters
5c7ab9b491
closedcaption: fix roll up mode not always using the correct base row
...
The row used in roll up mode was inconsistently referenced (row vs base_row)
and could result in incorrect output being produced.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2051 >
2025-01-28 22:22:49 +00:00
Matthew Waters
12811f9bc3
closedcaption/608overlay: add some debug loggin when resets occur
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2051 >
2025-01-28 22:22:49 +00:00
Matthew Waters
4f4f84a615
cea608overlay: ensure tha the list of lines remains sorted by line number
...
Otherwise, when iterating over the lines, they may be written out of order.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2051 >
2025-01-28 22:22:49 +00:00
Mathieu Duponchelle
cf40739da9
transcriberbin: forward sticky events on unsynced source pads
...
This way an application can tell the language code right away at
pad-added time.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2029 >
2025-01-20 14:27:05 +00:00
Sebastian Dröge
261211886f
ffv1: Update to a newer git revision of the codec implementation
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2045 >
2025-01-20 13:58:06 +02:00
Sebastian Dröge
3a03310dbc
mccparse: Switch away from deprecated winnow API
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2040 >
2025-01-14 10:43:40 +02:00
Sebastian Dröge
7b4665c793
Fix some new clippy 1.84 warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2032 >
2025-01-10 10:08:38 +02:00
Mathieu Duponchelle
69f927cc24
transcriberbin: expose subtitle-languages property
...
Similar to synthesis-languages, except that transcriberbin will not
place a textwrap element before the synthesizer, instead letting the
application do that itself if needed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2015 >
2025-01-08 12:26:22 +00:00
Mathieu Duponchelle
70ed528c7a
transcriberbin: fix casing of translation languages
...
The language should only be lowercased in order to compare it to cc1 /
cc3, but should be passed as is to the transcriber.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2027 >
2025-01-06 16:59:11 +01:00
Tim-Philipp Müller
95d0563b80
closedcaption: add some docs for the new SMPTE-2038 elements
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2019 >
2025-01-03 10:40:40 +00:00
Mathieu Duponchelle
35a621a53b
transcriberbin: fix deadlock on taking settings lock
...
This fixes both a double lock in a case, and in all cases an
out-of-order lock (element settings must always be locked before
pad settings).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2004 >
2024-12-20 17:13:08 +00:00
Sebastian Dröge
0d8dc1c156
cea608tott: Fix expected test output with cea608-types 0.1.4
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2001 >
2024-12-20 16:57:07 +02:00
Mathieu Duponchelle
026a2a11eb
transcriberbin: improve usage of framerate field
...
Use the framerate from our video caps as early as possible in the
pipeline, that is just downstream of the tttoceax08 elements.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1997 >
2024-12-19 13:55:20 +01:00
Mathieu Duponchelle
666aba0a58
transcriberbin: query latency of synthesis elements ..
...
instead of expecting that they expose a "latency" property.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1993 >
2024-12-18 18:04:53 +00:00
Matthew Waters
497b1e58bd
cea708overlay: support changing the safe title area
...
By default it is 80% of the output size as recommended by CEA-708/608.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1985 >
2024-12-18 12:57:49 +00:00
Matthew Waters
b367b38633
cea608overlay: fix rendering when roll up base row is at the top
...
We were ensuring that the base row was one too large for the number of roll up
rows and causing the first row to unable to be written to.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1985 >
2024-12-18 12:57:48 +00:00
Edward Hervey
73663d7352
cea708mux: Don't push empty services into packets
...
This is invalid. Only "padding" service 0 can be empty.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1987 >
2024-12-16 05:00:30 +01:00
Matthew Waters
a2279bc253
cea708mux: make sure to empty the stored pending codes
...
Fixes some captions being truncated if multiple of the same service is
received in the same input buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1984 >
2024-12-13 00:06:11 +00:00
Matthew Waters
db8e1da65d
cea708overlay: clear more things on caption timeout
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1983 >
2024-12-12 23:11:00 +00:00
Mathieu Duponchelle
ae90dd4afe
transcriberbin: expose language-filters property
...
When set, the bin will lookup the structure for either a bin description
or an element to link in when linking the transcriber to a language
tee.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1979 >
2024-12-12 14:19:41 +01:00
Mathieu Duponchelle
e88db4e35d
cea608tott: output generated text on carriage return
...
We would never output any text in roll-up mode otherwise
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1973 >
2024-12-09 18:25:06 +00:00
Mathieu Duponchelle
e3e7f55a8d
transcriberbin: expose mix-matrix property on audio sink pads
...
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 >
2024-12-09 16:26:47 +00:00
Matthew Waters
a3d114e18f
cea708overlay: fix background/foreground type
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
01ef35eac8
cea708overlay: enable a black background by default
...
It is the recommended colour sceheme in CEA-608.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
144a0e431c
cea708overlay: produce a slightly more CEA-608 layout
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
9787b187de
deps: update cea708-types to 0.3.5
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
34c928e9fe
tttocea708: log the bytes and times generated
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
b23a514657
tttocea708: don't incorrectly recode timestamp to frame conversion on gap events
...
Simply use the already existing generate() which will convert from a timestamp
and duration into frames for processing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
fe49837107
cea708mux: handle different timestamped inputs
...
If different inputs have different framerates, then an input buffer may need
to be combined or split. Account for that in the aggregate loop.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
00cb3fefe9
cea708mux: output padding by default
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
c0a3b0c868
tttocea708: output CEA-X08 padding by default
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Matthew Waters
9eb3ad4412
cea708mux: forward CEA-608 data correctly
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1942 >
2024-12-09 05:16:04 +00:00
Mathieu Duponchelle
39a8db51de
transcriberbin: register pad templates for unsynced source pads
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1963 >
2024-12-06 09:38:39 +00:00
Edward Hervey
4d31001c4b
cea708mux: Always pad cea708
...
Instead of pushing gaps, we should send out valid (empty) cea708 buffers
downstream, like we do in most other caption element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1946 >
2024-12-02 10:35:45 +00:00
Sebastian Dröge
6aeb3f2af2
Fix / silence various new Rust 1.83 clippy warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1954 >
2024-11-30 14:57:24 +02:00
Mathieu Duponchelle
01b3e2a8f2
transcriberbin: take synthesis latency into account
...
and factor out a method to calculate the element's internal latency, to
be shared with the code for calculating the size of the passthrough
queues.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1930 >
2024-11-29 22:09:37 +00:00
Mathieu Duponchelle
a71fd35ebf
transcriberbin: set latencies on transcribers as soon as possible
...
Otherwise if we wait for setup_transcription(), the transcribers might
already have reached the playing state.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1930 >
2024-11-29 22:09:37 +00:00
Mathieu Duponchelle
4406851ae7
transcriberbin: add support for speech synthesis
...
This commit adds a new "synthesis-languages" property. Users can set it
to define a map of languages (typically translations) that should then
be routed through a "synthesis" bin, with its description specifiable
as the value of the map.
The output of this bin is then exposed as a new pad on the top-level
bin.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1930 >
2024-11-29 22:09:37 +00:00
Edward Hervey
8bb0a7eecc
tttocea708: Fix off-by-one issue
...
last_frame_no is used to eventually calculate the outgoing pts. We want to
increment it *after* having created the content
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1947 >
2024-11-29 09:48:17 +00:00
François Laignel
a8146f333f
all: use builder conditional setters where applicable
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1926 >
2024-11-21 12:57:16 +00:00
François Laignel
4262a8aafe
all: update due to new has_property signature
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1926 >
2024-11-21 12:57:16 +00:00
Mathieu Duponchelle
29b5ccacdf
transcriberbin: take passthrough state into account in more places
...
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/630
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925 >
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
1fc1ed2539
transcriberbin: relink transcriber more thoroughly
...
* Remove old transcriber from correct bin
* Remove old unsynced ghost pads and expose new ones
* Fix potential deadlock where State was locked after PadState
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925 >
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
169f7b762e
transcriberbin: remove proxy properties on element
...
Those properties are now exposed on the sink pads, and should be used
directly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925 >
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
4074f4c275
transcriberbin: simplify latency query implementation
...
By always replying with a synthetic latency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925 >
2024-11-18 19:24:57 +01:00
Mathieu Duponchelle
10a022e457
transcriberbin: expose unsynced source pads for original transcripts
...
.. when the transcriber exposes those.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1915 >
2024-11-18 17:30:54 +00:00
Mathieu Duponchelle
d993c95e38
transcriberbin: fix initial transcription setup
...
Only link the audio tee with the pad transcriber when it is not
in passthrough mode.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/628
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1916 >
2024-11-14 17:35:33 +00:00
Mathieu Duponchelle
4284fe953a
transcriberbin: expose lateness property
...
Directly mapped to the lateness property on the transcriber object.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1910 >
2024-11-14 16:40:14 +00:00