Skip to content

DecodeStatus needs enriching #15

@DanielBujnik

Description

@DanielBujnik

Hello,

ARIB-B24 spec does not specify how/when caption management data should be sent. While analyzing various streams, I've observed two distinct patterns: some streams consistently place management data ahead of caption statements, while others exhibit sporadic transmission of management data, with intervals of around 10 seconds. During these intervals, numerous caption statements are broadcasted, necessitating the ability to distinguish and ignore them until management data is received.

Currently, users of the libaribcaption library face challenges in determining the type of data received. The DecoderImpl::Decode function, along with the enum DecodeStatus, only covers three cases: error, noCaption, and gotCaption. Therefore, I attempted to treat noCaption as an indicative of caption management data. However, this approach proved unreliable, as valid caption statement data was occasionally misinterpreted as noCaption. This occurred particularly when utilizing EncodingScheme::kAuto with a Latin broadcast stream where no regions were recognized, resulting in noCaption from DecoderImpl::Decode. Resolving this required switching to EncodingScheme::kABNT_NBR_15606_1_Latin during decoder initialization.

To address this inconsistency, it would be beneficial to extend the DecodeStatus enumeration with a new value, such as kMgnt and enhancing DecoderImpl::Decode to return kMgnt specifically for identifying caption management data.

Alternatively, it's worth investigating the possibility of a bug within the library where valid caption statement data is erroneously interpreted as noCaption as described above.

Kind regards
Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions