Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Hardware accelerated SinkWriter Example

$
0
0

Does anyone know of, or have a sample of their own they will share, that illustrates how to use MF to create and use a SinkWriter to hardware encode NV12 input to h264?

I can get my code working in software, but I need to utilize hardware encoding resources to lower my cpu usage.  I am working on a Dell Latitude E6450 with both an AMD Radeon HD 8790M, and an Intel Core I7-4800MQ CPU. Both are supposed to support hardware encoding, and have MFTs. 

I would greatly appreciate tips/advice/code samples to correct this problem.

 mftrace shows the following:

For the amd gpu:

11308,EB0 15:22:09.34586 COle32ExportDetours::CoCreateInstance @ Failed to create {ADC9BC80-0F41-46C6-AB75-D693D793597D} AMD H.264 Hardware MFT Encoder (C:\Program Files\Common Files\ATI Technologies\Multimedia\AMDh264Enc32.dll) hr=0x80004005 E_FAIL
11308,EB0 15:22:09.34587 COle32ExportDetours::CoCreateInstance @ call to 'hr' failed (hr=0x80004005) at avcore\mf\samples\mf360\mftrace\mfdetours\otherdetours\ole32exportdetours.cpp:116
11308,EB0 15:22:09.34587 COle32ExportDetours::CoCreateInstance @ - exit (failed hr=0x80004005 E_FAIL)
11308,EB0 15:22:09.34587 CMFActivateDetours::ActivateObject @0078D1C0 call to 'FindDetouredVtbl( This->lpVtbl )->ActivateObject( This, riid, ppv )' failed (hr=0x80004005) at avcore\mf\samples\mf360\mftrace\mfdetours\interfacedetours\mfactivatedetours.cpp:440
11308,EB0 15:22:09.34587 CMFActivateDetours::ActivateObject @0078D1C0 - exit (failed hr=0x80004005 E_FAIL)

For the Intel cpu/gpu:

6332,CA4 15:24:04.14466 COle32ExportDetours::CoCreateInstance @ Created {4BE8D3C0-0515-4A37-AD55-E4BAE19AF471} Intel® Quick Sync Video H.264 Encoder MFT (C:\Program Files\Intel\Media SDK\mfx_mft_h264ve_w7_32.dll) @07AD3A00 - traced interfaces: IMFTransform @07AD3A00,
6332,CA4 15:24:04.14466 COle32ExportDetours::CoCreateInstance @ - exit
6332,CA4 15:24:04.14466 CMFActivateDetours::GetGUID @0040D218 - enter
6332,CA4 15:24:04.14466 CMFActivateDetours::GetGUID @0040D218 - exit
6332,CA4 15:24:04.14466 CMFActivateDetours::GetUnknown @0040D218 - enter
6332,CA4 15:24:04.14466 CMFActivateDetours::GetUnknown @0040D218 attribute not found guidKey = MFT_FIELDOFUSE_UNLOCK_Attribute
6332,CA4 15:24:04.14611 CMFActivateDetours::GetUnknown @0040D218 - exit (failed hr=0xC00D36E6 MF_E_ATTRIBUTENOTFOUND)
6332,CA4 15:24:04.14611 CMFActivateDetours::GetGUID @0040D218 - enter
6332,CA4 15:24:04.14611 CMFActivateDetours::GetGUID @0040D218 - exit
6332,CA4 15:24:04.14611 CMFActivateDetours::GetUnknown @0040D218 - enter
6332,CA4 15:24:04.14611 CMFActivateDetours::GetUnknown @0040D218 attribute not found guidKey = MFT_PREFERRED_ENCODER_PROFILE
6332,CA4 15:24:04.14611 CMFActivateDetours::GetUnknown @0040D218 - exit (failed hr=0xC00D36E6 MF_E_ATTRIBUTENOTFOUND)
6332,CA4 15:24:04.14611 CMFActivateDetours::GetUnknown @0040D218 - enter
6332,CA4 15:24:04.14612 CMFActivateDetours::GetUnknown @0040D218 attribute not found guidKey = MFT_PREFERRED_OUTPUTTYPE_Attribute
6332,CA4 15:24:04.14612 CMFActivateDetours::GetUnknown @0040D218 - exit (failed hr=0xC00D36E6 MF_E_ATTRIBUTENOTFOUND)
6332,CA4 15:24:04.14612 CMFActivateDetours::GetUINT32 @0040D218 - enter
6332,CA4 15:24:04.14612 CMFActivateDetours::GetUINT32 @0040D218 - exit
6332,CA4 15:24:04.14612 CMFPlatExportDetours::MFGetMFTMerit @ - enter
6332,CA4 15:24:04.19958 CMFPlatExportDetours::MFGetMFTMerit @ Merit validation failed for MFT @07AD3A00 (hr=80004005 E_FAIL)
6332,CA4 15:24:04.19958 CMFPlatExportDetours::MFGetMFTMerit @ - exit (failed hr=0x80004005 E_FAIL)
6332,CA4 15:24:04.20529 CMFActivateDetours::ActivateObject @0040D218 call to 'FindDetouredVtbl( This->lpVtbl )->ActivateObject( This, riid, ppv )' failed (hr=0x80004005) at avcore\mf\samples\mf360\mftrace\mfdetours\interfacedetours\mfactivatedetours.cpp:440
6332,CA4 15:24:04.20529 CMFActivateDetours::ActivateObject @0040D218 - exit (failed hr=0x80004005 E_FAIL)


Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>