[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / cores / VideoPlayer / DVDOverlayContainer.h
blobe64e44571310684998fa4ad7280ccbd0b1adc6eb
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "DVDCodecs/Overlay/DVDOverlay.h"
12 #include "threads/CriticalSection.h"
14 #include <memory>
16 class CDVDInputStreamNavigator;
17 class CDVDDemuxSPU;
19 class CDVDOverlayContainer : public CCriticalSection
21 public:
22 virtual ~CDVDOverlayContainer();
24 /*!
25 * \brief Adds an overlay into the container by processing the existing overlay collection first
27 * \details Processes the overlay collection whenever a new overlay is added. Useful to change
28 * the overlay's PTS values of previously added overlays if the collection itself is sequential. This
29 * is, for example, the case of ASS subtitles in which a single call to ass_render_frame generates all
30 * the subtitle images on a single call even if two subtitles exist at the same time frame. Other cases
31 * might exist where an overlay shouldn't be added to the collection if completely contained in another
32 * overlay.
34 * \param pPicture pointer to the overlay to be evaluated and possibly added to the collection
36 void ProcessAndAddOverlayIfValid(const std::shared_ptr<CDVDOverlay>& pPicture);
38 VecOverlays* GetOverlays(); // get the first overlay in this fifo
39 bool ContainsOverlayType(DVDOverlayType type);
41 void Clear(); // clear the fifo and delete all overlays
44 * \brief Flush the overlays.
46 void Flush();
48 void CleanUp(double pts); // validates all overlays against current pts
49 size_t GetSize();
51 void UpdateOverlayInfo(const std::shared_ptr<CDVDInputStreamNavigator>& pStream,
52 CDVDDemuxSPU* pSpu,
53 int iAction);
55 private:
56 VecOverlays::iterator Remove(VecOverlays::iterator itOverlay); // removes a specific overlay
58 VecOverlays m_overlays;