Support unrar64.dll
[xy_vsfilter.git] / src / subtitles / SSF.h
blob02452f5ba0ac4567db20e87464e55fe22182b073
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 #pragma once
24 #include "..\SubPic\ISubPic.h"
25 #include ".\libssf\SubtitleFile.h"
26 #include ".\libssf\Renderer.h"
28 #pragma once
30 namespace ssf
32 [uuid("E0593632-0AB7-47CA-8BE1-E9D2A6A4825E")]
33 class CRenderer : public CSubPicProviderImpl, public ISubStream
35 CString m_fn, m_name;
36 CAutoPtr<SubtitleFile> m_file;
37 CAutoPtr<Renderer> m_renderer;
39 public:
40 CRenderer(CCritSec* pLock);
41 virtual ~CRenderer();
43 bool Open(CString fn, CString name = _T(""));
44 bool Open(InputStream& s, CString name);
46 void Append(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, LPCWSTR str);
48 DECLARE_IUNKNOWN
49 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
51 // ISubPicProvider
52 STDMETHODIMP_(POSITION) GetStartPosition(REFERENCE_TIME rt, double fps);
53 STDMETHODIMP_(POSITION) GetNext(POSITION pos);
54 STDMETHODIMP_(REFERENCE_TIME) GetStart(POSITION pos, double fps);
55 STDMETHODIMP_(REFERENCE_TIME) GetStop(POSITION pos, double fps);
56 STDMETHODIMP_(bool) IsAnimated(POSITION pos);
57 STDMETHODIMP Render(SubPicDesc& spd, REFERENCE_TIME rt, double fps, RECT& bbox);
59 // IPersist
60 STDMETHODIMP GetClassID(CLSID* pClassID);
62 // ISubStream
63 STDMETHODIMP_(int) GetStreamCount();
64 STDMETHODIMP GetStreamInfo(int i, WCHAR** ppName, LCID* pLCID);
65 STDMETHODIMP_(int) GetStream();
66 STDMETHODIMP SetStream(int iStream);
67 STDMETHODIMP Reload();