kodi
DVDOverlayCodecText.h
1 /*
2  * Copyright (C) 2005-2018 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 extern "C"
16 {
17 #include <libavcodec/avcodec.h>
18 }
19 
20 class CDVDOverlay;
21 
23 {
24 public:
26  ~CDVDOverlayCodecText() override = default;
27  bool Open(CDVDStreamInfo& hints, CDVDCodecOptions& options) override;
28  OverlayMessage Decode(DemuxPacket* pPacket) override;
29  void Reset() override;
30  void Flush() override;
31  std::shared_ptr<CDVDOverlay> GetOverlay() override;
32 
33  // Specialization of CSubtitlesAdapter
34  void PostProcess(std::string& text) override;
35 
36 private:
37  std::shared_ptr<CDVDOverlay> m_pOverlay;
38  CDVDStreamInfo m_hints;
39  int m_prevSubId{-1};
40  bool m_changePrevStopTime{false};
41  AVCodecID m_codecId{AV_CODEC_ID_NONE};
42 };
Definition: DVDStreamInfo.h:25
Definition: DVDCodecs.h:23
Definition: DVDOverlayCodec.h:39
Definition: DVDOverlayCodecText.h:22
void PostProcess(std::string &text) override
Post processing of subtitle, will be called before processing AddSubtitle method. ...
Definition: DVDOverlayCodecText.cpp:105
Definition: SubtitlesAdapter.h:22
Definition: DemuxPacket.h:22
Definition: DVDOverlay.h:27