| 1 | #ifndef WINE_DSHOW_FGRAPH_H
|
|---|
| 2 | #define WINE_DSHOW_FGRAPH_H
|
|---|
| 3 |
|
|---|
| 4 | /*
|
|---|
| 5 | implements CLSID_FilterGraph.
|
|---|
| 6 |
|
|---|
| 7 | - At least, the following interfaces should be implemented:
|
|---|
| 8 |
|
|---|
| 9 | IUnknown
|
|---|
| 10 | + IPersist
|
|---|
| 11 | + IDispatch
|
|---|
| 12 | + IFilterGraph - IGraphBuilder - IFilterGraph2
|
|---|
| 13 | + IGraphVersion
|
|---|
| 14 | + IGraphConfig
|
|---|
| 15 | + IDispatch - IMediaControl
|
|---|
| 16 | + IPersist - IMediaFilter
|
|---|
| 17 | + IDispatch - IMediaEvent - IMediaEventEx
|
|---|
| 18 | + IMediaEventSink
|
|---|
| 19 | + IDispatch - IMediaPosition
|
|---|
| 20 | + IMediaSeeking
|
|---|
| 21 | + IDispatch - IBasicVideo[2] (pass to a renderer)
|
|---|
| 22 | + IDispatch - IBasicAudio (pass to a renderer)
|
|---|
| 23 | + IDispatch - IVideoWindow (pass to a renderer)
|
|---|
| 24 | (following interfaces are not implemented)
|
|---|
| 25 | + IMarshal
|
|---|
| 26 | + IFilterMapper2 - IFilterMapper3
|
|---|
| 27 | FIXME - Are there any missing interfaces???
|
|---|
| 28 | */
|
|---|
| 29 |
|
|---|
| 30 | #include "iunk.h"
|
|---|
| 31 | #include "complist.h"
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | typedef struct FG_IPersistImpl
|
|---|
| 35 | {
|
|---|
| 36 | ICOM_VFIELD(IPersist);
|
|---|
| 37 | } FG_IPersistImpl;
|
|---|
| 38 |
|
|---|
| 39 | typedef struct FG_IDispatchImpl
|
|---|
| 40 | {
|
|---|
| 41 | ICOM_VFIELD(IDispatch);
|
|---|
| 42 | } FG_IDispatchImpl;
|
|---|
| 43 |
|
|---|
| 44 | typedef struct FG_IFilterGraph2Impl
|
|---|
| 45 | {
|
|---|
| 46 | ICOM_VFIELD(IFilterGraph2);
|
|---|
| 47 | } FG_IFilterGraph2Impl;
|
|---|
| 48 |
|
|---|
| 49 | typedef struct FG_IGraphVersionImpl
|
|---|
| 50 | {
|
|---|
| 51 | ICOM_VFIELD(IGraphVersion);
|
|---|
| 52 | } FG_IGraphVersionImpl;
|
|---|
| 53 |
|
|---|
| 54 | typedef struct FG_IGraphConfigImpl
|
|---|
| 55 | {
|
|---|
| 56 | ICOM_VFIELD(IGraphConfig);
|
|---|
| 57 | } FG_IGraphConfigImpl;
|
|---|
| 58 |
|
|---|
| 59 | typedef struct FG_IMediaControlImpl
|
|---|
| 60 | {
|
|---|
| 61 | ICOM_VFIELD(IMediaControl);
|
|---|
| 62 | } FG_IMediaControlImpl;
|
|---|
| 63 |
|
|---|
| 64 | typedef struct FG_IMediaFilterImpl
|
|---|
| 65 | {
|
|---|
| 66 | ICOM_VFIELD(IMediaFilter);
|
|---|
| 67 | } FG_IMediaFilterImpl;
|
|---|
| 68 |
|
|---|
| 69 | typedef struct FG_IMediaEventImpl
|
|---|
| 70 | {
|
|---|
| 71 | ICOM_VFIELD(IMediaEventEx);
|
|---|
| 72 | } FG_IMediaEventImpl;
|
|---|
| 73 |
|
|---|
| 74 | typedef struct FG_IMediaEventSinkImpl
|
|---|
| 75 | {
|
|---|
| 76 | ICOM_VFIELD(IMediaEventSink);
|
|---|
| 77 | } FG_IMediaEventSinkImpl;
|
|---|
| 78 |
|
|---|
| 79 | typedef struct FG_IMediaPositionImpl
|
|---|
| 80 | {
|
|---|
| 81 | ICOM_VFIELD(IMediaPosition);
|
|---|
| 82 | } FG_IMediaPositionImpl;
|
|---|
| 83 |
|
|---|
| 84 | typedef struct FG_IMediaSeekingImpl
|
|---|
| 85 | {
|
|---|
| 86 | ICOM_VFIELD(IMediaSeeking);
|
|---|
| 87 | } FG_IMediaSeekingImpl;
|
|---|
| 88 |
|
|---|
| 89 | typedef struct FG_IBasicVideoImpl
|
|---|
| 90 | {
|
|---|
| 91 | ICOM_VFIELD(IBasicVideo2);
|
|---|
| 92 | } FG_IBasicVideoImpl;
|
|---|
| 93 |
|
|---|
| 94 | typedef struct FG_IBasicAudioImpl
|
|---|
| 95 | {
|
|---|
| 96 | ICOM_VFIELD(IBasicAudio);
|
|---|
| 97 | } FG_IBasicAudioImpl;
|
|---|
| 98 |
|
|---|
| 99 | typedef struct FG_IVideoWindowImpl
|
|---|
| 100 | {
|
|---|
| 101 | ICOM_VFIELD(IVideoWindow);
|
|---|
| 102 | } FG_IVideoWindowImpl;
|
|---|
| 103 |
|
|---|
| 104 | typedef struct FilterGraph_MEDIAEVENT FilterGraph_MEDIAEVENT;
|
|---|
| 105 |
|
|---|
| 106 | typedef struct CFilterGraph
|
|---|
| 107 | {
|
|---|
| 108 | QUARTZ_IUnkImpl unk;
|
|---|
| 109 | FG_IPersistImpl persist;
|
|---|
| 110 | FG_IDispatchImpl disp;
|
|---|
| 111 | FG_IFilterGraph2Impl fgraph;
|
|---|
| 112 | FG_IGraphVersionImpl graphversion;
|
|---|
| 113 | FG_IGraphConfigImpl grphconf;
|
|---|
| 114 | FG_IMediaControlImpl mediacontrol;
|
|---|
| 115 | FG_IMediaFilterImpl mediafilter;
|
|---|
| 116 | FG_IMediaEventImpl mediaevent;
|
|---|
| 117 | FG_IMediaEventSinkImpl mediaeventsink;
|
|---|
| 118 | FG_IMediaPositionImpl mediaposition;
|
|---|
| 119 | FG_IMediaSeekingImpl mediaseeking;
|
|---|
| 120 | FG_IBasicVideoImpl basvid;
|
|---|
| 121 | FG_IBasicAudioImpl basaud;
|
|---|
| 122 | FG_IVideoWindowImpl vidwin;
|
|---|
| 123 |
|
|---|
| 124 | /* IDispatch fields. */
|
|---|
| 125 | /* IFilterGraph2 fields. */
|
|---|
| 126 | QUARTZ_CompList* m_pFilterList;
|
|---|
| 127 | /* IGraphVersion fields. */
|
|---|
| 128 | CRITICAL_SECTION m_csGraphVersion;
|
|---|
| 129 | LONG m_lGraphVersion;
|
|---|
| 130 | /* IMediaControl fields. */
|
|---|
| 131 | /* IMediaFilter fields. */
|
|---|
| 132 | CRITICAL_SECTION m_csGraphState;
|
|---|
| 133 | FILTER_STATE m_stateGraph; /* must NOT accessed directly! */
|
|---|
| 134 | CRITICAL_SECTION m_csClock;
|
|---|
| 135 | IReferenceClock* m_pClock;
|
|---|
| 136 | /* IMediaEvent fields. */
|
|---|
| 137 | HANDLE m_hMediaEvent;
|
|---|
| 138 | CRITICAL_SECTION m_csMediaEvents;
|
|---|
| 139 | FilterGraph_MEDIAEVENT* m_pMediaEvents;
|
|---|
| 140 | ULONG m_cbMediaEventsPut;
|
|---|
| 141 | ULONG m_cbMediaEventsGet;
|
|---|
| 142 | ULONG m_cbMediaEventsMax;
|
|---|
| 143 | HWND m_hwndEventNotify;
|
|---|
| 144 | long m_lEventNotifyMsg;
|
|---|
| 145 | LONG_PTR m_lEventNotifyParam;
|
|---|
| 146 | long m_lEventNotifyFlags;
|
|---|
| 147 | /* IMediaEventSink fields. */
|
|---|
| 148 | /* IMediaPosition fields. */
|
|---|
| 149 | /* IMediaSeeking fields. */
|
|---|
| 150 | /* IBasicVideo2 fields. */
|
|---|
| 151 | /* IBasicAudio fields. */
|
|---|
| 152 | /* IVideoWindow fields. */
|
|---|
| 153 | } CFilterGraph;
|
|---|
| 154 |
|
|---|
| 155 | #define CFilterGraph_THIS(iface,member) CFilterGraph* This = ((CFilterGraph*)(((char*)iface)-offsetof(CFilterGraph,member)))
|
|---|
| 156 | #define CFilterGraph_IPersist(th) ((IPersist*)&((th)->persist))
|
|---|
| 157 | #define CFilterGraph_IDispatch(th) ((IDispatch*)&((th)->disp))
|
|---|
| 158 | #define CFilterGraph_IFilterGraph2(th) ((IFilterGraph2*)&((th)->fgraph))
|
|---|
| 159 | #define CFilterGraph_IMediaControl(th) ((IMediaControl*)&((th)->mediacontrol))
|
|---|
| 160 | #define CFilterGraph_IMediaFilter(th) ((IMediaFilter*)&((th)->mediafilter))
|
|---|
| 161 | #define CFilterGraph_IMediaEventEx(th) ((IMediaEventEx*)&((th)->mediaevent))
|
|---|
| 162 | #define CFilterGraph_IMediaEventSink(th) ((IMediaEventSink*)&((th)->mediaeventsink))
|
|---|
| 163 |
|
|---|
| 164 | HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj);
|
|---|
| 165 |
|
|---|
| 166 | HRESULT CFilterGraph_InitIPersist( CFilterGraph* pfg );
|
|---|
| 167 | void CFilterGraph_UninitIPersist( CFilterGraph* pfg );
|
|---|
| 168 | HRESULT CFilterGraph_InitIDispatch( CFilterGraph* pfg );
|
|---|
| 169 | void CFilterGraph_UninitIDispatch( CFilterGraph* pfg );
|
|---|
| 170 | HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg );
|
|---|
| 171 | void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg );
|
|---|
| 172 | HRESULT CFilterGraph_InitIGraphVersion( CFilterGraph* pfg );
|
|---|
| 173 | void CFilterGraph_UninitIGraphVersion( CFilterGraph* pfg );
|
|---|
| 174 | HRESULT CFilterGraph_InitIGraphConfig( CFilterGraph* pfg );
|
|---|
| 175 | void CFilterGraph_UninitIGraphConfig( CFilterGraph* pfg );
|
|---|
| 176 | HRESULT CFilterGraph_InitIMediaControl( CFilterGraph* pfg );
|
|---|
| 177 | void CFilterGraph_UninitIMediaControl( CFilterGraph* pfg );
|
|---|
| 178 | HRESULT CFilterGraph_InitIMediaFilter( CFilterGraph* pfg );
|
|---|
| 179 | void CFilterGraph_UninitIMediaFilter( CFilterGraph* pfg );
|
|---|
| 180 | HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg );
|
|---|
| 181 | void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg );
|
|---|
| 182 | HRESULT CFilterGraph_InitIMediaEventSink( CFilterGraph* pfg );
|
|---|
| 183 | void CFilterGraph_UninitIMediaEventSink( CFilterGraph* pfg );
|
|---|
| 184 | HRESULT CFilterGraph_InitIMediaPosition( CFilterGraph* pfg );
|
|---|
| 185 | void CFilterGraph_UninitIMediaPosition( CFilterGraph* pfg );
|
|---|
| 186 | HRESULT CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg );
|
|---|
| 187 | void CFilterGraph_UninitIMediaSeeking( CFilterGraph* pfg );
|
|---|
| 188 | HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg );
|
|---|
| 189 | void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg );
|
|---|
| 190 | HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg );
|
|---|
| 191 | void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg );
|
|---|
| 192 | HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg );
|
|---|
| 193 | void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg );
|
|---|
| 194 |
|
|---|
| 195 |
|
|---|
| 196 | #endif /* WINE_DSHOW_FGRAPH_H */
|
|---|