0

I'm looking for a working alternative to make this work

My target is a Generic Computer(so it would tentatively work on every's client computer), i've tried for months with the IMFTransform library, but on my computer (even with different filters on MFTEnumEx), I couldn't get an IMFTransform that was d3d11_aware [I've asked on this page and tried all of these answers : How to get an IMFTransform that is d3d_aware (To encode input from Windows Duplication API to H264)? ]

Since this library isn't working for me, I'm looking for an alternative. I've heard there is FFMPEG for encoding, but so far i couldn't find evidence it can take DXGI_FORMAT_B8G8R8A8_UNORM as input . If there is a way, i will go full gas on researching it , I only need direction

edit1 (on edit2 i'll leave the fix of this, in case it can help someone ) :

The problem apparently was when retrieving imfAttributes, it was coming empty I've just found that with Hardware_flag filter there actually is one at ppActivate[0], but I get an Exception when i check it's attributtes, when i jump the step of checking on the ppActivates[] if MF_SA_D3D_AWARE, apparently the IMFTransform works fine

IMFAttributes* imfAttributes;
CatchError(pTransform->GetAttributes(&imfAttributes), (LPSTR)"Error getAttributes from pTransform");
CatchError(imfAttributes->GetUINT32(MF_SA_D3D_AWARE,0), (LPSTR)"Error pTransform not D3D_AWARE"); 

when running, at the last line i got Exception thrown at 0x00007FFC7EEED4CB (mfplat.dll) in VRscreenStreamer.exe: 0xC0000005: Access violation writing location 0x0000000000000000

edit2 :To fix that, i used MFGetAttributeUINT32 instead of GetUINT32 :

BOOL bD3DAware = FALSE;
bD3DAware = MFGetAttributeUINT32(imfAttributes, MF_SA_D3D11_AWARE, FALSE);
  • 1
    What do you mean by "generic computer" or "every client computer"? You mean a computer that doesn't have any hardware acceleration? Like a computer from 20 years ago? Have you even tried Roman's tool? If the tool successfully reports MFT, then your code should be able to use them. You should provide a sample to the initial question that demonstrates your problem, indicates exactly what minimum platform and hardware you intend to support, etc. – Simon Mourier Jan 12 '20 at 07:59
  • Starting with an i3 and windows 8.1 is right yes right, i actually was getting an Hardware MFT but, i thought it wasn't working because an exception on another line of code (that worked on a Software MFT) many thanks, it's fixed – Ezequiel Berazategui Jan 12 '20 at 10:12
  • 1
    Please add the solution as an answer instead of editing the question. To make this case clearer so that people who encounter the same problem can catch it more easily. – Drake Wu Jan 14 '20 at 09:30

0 Answers0