mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 23:11:01 +00:00
42b4defb5c
Up to now, tttocea608 supported text/utf8, and no interface to control the positioning of closed captions apart from new lines in the input text. CEA 608 supports a larger set of features than that, such as positioning CC precisely in its 32 x 15 grid, styling text, switching from one mode to another, resetting the base row in roll-up mode etc .. A custom, JSON-based format is now supported by the element (caps application/x-json, format=cea608), allowing users to control those features in a pretty advanced manner. A side effect of this is that the approach previously used by the element to ensure frame-accurate CC display is now untenable: where we knew before that an input buffer would at most span 74 buffers and calculate a somewhat reasonable latency based on that, this is no longer possible. Instead we pick the approach most CC encoders seem to pick, and accept a certain latency at display time: for example the flipping of the back buffer to the display buffer for a 10-character text buffer will occur 7 frames after its PTS. This has obvious benefits in terms of code complexity and should generally be acceptable. + Removes a now irrelevant test, updates other tests + Extracts the Mode enum to the root of the crate, it will be used by another element in a follow-up commit
72 lines
2.1 KiB
TOML
72 lines
2.1 KiB
TOML
[package]
|
|
name = "gst-plugin-closedcaption"
|
|
version = "0.6.0"
|
|
authors = ["Sebastian Dröge <sebastian@centricular.com>", "Jordan Petridis <jordan@centricular.com>", "Matthew Waters <matthew@centricular.com>"]
|
|
license = "LGPL-2.1-or-later"
|
|
edition = "2018"
|
|
description = "Rust Closed Caption Plugin"
|
|
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
|
|
|
[dependencies]
|
|
glib = { git = "https://github.com/gtk-rs/gtk-rs" }
|
|
nom = "6.0"
|
|
either = "1"
|
|
uuid = { version = "0.8", features = ["v4"] }
|
|
chrono = "0.4"
|
|
once_cell = "1.0"
|
|
atomic_refcell = "0.1"
|
|
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs", features=["use_glib"] }
|
|
pango = { git = "https://github.com/gtk-rs/gtk-rs" }
|
|
pangocairo = { git = "https://github.com/gtk-rs/gtk-rs" }
|
|
byteorder = "1"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = { version = "1.0", features = ["raw_value"] }
|
|
|
|
[dependencies.gst]
|
|
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
|
features = ["v1_16"]
|
|
package="gstreamer"
|
|
|
|
[dependencies.gst-base]
|
|
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
|
features = ["v1_16"]
|
|
package="gstreamer-base"
|
|
|
|
[dependencies.gst-video]
|
|
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
|
features = ["v1_16"]
|
|
package="gstreamer-video"
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = "0.6"
|
|
rand = { version = "0.8", features = ["small_rng"] }
|
|
|
|
[dev-dependencies.gst-check]
|
|
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
|
package="gstreamer-check"
|
|
|
|
[lib]
|
|
name = "gstrsclosedcaption"
|
|
crate-type = ["cdylib", "rlib"]
|
|
path = "src/lib.rs"
|
|
|
|
[build-dependencies]
|
|
gst-plugin-version-helper = { path="../../version-helper" }
|
|
cc = "1.0"
|
|
|
|
[features]
|
|
# We already use 1.16 which is new enough for static build
|
|
static = []
|
|
|
|
[package.metadata.capi]
|
|
min_version = "0.7.0"
|
|
|
|
[package.metadata.capi.header]
|
|
enabled = false
|
|
|
|
[package.metadata.capi.library]
|
|
install_subdir = "gstreamer-1.0"
|
|
versioning = false
|
|
|
|
[package.metadata.capi.pkg_config]
|
|
requires_private = "gstreamer-1.0, gstreamer-base-1.0, gstreamer-video-1.0, gobject-2.0, glib-2.0, gmodule-2.0, pango, pangocairo, cairo-gobject"
|