I am trying an encoding program on Windows 8.1/Visual C++ 2013 by referring this page. I tried various ways in the combination of MFVideoFormat_H264 and MFAudioFormat_AAC with MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS parameter. However, when IMFSinkWriter::WriteSample is called, it consumes many CPU resources.
That seems hardly processing hardware. Isn't this function supported yet in Windows 8, or is it a pre-processing required for this program?
IMFAttributes *spattr = NULL; MFCreateAttributes(&spattr, 10); spattr->SetUINT32(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, TRUE); //spattr->SetUINT32(MF_READWRITE_DISABLE_CONVERTERS, FALSE); spattr->SetUINT32(MF_LOW_LATENCY, TRUE); spattr->SetGUID(MF_TRANSCODE_CONTAINERTYPE, MFTranscodeContainerType_MPEG4); hr = MFCreateSinkWriterFromURL(path, NULL, spattr, &writer);