Commit graph

116 commits

Author SHA1 Message Date
Sebastian Dröge 0a7d1639e7 Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
Michael Farrell 5ae1f72162 cea608overlay: Update for multiple Pango API changes in gtk-rs-core#308
https://github.com/gtk-rs/gtk-rs-core/pull/308
2021-10-31 12:50:50 +02:00
Sebastian Dröge da4122a721 closedcaption/mccenc: Update for glib::DateTime / TimeSpan API changes 2021-10-23 13:07:01 +03:00
Sebastian Dröge b9541b2ca4 Update for GstObjectImpl API change 2021-10-23 12:31:33 +03:00
François Laignel 27b9f0d868 Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
2021-10-18 15:09:47 +02:00
Sebastian Dröge c5d3a2efce Update for event API changes 2021-10-17 17:30:38 +03:00
Sebastian Dröge fe0075ad15 closedcaption/cea608overlay: Proxy the allocation query 2021-10-16 16:21:49 +03:00
Sebastian Dröge 6ec98ec5e4 Update to pretty-assertions 1.0 2021-10-14 10:20:19 +03:00
Jan Schmidt 3260651671 jsontovtt: Add an element for fragmented WebVTT
This element converts the CC JSON format to fragmented WebVTT.

Co-authored by Mathieu Duponchelle <mathieu@centricular.com>
2021-09-30 19:37:32 +00:00
Mathieu Duponchelle bc587a09f8 cea608tojson: expose "unbuffered" property
In this mode, cues are output as soon as they are ready for
display, without a duration. This can be useful in live mode,
when downstream is OK with determining the duration after the
fact, through clear=True.

The consequence of this is that the current roll-up window will
be output repetitively, it is up to downstream to deal with that
how it prefers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/554>
2021-09-30 17:05:01 +02:00
Mathieu Duponchelle 01cc9e23d8 transcriberbin: switch to passthrough on transcriber error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/569>
2021-09-28 16:17:57 +00:00
Sebastian Dröge 96d86eaa06 Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
2021-09-08 12:35:41 +00:00
Sebastian Dröge 434fe8e56f closedcaption/mccenc: Fix unit test to not require changing the version number in the output every time 2021-09-03 09:12:25 +03:00
Mathieu Duponchelle 715418c005 tttocea608: don't erase display memory before loading new pop-on
There is no point to that, the code is already factored in such
a way that erase_display_memory is inserted at the correct time,
including while loading the next pop-on captions in non displayed
memory.
2021-09-02 00:21:24 +02:00
Sebastian Dröge 4a870af19c Update various dependencies 2021-08-26 09:44:43 +03:00
Sebastian Dröge 848b296390 Add capi feature to all plugin crates
This fixes the build with cargo-c 0.9.2.
2021-08-11 20:51:36 +03:00
Mathieu Duponchelle b7d1c178a3 tttocea608: clean up locking
Locking order of state and settings was inconsistent, and causing
deadlocks. Fix and document it, consistently drop locks before
chaining up events / pushing and avoid sequentially unlocking /
relocking settings in the same local code path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/539>
2021-08-03 18:23:53 +02:00
Sebastian Dröge 052365ba1a Fix various needless-borrow clippy warnings and others 2021-07-30 13:53:35 +03:00
Mathieu Duponchelle 5397f4bfaf transcriberbin: remove leftover debug dot dumps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/531>
2021-07-15 23:24:29 +00:00
Sebastian Dröge f733f90333 closedcaption/mccenc: Fix unit test
The expected output contains the plugin version.
2021-07-09 14:14:51 +03:00
Sebastian Dröge 24ec79cd1a Update versions to 0.8.0 for the master branch 2021-07-09 13:49:33 +03:00
Sebastian Dröge 1c3ae0f89a Update versions to 0.7.0 2021-07-09 13:49:21 +03:00
Mathieu Duponchelle 3cdc5870a1 transcriberbin: new high-level bin for speech to Closed Caption
This new element puts together some of the elements we've written
in recent times (awstranscriber, tttocea608, textwrap, cccombiner)
into a convenience high-level element.

The design of the element is AV in -> AV (+ CC metas) out.

The element exposes property to set and unset a "passthrough" mode,
during which the transcriber element's state is set to NULL but kept
in the bin, in order for the user to be able to set properties on
sub elements no matter what the current mode is, using the
GstChildProxy interface.

In addition, the element ensures that the latency it reports stays
fixed so that playback continues uninterrupted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/528>
2021-06-30 02:07:01 +02:00
Mathieu Duponchelle 23219c3c09 tttocea608: don't pad up to first input timestamp
When receiving data from a live upstream element, the first buffer
may have a non-0 timestamp (running time), and the element incorrectly
pushed padding buffers up to that timestamp, resulting in much confusion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/527>
2021-06-25 23:26:30 +00:00
Mathieu Duponchelle d6f6f1a777 cea608overlay: expose "black-background" property
As stated in the spec:

> In addition, the user must have the capability to select a black
> background over which the captioned letters are displaced.

The property is MUTABLE_PLAYING
2021-06-18 09:48:44 +00:00
François Laignel 5439f14e57 fix clippy warnings 2021-06-05 10:36:22 +02:00
François Laignel e16cad7c8f video: migrate to new ClockTime design 2021-06-05 10:36:21 +02:00
François Laignel 8dfc872544 use gst::glib where applicable 2021-06-03 20:53:16 +02:00
Sebastian Dröge 04a60b8f46 Update repository URL for gtk-rs "core" crates 2021-05-13 09:50:08 +03:00
Sebastian Dröge 3d24f1da22 closedcaption/cea608overlay: Fix compilation with cairo API changes 2021-05-04 14:31:58 +03:00
Sebastian Dröge 15cf738616 Update for Value trait refactoring 2021-04-25 15:48:55 +03:00
Mathieu Duponchelle 7923e26545 tttocea608: implement word wrapping in roll-up modes.
In roll-up modes, we open new lines when the last column is reached.
This commit implements lookahead on a word basis, in order to avoid
splitting words unless absolutely necessary (when a word won't fit
on a full row)
2021-04-20 17:53:12 +00:00
François Laignel 67c5871957 fix-getters-calls 0.3.0 pass 2021-04-20 18:19:58 +02:00
François Laignel 27bc5c89ca fix-getters-def 0.3.0 pass 2021-04-20 18:19:58 +02:00
Mathieu Duponchelle 61214b5788 tttocea608: only warn when we do drop characters
In roll-up mode, we drop out of the loop and warn when the 32nd
character is reached, the warning is unnecessary when there were
no characters left to loop on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/499>
2021-04-16 21:16:46 +02:00
Mathieu Duponchelle f95b5ee666 closedcaption/caption.c: fix deletion
Trying to write "" in order to erase characters in the caption
frame simply fails silently, the proper way to implement
delete_to_end_of_row and backspace was to memset the relevant
cells.
2021-04-15 14:35:22 +00:00
François Laignel 7d17f88941 post fix-getters manual updates 2021-04-13 17:24:20 +02:00
François Laignel 06accc8d98 fix-getters-{def,calls} pass 2021-04-12 15:57:19 +02:00
Seungha Yang 3dda2aebe9 closedcaption: Fix build with MSVC
Undefined ssize_t is used in eia608.h file as well
2021-04-01 05:13:24 +00:00
Sebastian Dröge bb8931c39b closedcaption: Don't needlessly create a full-range subslice of a slice 2021-03-25 22:59:14 +02:00
Mathieu Duponchelle a500166082 cea608overlay: remove debug prints
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/480>
2021-03-17 14:22:00 +01:00
Mathieu Duponchelle 0335893559 closedcaption: implement cea608tojson element
This element outputs the same format expected by tttocea608 in
json mode.

It notably differs from cea608tott in that it only uses libcaption's
low-level API, as it needs to maintain its own view of the current
state of the screen, and make fine-grained decisions as to when
to output data and how to timestamp it.

It covers a large portion of the 608 spec, with the exception of
a few features that probably haven't ever seen widespread usage,
those are listed in a TODO list at the top.

It has been tested with a reference file produced by CEA and covers
all the features it demonstrates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/480>
2021-03-17 14:22:00 +01:00
Mathieu Duponchelle 11238579a5 tttocea608: pad immediately for the duration of the input buffer
Pushing the pending padding once we receive the following gap
or buffer means we will push it too late otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/480>
2021-03-12 11:20:44 +01:00
Sebastian Dröge 2cada57efc Update for the subclassing glib/gstreamer bindings API changes 2021-03-09 17:07:13 +02:00
Sebastian Dröge aa354058f5 Update pretty-assertions to 0.7, async-tungstenite to 0.13 and num-rational to 0.4
Also get rid of the funty workaround as nom now depends on the right
version.
2021-03-09 11:42:33 +02:00
Sebastian Dröge dc0c5f7611 Update for new #[glib::object_subclass] attribute macro 2021-03-07 18:27:00 +02:00
Mathieu Duponchelle a7df50e68f ccdetect: fix 608 detection
When cc_type is 00 or 01 the CC is 608 data, the last bit only
denotes the field

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/474>
2021-02-15 19:25:18 +00:00
Mathieu Duponchelle cc402f769c cea608overlay: support all VideoCaptionType meta
Also expose a field property, to allow selecting CC for a
specific field when the information is available. Defaults
to automatically picking the first field encountered.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/474>
2021-02-15 19:25:18 +00:00
Mathieu Duponchelle 3c982a3de0 ccdetect: extract CDP parser to a separate module
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/474>
2021-02-15 19:25:18 +00:00
Mathieu Duponchelle 19611f0ebe tttocea608: be more conservative when inserting spaces
We don't need to insert a space when starting a new line,
or before punctuation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/474>
2021-02-15 19:25:18 +00:00