kodi
DVDOverlayContainer.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 "DVDCodecs/Overlay/DVDOverlay.h"
12 #include "threads/CriticalSection.h"
13 
14 #include <memory>
15 
17 class CDVDDemuxSPU;
18 
19 class CDVDOverlayContainer : public CCriticalSection
20 {
21 public:
22  virtual ~CDVDOverlayContainer();
23 
36  void ProcessAndAddOverlayIfValid(const std::shared_ptr<CDVDOverlay>& pPicture);
37 
38  VecOverlays* GetOverlays(); // get the first overlay in this fifo
39  bool ContainsOverlayType(DVDOverlayType type);
40 
41  void Clear(); // clear the fifo and delete all overlays
42 
43  /*
44  * \brief Flush the overlays.
45  */
46  void Flush();
47 
48  void CleanUp(double pts); // validates all overlays against current pts
49  size_t GetSize();
50 
51  void UpdateOverlayInfo(const std::shared_ptr<CDVDInputStreamNavigator>& pStream,
52  CDVDDemuxSPU* pSpu,
53  int iAction);
54 
55 private:
56  VecOverlays::iterator Remove(VecOverlays::iterator itOverlay); // removes a specific overlay
57 
58  VecOverlays m_overlays;
59 };
void ProcessAndAddOverlayIfValid(const std::shared_ptr< CDVDOverlay > &pPicture)
Adds an overlay into the container by processing the existing overlay collection first.
Definition: DVDOverlayContainer.cpp:22
Definition: DVDDemuxSPU.h:30
Definition: DVDInputStreamNavigator.h:41
Definition: DVDOverlayContainer.h:19