Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to C4 Erase Page flag #12

Open
ileanadumitrescu95 opened this issue Sep 16, 2022 · 0 comments
Open

Access to C4 Erase Page flag #12

ileanadumitrescu95 opened this issue Sep 16, 2022 · 0 comments

Comments

@ileanadumitrescu95
Copy link
Contributor

SourceForge bug #204 written by James D'Arcy on 2019-10-30

Hello VBI Team.

I hope this library is still somewhat active and that someone is out there.

I am trying to determine whenever a CAPTION CLEAR COMMAND event occurs in Australain broadcast streams and am wondering if someone can assist.

I am referring to the Australian Broadcast standards found at "https://www.freetv.com.au/wp-content/uploads/2019/08/OP-42-Closed-Captioning-Issue-5-May-2018.pdf"

Note the relevant section on the first page:

CAPTION CLEAR COMMAND
A Command to clear any existing caption shall be included in the first two (2) seconds of
a program. A Command to clear shall also be included two (2) seconds before the end
of a program.
A command to clear any existing caption shall be included in the first half (0.5) second of
a commercial. Where closed caption data is included, the caption information should
commence no earlier than a half (0.5) second after the start of active video and a caption
erase signal is required (last caption time code out) not later than a half (0.5) second
before the end of active video. First caption time code in will be at an arbitrary point
determined by content.

First of all, I believe I am correct in believing that the "Caption Clear Command" referred to in the above documents is the "C4 Erase Page" flag (Byte 9, bit 8). Is that correct? If not, then I need to find another path.

So, given that that is correct, my goal was to find when this flag was being set. There appeared to be no direct way served up via the zvbi API as it looked at first that VBI header details are not directly available from within the library.

But then I noticed some comments in the documentation for the 'VBI_EVENT_TTX_PAGE' event:

  • If any of the roll_header, header_update or clock_update flags
  • are set ev.ttx_page.raw_header is a pointer to the raw header data
  • (40 bytes), which remains valid until the event handler returns.

so I thought all I would need to do is wait until the 'header_update' flag is set and then look at ev.ttx_page.raw_header[8] and see if the C4_ERASE_PAGE bit is set (the eighth bit I think)

However, the header_update flag is never set.

I have also tried working with the vbi_pfc_demux_new() and vbi_pfc_demux_feed_frame() calls to see if I can get a VbiPageFunctionClearCallback method but the callback is never called.

Further, I only ever get VBI_EVENT_TTX_PAGE events, no matter what I set the vbi_event_handler_register flags to.

I have had a detailed look at the ffmpeg, vlc and gstreamer code but none of them are going to the level of detail I am after.

Can someone point me in the correct direction, perhaps with some sample code please?

Kind regards

James

ileanadumitrescu95 added a commit that referenced this issue Sep 27, 2022
Fix compilation error when using the XDS_SEP_DUMP macro in caption.c.

Thank you to Brian Enigma for providing this patch.

<https://sourceforge.net/p/zapping/patches/12/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant