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
23 #include "BaseGraph.h"
24 #include "DX7AllocatorPresenter.h"
25 #include "DX9AllocatorPresenter.h"
30 class CQuicktimeGraph
;
32 class CQuicktimeWindow
: public CPlayerWindow
36 QT::GWorldPtr m_offscreenGWorld
;
38 CQuicktimeGraph
* m_pGraph
;
42 static QT::OSErr
MyMovieDrawingCompleteProc(QT::Movie theMovie
, long refCon
);
44 void ProcessMovieEvent(unsigned int message
, unsigned int wParam
, long lParam
);
47 virtual LRESULT
WindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
50 CQuicktimeWindow(CQuicktimeGraph
* pGraph
);
52 bool OpenMovie(CString fn
);
55 void Run(), Pause(), Stop();
56 FILTER_STATE
GetState();
59 QT::MovieController theMC
;
64 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct
);
65 afx_msg
void OnDestroy();
66 afx_msg BOOL
OnEraseBkgnd(CDC
* pDC
);
67 afx_msg
void OnTimer(UINT nIDEvent
);
70 class CQuicktimeGraph
: public CBaseGraph
, public IVideoFrameStep
73 bool m_fQtInitialized
;
75 CPlayerWindow m_wndWindowFrame
;
76 CQuicktimeWindow m_wndDestFrame
;
78 CComPtr
<ISubPicAllocatorPresenter
> m_pQTAP
;
81 CQuicktimeGraph(HWND hParent
, HRESULT
& hr
);
82 virtual ~CQuicktimeGraph();
85 STDMETHODIMP
NonDelegatingQueryInterface(REFIID riid
, void** ppv
);
89 STDMETHODIMP
RenderFile(LPCWSTR lpcwstrFile
, LPCWSTR lpcwstrPlayList
);
95 STDMETHODIMP
GetState(LONG msTimeout
, OAFilterState
* pfs
);
98 STDMETHODIMP
GetDuration(LONGLONG
* pDuration
);
99 STDMETHODIMP
GetCurrentPosition(LONGLONG
* pCurrent
);
100 STDMETHODIMP
SetPositions(LONGLONG
* pCurrent
, DWORD dwCurrentFlags
, LONGLONG
* pStop
, DWORD dwStopFlags
);
101 STDMETHODIMP
SetRate(double dRate
);
102 STDMETHODIMP
GetRate(double* pdRate
);
105 STDMETHODIMP
SetWindowPosition(long Left
, long Top
, long Width
, long Height
);
108 STDMETHODIMP
SetDestinationPosition(long Left
, long Top
, long Width
, long Height
);
109 STDMETHODIMP
GetVideoSize(long* pWidth
, long* pHeight
);
112 STDMETHODIMP
put_Volume(long lVolume
);
113 STDMETHODIMP
get_Volume(long* plVolume
);
116 STDMETHODIMP
Step(DWORD dwFrames
, IUnknown
* pStepObject
);
117 STDMETHODIMP
CanStep(long bMultiple
, IUnknown
* pStepObject
);
118 STDMETHODIMP
CancelStep();
121 STDMETHODIMP_(engine_t
) GetEngine();
125 using namespace DSObjects
;