2001-08-28 19:25:39 +02:00
|
|
|
/*
|
|
|
|
* Implementation of CLSID_FilterMapper2.
|
|
|
|
*
|
|
|
|
* FIXME - stub.
|
|
|
|
*
|
|
|
|
* hidenori@a2.ctktv.ne.jp
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
#include "wine/obj_base.h"
|
|
|
|
#include "wine/obj_oleaut.h"
|
|
|
|
#include "strmif.h"
|
|
|
|
#include "control.h"
|
|
|
|
#include "uuids.h"
|
|
|
|
|
|
|
|
#include "debugtools.h"
|
|
|
|
DEFAULT_DEBUG_CHANNEL(quartz);
|
|
|
|
|
|
|
|
#include "quartz_private.h"
|
|
|
|
#include "fmap2.h"
|
|
|
|
|
|
|
|
/* can I use offsetof safely? - FIXME? */
|
|
|
|
static QUARTZ_IFEntry IFEntries[] =
|
|
|
|
{
|
|
|
|
{ &IID_IFilterMapper2, offsetof(CFilterMapper2,fmap3)-offsetof(CFilterMapper2,unk) },
|
|
|
|
{ &IID_IFilterMapper3, offsetof(CFilterMapper2,fmap3)-offsetof(CFilterMapper2,unk) },
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static void QUARTZ_DestroyFilterMapper2(IUnknown* punk)
|
|
|
|
{
|
|
|
|
CFilterMapper2_THIS(punk,unk);
|
|
|
|
|
|
|
|
CFilterMapper2_UninitIFilterMapper3( This );
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT QUARTZ_CreateFilterMapper2(IUnknown* punkOuter,void** ppobj)
|
|
|
|
{
|
|
|
|
CFilterMapper2* pfm;
|
2001-09-07 21:46:49 +02:00
|
|
|
HRESULT hr;
|
2001-08-28 19:25:39 +02:00
|
|
|
|
|
|
|
TRACE("(%p,%p)\n",punkOuter,ppobj);
|
|
|
|
|
|
|
|
pfm = (CFilterMapper2*)QUARTZ_AllocObj( sizeof(CFilterMapper2) );
|
|
|
|
if ( pfm == NULL )
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
QUARTZ_IUnkInit( &pfm->unk, punkOuter );
|
2001-09-07 21:46:49 +02:00
|
|
|
hr = CFilterMapper2_InitIFilterMapper3( pfm );
|
|
|
|
if ( FAILED(hr) )
|
|
|
|
{
|
|
|
|
QUARTZ_FreeObj( pfm );
|
|
|
|
return hr;
|
|
|
|
}
|
2001-08-28 19:25:39 +02:00
|
|
|
|
|
|
|
pfm->unk.pEntries = IFEntries;
|
|
|
|
pfm->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
|
|
|
pfm->unk.pOnFinalRelease = QUARTZ_DestroyFilterMapper2;
|
|
|
|
|
|
|
|
*ppobj = (void*)(&pfm->unk);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|