4 * Copyright (C) 2005-2013 Team XBMC
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)
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.
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/>.
23 #include "DVDOverlayContainer.h"
24 #include "DVDSubtitles/DVDFactorySubtitle.h"
25 #include "DVDStreamInfo.h"
26 #include "DVDMessageQueue.h"
27 #include "DVDDemuxSPU.h"
29 class CDVDInputStream;
30 class CDVDSubtitleStream;
31 class CDVDSubtitleParser;
32 class CDVDInputStreamNavigator;
33 class CDVDOverlayCodec;
35 class CDVDPlayerSubtitle
38 CDVDPlayerSubtitle(CDVDOverlayContainer* pOverlayContainer);
39 ~CDVDPlayerSubtitle();
41 void Process(double pts, double offset);
43 void FindSubtitles(const char* strFilename);
44 int GetSubtitleCount();
46 void UpdateOverlayInfo(CDVDInputStreamNavigator* pStream, int iAction) { m_pOverlayContainer->UpdateOverlayInfo(pStream, &m_dvdspus, iAction); }
49 void SendMessage(CDVDMsg* pMsg);
50 bool OpenStream(CDVDStreamInfo &hints, std::string& filename);
51 void CloseStream(bool flush);
53 bool IsStalled() { return m_pOverlayContainer->GetSize() == 0; }
55 CDVDOverlayContainer* m_pOverlayContainer;
57 CDVDSubtitleStream* m_pSubtitleStream;
58 CDVDSubtitleParser* m_pSubtitleFileParser;
59 CDVDOverlayCodec* m_pOverlayCodec;
60 CDVDDemuxSPU m_dvdspus;
62 CDVDStreamInfo m_streaminfo;
66 CCriticalSection m_section;
70 //typedef struct SubtitleInfo