View Single Post
Old 7th May 2021, 22:59   #61466  |  Link
DennisF
Registered User
 
Join Date: Apr 2021
Posts: 2
Hi all, I'm trying my hand at building a source filter to feed into madVR. If I build a simple CTransformFilter connected between a source and madVR and then in::Transform(IMediaSample* pIn, IMediaSample* pOut) call pOut->QueryInterface(&pMediaSideData), pMediaSideData is a valid pointer to a IMediaSideData structure (LAV definition) and madVR picks that up as expected.

Now if I try to DIY a source and pin by deriving from CBaseOutputPin, connect that to madVR's input pin and and in there override :: DecideAllocator(IMemInputPin* pPin, IMemAllocator** ppAlloc) to just do a pPin->GetAllocator(ppAlloc); that leads to a valid allocator from madVR (at least I think so because msvc debugger has no symbols and madvr.ax shows up on some parts, so working assumption is that it's what I expect). Then doing a m_pAllocator->GetBuffer(&pSample, NULL, NULL, 0); to get an IMediaSample filled works as expected and gives me video output. However pOut->QueryInterface(&pMediaSideData) leads to a nullptr in pMediaSideData. I'm a bit baffled as to what's going on here. Any tips?
DennisF is offline   Reply With Quote