Timberwolve

Hello! I use windows media encoder 9 SDK to capture screen. I want to get frames from the stream. In order to do so i use SampleGrabber filter and connect it to WME interface:

Code Block

hr = pSrc->get_TransformCollection(&pTransColl);
hr = pTransColl->Add(&pTransform);
hr = pTransform->SetInput( CComBSTR("TransformPluginWrapper://SampleGrabber"));

// It works okey so far
hr=g_pEncoder->PrepareToEncode(VARIANT_TRUE);

Now i want to get the particular interface from plugin collection:

Code Block

hr = pTransform->GetTransformPlugin(&pPlugin);

IBaseFilter *pGrabber = NULL;

hr = pPlugin->QueryInterface(IID_IBaseFilter,

(LPVOID*)&pGrabber);

And here i ran into a problem. I got the following error: no interface.

Does anybody know how to overcome this

Thanks in advance.