xbmc
DVDSubtitleLineCollection.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 
13 typedef struct stListElement
14 {
15  std::shared_ptr<CDVDOverlay> pOverlay;
16  struct stListElement* pNext;
17 
18 } ListElement;
19 
21 {
22 public:
24  virtual ~CDVDSubtitleLineCollection();
25 
26  //void Lock() { EnterCriticalSection(&m_critSection); }
27  //void Unlock() { LeaveCriticalSection(&m_critSection); }
28 
29  void Add(std::shared_ptr<CDVDOverlay> pSubtitle);
30  void Sort();
31 
32  std::shared_ptr<CDVDOverlay> Get(double iPts = 0LL); // get the first overlay in this fifo
33 
34  void Reset();
35 
36  void Remove();
37  void Clear();
38  int GetSize() { return m_iSize; }
39 
40 private:
41  ListElement* m_pHead;
42  ListElement* m_pCurrent;
43  ListElement* m_pTail;
44 
45  int m_iSize;
46  //CRITICAL_SECTION m_critSection;
47 };
48 
Definition: DVDSubtitleLineCollection.h:20
Definition: DVDSubtitleLineCollection.h:13