Add pgs color type setting
[xy_vsfilter.git] / src / subtitles / RenderedHdmvSubtitle.h
blobb18b93867b14128017eb3cccbf4538da328fac2f
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 // ISubPicProviderEx
52 STDMETHODIMP_(bool) IsColorTypeSupported(int type);
54 // IPersist
55 STDMETHODIMP GetClassID(CLSID* pClassID);
57 // ISubStream
58 STDMETHODIMP_(int) GetStreamCount();
59 STDMETHODIMP GetStreamInfo(int i, WCHAR** ppName, LCID* pLCID);
60 STDMETHODIMP_(int) GetStream();
61 STDMETHODIMP SetStream(int iStream);
62 STDMETHODIMP Reload();
64 HRESULT ParseSample (IMediaSample* pSample);
65 HRESULT NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
67 HRESULT SetYuvType(CBaseSub::ColorType colorType, CBaseSub::YuvRangeType yuvRangeType);
68 private :
69 CString m_name;
70 LCID m_lcid;
71 REFERENCE_TIME m_rtStart;
73 CBaseSub* m_pSub;
74 CCritSec m_csCritSec;