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>
18#include <promeki/enums.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
81class Cea708Decoder : public CaptionDecoder {
82 public:
84 struct Config {
87 uint8_t serviceNumber = 1;
88 };
89
90 Cea708Decoder();
91 explicit Cea708Decoder(Config cfg);
92 ~Cea708Decoder() override;
93
95 CaptionCodec codec() const override { return CaptionCodec(CaptionCodec::Cea708); }
96
98 const Config &config() const;
99
119 void pushFrame(FrameNumber frame, TimeStamp ts, const Cea708Cdp::CcDataList &data) override;
120
127 String displayedText() const override;
128
140 Subtitle displayedCue() const override;
141
148 const Cea708WindowState &windowState() const;
149
158 SubtitleList finalize() override;
159
165 void reset() override;
166
167 private:
168 SharedPtr<Cea708DecoderImpl> _d;
169};
170
171PROMEKI_NAMESPACE_END
172
173#endif // PROMEKI_ENABLE_PROAV