2 * Implementation of CLSID_SeekingPassThru.
4 * hidenori@a2.ctktv.ne.jp
13 #include "wine/obj_base.h"
17 #include "debugtools.h"
18 DEFAULT_DEBUG_CHANNEL(quartz
);
20 #include "quartz_private.h"
26 ISeekingPassThru_fnQueryInterface(ISeekingPassThru
* iface
,REFIID riid
,void** ppobj
)
28 CSeekingPassThru_THIS(iface
,seekpass
);
30 TRACE("(%p)->()\n",This
);
32 return IUnknown_QueryInterface(This
->unk
.punkControl
,riid
,ppobj
);
36 ISeekingPassThru_fnAddRef(ISeekingPassThru
* iface
)
38 CSeekingPassThru_THIS(iface
,seekpass
);
40 TRACE("(%p)->()\n",This
);
42 return IUnknown_AddRef(This
->unk
.punkControl
);
46 ISeekingPassThru_fnRelease(ISeekingPassThru
* iface
)
48 CSeekingPassThru_THIS(iface
,seekpass
);
50 TRACE("(%p)->()\n",This
);
52 return IUnknown_Release(This
->unk
.punkControl
);
56 ISeekingPassThru_fnInit(ISeekingPassThru
* iface
,BOOL bRendering
,IPin
* pPin
)
58 CSeekingPassThru_THIS(iface
,seekpass
);
60 FIXME("(%p)->(%d,%p) stub!\n",This
,bRendering
,pPin
);
66 static ICOM_VTABLE(ISeekingPassThru
) iseekingpassthru
=
68 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
70 ISeekingPassThru_fnQueryInterface
,
71 ISeekingPassThru_fnAddRef
,
72 ISeekingPassThru_fnRelease
,
73 /* ISeekingPassThru fields */
74 ISeekingPassThru_fnInit
,
78 HRESULT
CSeekingPassThru_InitISeekingPassThru(CSeekingPassThru
* This
)
81 ICOM_VTBL(&This
->seekpass
) = &iseekingpassthru
;
87 void CSeekingPassThru_UninitISeekingPassThru(CSeekingPassThru
* This
)
93 /* can I use offsetof safely? - FIXME? */
94 static QUARTZ_IFEntry IFEntries
[] =
96 { &IID_ISeekingPassThru
, offsetof(CSeekingPassThru
,seekpass
)-offsetof(CSeekingPassThru
,unk
) },
100 static void QUARTZ_DestroySeekingPassThru(IUnknown
* punk
)
102 CSeekingPassThru_THIS(punk
,unk
);
104 CSeekingPassThru_UninitISeekingPassThru(This
);
107 HRESULT
QUARTZ_CreateSeekingPassThru(IUnknown
* punkOuter
,void** ppobj
)
109 CSeekingPassThru
* This
;
112 TRACE("(%p,%p)\n",punkOuter
,ppobj
);
114 This
= (CSeekingPassThru
*)QUARTZ_AllocObj( sizeof(CSeekingPassThru
) );
116 return E_OUTOFMEMORY
;
118 QUARTZ_IUnkInit( &This
->unk
, punkOuter
);
119 hr
= CSeekingPassThru_InitISeekingPassThru(This
);
122 QUARTZ_FreeObj( This
);
126 This
->unk
.pEntries
= IFEntries
;
127 This
->unk
.dwEntries
= sizeof(IFEntries
)/sizeof(IFEntries
[0]);
128 This
->unk
.pOnFinalRelease
= QUARTZ_DestroySeekingPassThru
;
130 *ppobj
= (void*)(&This
->unk
);