How to use hardware H.264 encoder in Windows Media Foundation
问题 I'm writing a program using H.264 encoder MFT to do video encoding. The way I'm using to select/create the encoder is like: MFT_REGISTER_TYPE_INFO encoderInfo; encoderInfo.guidMajorType = MFMediaType_Video; encoderInfo.guidSubtype = MFVideoFormat_H264; // H.264 Encoder class id is not exposed, so we have to enumerate HRESULT hr = MFTEnum(MFT_CATEGORY_VIDEO_ENCODER, 0, NULL, &encoderInfo, NULL, &pCLSIDs, &nCount); if (nCount == 0) { break; } //Create H.264 Encoder MFT instance ciEncoder