[Zapping-misc] Access to C4 Erase Page flag
Status: Alpha
Brought to you by:
mschimek
From: James D'A. <ja...@im...> - 2019-10-30 12:02:00
|
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 |