Ivan Leo Puoti wrote:
@@ -282,9 +283,15 @@ { IAMMultiMediaStreamImpl *This = (IAMMultiMediaStreamImpl *)iface;
- FIXME("(%p/%p)->(%s,%lx) stub!\n", This, iface, debugstr_w(pszFileName), dwFlags);
- TRACE("(%p/%p)->(%s,%lx)\n", This, iface, debugstr_w(pszFileName), dwFlags);
- return E_NOTIMPL;
- /* We should check the file format and fail to open it if we can't reder it */
- This->FileHandle = CreateFileW(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
- if(This->FileHandle == INVALID_HANLDE_VALUE)
return E_FAIL;
- return CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&This->pFilterGraph);
}
This is wrong. Here is the pseudo-code I sent to Peter Åstrand for the very same function:
CoCreateInstance with IFileSourceFilter on CLSID_AsyncReader. Call IFileSourceFilter_Load. Get the output pin and stash it in This. Call IGraphBuilder_AddSourceFilter.
Then IAMMultiMediaStreamImpl_Render should do the following: Call IGraphBuilder_Render using the pin previously stashed away.