PageRenderTime 43ms CodeModel.GetById 38ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleLineCollection.h

http://github.com/xbmc/xbmc
C++ Header | 60 lines | 25 code | 13 blank | 22 comment | 0 complexity | 45b7b61085daae5efdc8efc7fa1b7e4d MD5 | raw file
 1#pragma once
 2
 3/*
 4 *      Copyright (C) 2005-2013 Team XBMC
 5 *      http://xbmc.org
 6 *
 7 *  This Program is free software; you can redistribute it and/or modify
 8 *  it under the terms of the GNU General Public License as published by
 9 *  the Free Software Foundation; either version 2, or (at your option)
10 *  any later version.
11 *
12 *  This Program is distributed in the hope that it will be useful,
13 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 *  GNU General Public License for more details.
16 *
17 *  You should have received a copy of the GNU General Public License
18 *  along with XBMC; see the file COPYING.  If not, see
19 *  <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#include "../DVDCodecs/Overlay/DVDOverlay.h"
24
25typedef struct stListElement
26{
27  CDVDOverlay* pOverlay;
28  struct stListElement* pNext;
29
30} ListElement;
31
32class CDVDSubtitleLineCollection
33{
34public:
35  CDVDSubtitleLineCollection();
36  virtual ~CDVDSubtitleLineCollection();
37
38  //void Lock()   { EnterCriticalSection(&m_critSection); }
39  //void Unlock() { LeaveCriticalSection(&m_critSection); }
40
41  void Add(CDVDOverlay* pSubtitle);
42  void Sort();
43
44  CDVDOverlay* Get(double iPts = 0LL); // get the first overlay in this fifo
45
46  void Reset();
47
48  void Remove();
49  void Clear();
50  int GetSize() { return m_iSize; }
51
52private:
53  ListElement* m_pHead;
54  ListElement* m_pCurrent;
55  ListElement* m_pTail;
56
57  int m_iSize;
58  //CRITICAL_SECTION m_critSection;
59};
60