kodi
DVDOverlayCodecCCText.h
1 /*
2  * Copyright (C) 2005-2021 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "DVDOverlayCodec.h"
12 #include "DVDStreamInfo.h"
13 #include "DVDSubtitles/SubtitlesAdapter.h"
14 
15 class CDVDOverlay;
16 
18 {
19 public:
21  ~CDVDOverlayCodecCCText() override = default;
22  bool Open(CDVDStreamInfo& hints, CDVDCodecOptions& options) override;
23  OverlayMessage Decode(DemuxPacket* pPacket) override;
24  void Reset() override;
25  void Flush() override;
26  std::shared_ptr<CDVDOverlay> GetOverlay() override;
27 
28  // Specialization of CSubtitlesAdapter
29  void PostProcess(std::string& text) override;
30 
31 private:
32  std::shared_ptr<CDVDOverlay> m_pOverlay;
33  int m_prevSubId;
34  double m_prevPTSStart;
35  std::string m_prevText;
36  bool m_changePrevStopTime;
37 };
Definition: DVDStreamInfo.h:25
Definition: DVDCodecs.h:23
Definition: DVDOverlayCodec.h:39
Definition: DVDOverlayCodecCCText.h:17
Definition: SubtitlesAdapter.h:22
Definition: DemuxPacket.h:22
void PostProcess(std::string &text) override
Post processing of subtitle, will be called before processing AddSubtitle method. ...
Definition: DVDOverlayCodecCCText.cpp:112
Definition: DVDOverlay.h:27