libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
cea608decoder.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>
16#include <promeki/cea708cdp.h>
17#include <promeki/enums.h>
18#include <promeki/framenumber.h>
19#include <promeki/namespace.h>
20#include <promeki/sharedptr.h>
21#include <promeki/string.h>
22#include <promeki/subtitle.h>
23#include <promeki/timestamp.h>
24
25PROMEKI_NAMESPACE_BEGIN
26
27struct Cea608DecoderImpl; // Pimpl — defined in cea608decoder.cpp.
28
132class Cea608Decoder : public CaptionDecoder {
133 public:
135 using Channel = Cea608Encoder::Channel;
136
138 struct Config {
144 Channel channel = Channel::CC1;
145 };
146
147 Cea608Decoder();
148 explicit Cea608Decoder(Config cfg);
149 ~Cea608Decoder() override;
150
152 CaptionCodec codec() const override { return CaptionCodec(CaptionCodec::Cea608); }
153
155 const Config &config() const;
156
172 void pushFrame(FrameNumber frame, TimeStamp ts, const Cea708Cdp::CcDataList &data) override;
173
188 String displayedText() const override;
189
208 Subtitle displayedCue() const override;
209
221 SubtitleList finalize() override;
222
230 void reset() override;
231
232 private:
233 SharedPtr<Cea608DecoderImpl> _d;
234};
235
236PROMEKI_NAMESPACE_END
237
238#endif // PROMEKI_ENABLE_PROAV