Commit graph

7 commits

Author SHA1 Message Date
Thibault Saunier
019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
Stéphane Cerveau
bbe3eecd3f closedcaption: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
2021-03-23 14:19:16 +00:00
Mathieu Duponchelle
08442cc792 cccombiner: implement scheduling
Prior to that, cccombiner's behaviour was essentially that of
a funnel: it strictly looked at input timestamps to associate
together video and caption buffers.

This patch instead exposes a "schedule" property, with a default
of TRUE, to control whether caption buffers should be smoothly
scheduled, in order to have exactly one per output video buffer.

This can involve rewriting input captions, for example when the
input is CDP sequence counters are rewritten, time codes are dropped
and potentially re-injected if the input video frame had a time code
meta.

Caption buffers may also get split up in order to assign captions to
the correct field when the input is interlaced.

This can also imply that the input will drift from synchronization,
when there isn't enough padding in the input stream to catch up. In
that case the element will start dropping old caption buffers once
the number of buffers in its internal queue reaches a certain limit
(configurable).

The property is exposed so that existing users of cccombiner can
revert back to the original behaviour, but should eventually be
removed, as that behaviour was simply inadequate.

This commit also disallows changing the input caption type, as
this would needlessly complicate implementation, and removes
the corresponding test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2076>
2021-03-17 22:00:25 +00:00
Mathieu Duponchelle
62d1a3a143 cccombiner: don't drop buffers on video timestamp discontinuities
If we receive video buffers with non-perfect timestamps, the
caption buffers' timestamps might fall in the interval between
the end of one video buffer and the start of the next one.

Make our criteria for dropping that the caption buffer has
a timestamp older than the end of the previous video buffer,
not older than the start of the new one, unless of course
this is the first video buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1207>
2020-04-24 08:47:50 +00:00
Sebastian Dröge
92dd72b7ee cccombiner: Make use of new GstAggregator::negotiate()
Simplifies the caps handling code considerably here and removes some
spurious negotiation.
2019-08-14 17:37:59 +00:00
Mathieu Duponchelle
74d281fbc2 cccombiner: implement update_src_caps
It is necessary to implement this vmethod, as when the src pad
is marked as reconfigure, the base class will reset to src caps,
and the default update_src_caps simply queries the caps allowed
downstream without taking into account the caps set by
gst_aggregator_set_src_caps.
2019-02-28 17:03:33 +00:00
Sebastian Dröge
eb92865ea1 cccombiner: Add new closed caption combiner element
This is the inverse of ccextractor: it takes a video and closed caption
stream and places the closed caption metas on the video output buffers.
2018-11-06 16:21:42 +00:00