libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
cea708decoder.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_PROAV
13#include <cstdint>
15#include <promeki/cea708cdp.h>
19#include <promeki/framenumber.h>
20#include <promeki/namespace.h>
21#include <promeki/sharedptr.h>
22#include <promeki/string.h>
23#include <promeki/subtitle.h>
24#include <promeki/timestamp.h>
25
26PROMEKI_NAMESPACE_BEGIN
27
28struct Cea708DecoderImpl; // Pimpl — defined in cea708decoder.cpp.
29
115class Cea708Decoder : public CaptionDecoder {
116 public:
118 struct Config {
121 uint8_t serviceNumber = 1;
122 };
123
124 Cea708Decoder();
125 explicit Cea708Decoder(Config cfg);
126 ~Cea708Decoder() override;
127
129 CaptionCodec codec() const override { return CaptionCodec(CaptionCodec::Cea708); }
130
132 const Config &config() const;
133
153 void pushFrame(FrameNumber frame, TimeStamp ts, const Cea708Cdp::CcDataList &data) override;
154
161 String displayedText() const override;
162
174 Subtitle displayedCue() const override;
175
182 const Cea708WindowState &windowState() const;
183
192 SubtitleList finalize() override;
193
199 void reset() override;
200
201 private:
202 SharedPtr<Cea708DecoderImpl> _d;
203};
204
205PROMEKI_NAMESPACE_END
206
207#endif // PROMEKI_ENABLE_PROAV