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)
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
24 #include "..\SubPic\ISubPic.h"
25 #include ".\libssf\SubtitleFile.h"
26 #include ".\libssf\Renderer.h"
32 [uuid("E0593632-0AB7-47CA-8BE1-E9D2A6A4825E")]
33 class CRenderer
: public CSubPicProviderImpl
, public ISubStream
36 CAutoPtr
<SubtitleFile
> m_file
;
37 CAutoPtr
<Renderer
> m_renderer
;
40 CRenderer(CCritSec
* pLock
);
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
);
49 STDMETHODIMP
NonDelegatingQueryInterface(REFIID riid
, void** ppv
);
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
);
60 STDMETHODIMP
GetClassID(CLSID
* pClassID
);
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();