3 #include "ISimpleSubPic.h"
4 #include "SubPicQueueImpl.h"
6 interface IDirectVobSubXy
;
8 //////////////////////////////////////////////////////////////////////////
10 // SimpleSubPicProvider
13 class SimpleSubPicProvider
: public CUnknown
, public ISimpleSubPicProvider
16 SimpleSubPicProvider(int alpha_blt_dst_type
, SIZE spd_size
, RECT video_rect
, IDirectVobSubXy
*consumer
, HRESULT
* phr
=NULL
);
17 virtual ~SimpleSubPicProvider();
20 STDMETHODIMP
NonDelegatingQueryInterface(REFIID riid
, void** ppv
);
22 bool LookupSubPicEx(REFERENCE_TIME rtNow
, IXySubRenderFrame
** sub_render_frame
);
23 HRESULT
GetSubPicProviderEx(ISubPicProviderEx2
** pSubPicProviderEx
);
24 HRESULT
RenderTo(IXySubRenderFrame
** pSubPic
, REFERENCE_TIME rtStart
, REFERENCE_TIME rtStop
, double fps
, BOOL bIsAnimated
);
25 bool IsSpdColorTypeSupported(int type
);
27 // ISimpleSubPicProvider
29 STDMETHODIMP
SetSubPicProvider(IUnknown
* subpic_provider
);
30 STDMETHODIMP
GetSubPicProvider(IUnknown
** subpic_provider
);
32 STDMETHODIMP
SetFPS(double fps
);
33 STDMETHODIMP
SetTime(REFERENCE_TIME rtNow
);
35 STDMETHODIMP
Invalidate(REFERENCE_TIME rtInvalidate
= -1);
36 STDMETHODIMP_(bool) LookupSubPic(REFERENCE_TIME now
/*[in]*/, ISimpleSubPic
** output_subpic
/*[out]*/);
38 STDMETHODIMP
GetStats(int& nSubPics
, REFERENCE_TIME
& rtNow
, REFERENCE_TIME
& rtStart
, REFERENCE_TIME
& rtStop
);
39 STDMETHODIMP
GetStats(int nSubPic
, REFERENCE_TIME
& rtStart
, REFERENCE_TIME
& rtStop
);
41 CCritSec m_csSubPicProvider
;
42 CComPtr
<ISubPicProviderEx2
> m_pSubPicProviderEx
;
44 CAtlList
<int> m_prefered_colortype
;
46 int m_alpha_blt_dst_type
;
51 REFERENCE_TIME m_rtNow
;
53 CComPtr
<ISubPicExAllocator
> m_pAllocator
;
56 REFERENCE_TIME m_subpic_start
,m_subpic_stop
;
57 CComPtr
<IXySubRenderFrame
> m_pSubPic
;
59 IDirectVobSubXy
*m_consumer
;
62 //////////////////////////////////////////////////////////////////////////
64 // SimpleSubPicProvider2
67 class SimpleSubPicProvider2
: public CUnknown
, public ISimpleSubPicProvider
70 SimpleSubPicProvider2(int alpha_blt_dst_type
, SIZE max_size
, SIZE cur_size
, RECT video_rect
,
71 IDirectVobSubXy
*consumer
, HRESULT
* phr
=NULL
);
72 virtual ~SimpleSubPicProvider2();
75 STDMETHODIMP
NonDelegatingQueryInterface(REFIID riid
, void** ppv
);
77 SimpleSubPicProvider2(const SimpleSubPicProvider2
&);
78 void operator=(const SimpleSubPicProvider2
&)const;
80 // ISimpleSubPicProvider
82 STDMETHODIMP
SetSubPicProvider(IUnknown
* subpic_provider
);
83 STDMETHODIMP
GetSubPicProvider(IUnknown
** subpic_provider
);
85 STDMETHODIMP
SetFPS(double fps
);
86 STDMETHODIMP
SetTime(REFERENCE_TIME rtNow
);
88 STDMETHODIMP
Invalidate(REFERENCE_TIME rtInvalidate
= -1);
89 STDMETHODIMP_(bool) LookupSubPic(REFERENCE_TIME now
/*[in]*/, ISimpleSubPic
** output_subpic
/*[out]*/);
91 STDMETHODIMP
GetStats(int& nSubPics
, REFERENCE_TIME
& rtNow
, REFERENCE_TIME
& rtStart
, REFERENCE_TIME
& rtStop
);
92 STDMETHODIMP
GetStats(int nSubPic
, REFERENCE_TIME
& rtStart
, REFERENCE_TIME
& rtStop
);
95 int m_alpha_blt_dst_type
;
101 REFERENCE_TIME m_now
;
103 ISimpleSubPicProvider
*m_cur_provider
;
104 SimpleSubPicProvider
*m_ex_provider
;
105 CSubPicQueueNoThread
*m_old_provider
;
107 IDirectVobSubXy
*m_consumer
;