Commit graph

12 commits

Author SHA1 Message Date
Matthew Waters 91e8331b52 ccconverter: fix cdp->cea608-raw field 1 60fps conversion
There was a potential busy loop occuring because when we were taking
data from the internal ccbuffer, we were not resetting which field had
written data.  This would mean that the next time data was retrieved
from ccbuffer, it was always from field 0 and never from field 1.

This only affects usage of cc_buffer_take_separated() which is only used
by cdp->raw cea608.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6423>
2024-03-26 02:23:08 +00:00
Matthew Waters a26b363d3e closedcaption: produce valid cea608 padding by default
Cea608 (valid) padding removal is available on the input side of ccconverter
or configurable on cccombiner.  cccombiner can now configure whether
valid or invalid cea608 padding is used and for valid padding, how long
after valid non-padding to keep sending valid padding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6300>
2024-03-12 02:49:01 +00:00
Vivia Nikolaidou dd00dab5e9 ccutils: Add padding also for ccp data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5423>
2023-11-08 10:06:45 +00:00
Vivia Nikolaidou 78bc3d53dd ccutils: Keep upstream padding payload
A payload of 0x80 0x80 means that it's padding. It's not a good idea to
throw this away though, because of the cc_valid field.

According to CEA 10-B section 25.2.1, if cc_valid is zero, the run-in
clock and start bit should not be generated. In practice, this means
that any closed captions will be erased and the end-user TV will show
that captions are not available for this stream. This might have
undesired consequences, e.g. we were just showing a long line of
captions and we disable it before the user has had time to read it, or
you can't enable closed captions during silence/music intervals.

We cannot reliably detect whether there's a currently-silent closed
caption stream or just nothing, but we have this information coming from
upstream, so we can at least not discard it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5508>
2023-11-06 13:44:36 +00:00
Matthew Waters 21b232ce30 closedcaption: write 0x00 padding instead of 0x80 in cc_data/cdp
Depending on the exact output format, 0x00 may be a better default for
padding than 0x80.  0x00 is the recommended padding value when used in
CDP (and cc_data) but is not when used in s334-1a.  See CTA-708-E 4.3.5
amd SMPTE 334-1-2007 5.3.2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4578>
2023-05-10 00:52:01 +00:00
Matthew Waters 262be30b6f ccutils: generate valid padding in field 1 when needing to generate field 2
Fixes CC in Field 2 but not in Field 1 errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4490>
2023-04-26 20:43:13 +00:00
Matthew Waters be72fbc334 cccombiner: fix output-padding=false for a cea608 field 1 only stream
If we have data that needs outputting but we have to output padding to
meet the alternating field requirements of cea608, then output that
padding anyway.

Also includes a test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4124>
2023-03-08 11:11:05 +00:00
Matthew Waters e2ff6b61ce cccombiner: initial implementation of using CCBuffer helper
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters 088597b430 closedcaption: move CC buffering to helper object
Move most of the interesting code from ccconverter to this new helper
object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters 06a20f9243 closedcaption: move cdp->cc_data into shared location
So it can be used by both ccconverter and cccombiner

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters fde92ec43f closedcaption: move cc_data->cdp to shared file
Used by both ccconverter and cccombiner

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00
Matthew Waters 067185e7da closedcaption: move cdp framerate table to common file
shared by both cccombiner and ccconverter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>
2022-11-10 00:52:14 +00:00