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