DirectShow 8.1 .. Problem Connecting two filters.
-
I am trying to connect 3 filter together.. pSrc is my souce capture device filter.. it is connected to a smartTee filter through RenderStream method,(this part works ok). However, when i tried to connect the preview pin from smartTee filter to the input of my VideoRender filter it doesn't work.. can someone see where the problem is? CoCreateInstance(CLSID_SmartTee, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void **)&smartTee); CoCreateInstance(CLSID_VideoRenderer,NULL, CLSCTX_INPROC, IID_IBaseFilter,(void**)&VideoRender); pGraph->AddFilter(VideoRender,L"Video Render Device"); pGraph->AddFilter(smartTee, L"Smart Tea"); pBuilder->RenderStream(NULL, NULL,pSrc, NULL, smartTee); IPin *pPinOut, // Video port pin on capture filter. *pPinIn; // Input pin on Overlay Mixer. // Find the video port pin. pBuilder->FindPin( smartTee, // Pointer to capture filter. PINDIR_OUTPUT, // Find an output pin. &PIN_CATEGORY_PREVIEW , // Find a video port pin. NULL, // Any media type. TRUE, // Pin must be unconnected. 0, // Retrieve first matching pin. &pPinOut // Address of pointer to pin. ); // Retrieve input pin 0 on the overlay mixer. pBuilder->FindPin(VideoRender, PINDIR_INPUT, NULL, NULL, TRUE, 0, &pPinIn); //Connect the two pins. pGraph->Connect(pPinOut, pPinIn);