Hello,
What I'm trying to do is the following:
I have a video player and I would like to get a BITMAPINFO structure.
Media Foundation offers the possibility to get a BITMAPINFOHEADER by using IMFVideoDisplayControl.GetCurrentImage.
So far I got the Header and put it in the bmiHeader section of the BITMAPINFO.
What I still got to do is populate the bmiColors section of the BITMAPINFO structure.
How can I do this?
My function looks like this:
BITMAPINFO* ToTopoBuilderMF::GetCurrentImageBitMapInfo(){
BITMAPINFO* pbmfh = NULL;
BITMAPINFOHEADER Bih;
BYTE* pbDIB;
DWORD pcbDib;
LONGLONG llTimeStamp;
Bih.biSize = sizeof(BITMAPINFOHEADER);
if (m_pVideoDisplay)
{
m_pVideoDisplay->GetCurrentImage(&Bih,&pbDIB,&pcbDib,&llTimeStamp);
pbmfh->bmiHeader = Bih;
}
CoTaskMemFree(pbDIB);
return pbmfh;
}
Best Regards,
Alin Ionascu