Merge some MPC-HC Rev.3895 code to get HdmvSub and DVBSub support.
[xy_vsfilter.git] / src / subtitles / RenderedHdmvSubtitle.h
blob78106e21c08e9515bee5484d6c33eb5304eb2ac4
1 /*
2 * $Id: RenderedHdmvSubtitle.h 2804 2010-12-28 13:48:24Z aleksoid $
4 * (C) 2006-2010 see AUTHORS
6 * This file is part of mplayerc.
8 * Mplayerc is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * Mplayerc is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #pragma once
26 #include "Rasterizer.h"
27 #include "../SubPic/SubPicProviderImpl.h"
28 #include "HdmvSub.h"
29 #include "BaseSub.h"
32 class __declspec(uuid("FCA68599-C83E-4ea5-94A3-C2E1B0E326B9"))
33 CRenderedHdmvSubtitle : public CSubPicProviderImpl, public ISubStream
35 public:
36 CRenderedHdmvSubtitle(CCritSec* pLock, SUBTITLE_TYPE nType, const CString& name, LCID lcid);
37 ~CRenderedHdmvSubtitle(void);
39 DECLARE_IUNKNOWN
40 STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
42 // ISubPicProvider
43 STDMETHODIMP_(POSITION) GetStartPosition(REFERENCE_TIME rt, double fps);
44 STDMETHODIMP_(POSITION) GetNext(POSITION pos);
45 STDMETHODIMP_(REFERENCE_TIME) GetStart(POSITION pos, double fps);
46 STDMETHODIMP_(REFERENCE_TIME) GetStop(POSITION pos, double fps);
47 STDMETHODIMP_(bool) IsAnimated(POSITION pos);
48 STDMETHODIMP Render(SubPicDesc& spd, REFERENCE_TIME rt, double fps, RECT& bbox);
49 STDMETHODIMP GetTextureSize (POSITION pos, SIZE& MaxTextureSize, SIZE& VirtualSize, POINT& VirtualTopLeft);
51 // IPersist
52 STDMETHODIMP GetClassID(CLSID* pClassID);
54 // ISubStream
55 STDMETHODIMP_(int) GetStreamCount();
56 STDMETHODIMP GetStreamInfo(int i, WCHAR** ppName, LCID* pLCID);
57 STDMETHODIMP_(int) GetStream();
58 STDMETHODIMP SetStream(int iStream);
59 STDMETHODIMP Reload();
61 HRESULT ParseSample (IMediaSample* pSample);
62 HRESULT NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
64 private :
65 CString m_name;
66 LCID m_lcid;
67 REFERENCE_TIME m_rtStart;
69 CBaseSub* m_pSub;
70 CCritSec m_csCritSec;