closedcaption: add some docs for the new SMPTE-2038 elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2019>
This commit is contained in:
Tim-Philipp Müller 2025-01-03 02:05:02 +00:00
parent 81ff664666
commit 95d0563b80
4 changed files with 55 additions and 0 deletions

View file

@ -6,6 +6,17 @@
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-cctost2038anc
*
* Takes closed captions (CEA-608 and/or CEA-708) as produced by other GStreamer closed caption
* processing elements and converts them into SMPTE ST-2038 ancillary data that can be fed to
* `st2038ancmux` and then to `mpegtsmux` for splicing/muxing into an MPEG-TS container. The
* `line-number` and `horizontal-offset` properties should be set to the desired line number
* and horizontal offset.
*
* Since: plugins-rs-0.14.0
*/
use std::sync::{LazyLock, Mutex};
use gst::glib;

View file

@ -8,6 +8,19 @@
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-st3028ancdemux
*
* Splits SMPTE ST-2038 ancillary metadata (as received from `tsdemux`) into separate
* streams per DID/SDID and line/horizontal_offset.
*
* Will add a sometimes pad with details for each ancillary stream. Also has an
* always source pad that just outputs all ancillary streams for easy forwarding
* or remuxing, in case none of the ancillary streams need to be modified or
* dropped.
*
* Since: plugins-rs-0.14.0
*/
use gst::glib;
use gst::prelude::*;
use gst::subclass::prelude::*;

View file

@ -6,6 +6,26 @@
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-st3028ancmux
*
* Muxes SMPTE ST-2038 ancillary metadata streams into a single stream for muxing into MPEG-TS
* with `mpegtsmux`. Combines ancillary data on the same line if needed, as is required for
* MPEG-TS muxing.
*
* Can accept individual ancillary metadata streams as inputs and/or the combined
* stream from #st2038ancdemux. If the video framerate is known, it can be
* signalled to the ancillary data muxer via the output caps by adding a
* capsfilter behind it, with e.g. `meta/x-st-2038,framerate=30/1`. This
* allows the muxer to bundle all packets belonging to the same frame (with
* the same timestamp), but that is not required. In case there are multiple
* streams with the same DID/SDID that have an ST-2038 packet for the same
* frame, it will prioritise the one from more recently created request pads
* over those from earlier created request pads (which might contain a
* combined stream for example if that's fed first).
*
* Since: plugins-rs-0.14.0
*/
use std::{
collections::BTreeMap,
ops::ControlFlow,

View file

@ -6,6 +6,17 @@
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-st2038anctocc
*
* Extracts closed captions (CEA-608 and/or CEA-708) from SMPTE ST-2038 ancillary streams
* outputs them on the respective sometimes source pad (`src_cea608` or `src_cea708`). The
* data is output as a closed caption stream with caps `closedcaption/x-cea-608,format=s334-1a`
* or `closedcaption/x-cea-708,format=cdp` for further processing by other GStreamer closed
* caption processing elements.
*
* Since: plugins-rs-0.14.0
*/
use std::{mem, sync::LazyLock};
use gst::glib;