Take the 2-minute tour ×  Basiclly, I want to capture
audio/video. Run it through a mp4 muxer and save it to a file on
disk. Before I used ICaptureGraphBuilder2, but it seems
unusuable when saving to custom formats.  My code so far,  I
enumerate video/audio devices. In this sample I only try to
capture audio. I get the correct device and use GetPin to
enumerate the filters pins to get its output pin.  hr =
pMoniker2->BindToObject(0, 0, IID_IBaseFilter, (void**)&pSrc2);
hr = pGraph->AddFilter(pSrc2, L"AudioCap");  hr = GetPin(pSrc2,
PINDIR_OUTPUT, &outPin);  This is the custom filter, a MP4
muxer. It properly loads and I can get the input pin and connect
it with my output pin. So far so good.  HRESULT hr =
CreateObjectFromPath(TEXT("c:\\filters\\mp4mux.dll"), clsid,
&pUnk); if (SUCCEEDED(hr))     IBaseFilterPtr pFilter = pUnk;
HRESULT hr = pGraph->AddFilter(pFilter, L"Private Filter");
hr = GetPin(pFilter, PINDIR_INPUT, &inPin);  hr =
pGraph->Connect(outPin, inPin);  This is where I get lost, I
can't f