Does Media Foundation Transform support h.264 video decoding in Windows?

Anil 20 Reputation points
2023-11-08T10:00:53.0633333+00:00

I'm trying to decode h264 video in windows using Media Foundation.

I cannot use the source resolver as I need to decode one frame at a time from a buffer - hence planning to use Media Foundation Transforms (ProcessInput and ProcessOutput) directly.

Is the h.264 decoder supported in Windows? The goal is to only decode the frame data into a buffer and not to render it.

Also I'm assuming the simplified steps are as follows - correct me if I'm wrong.

  • Initialize MF
  • CreateDecoder (CoCreateInstance or MFTEnumEx)
  • transform->SetInputType and SetOutputType
  • Provide input through ProcessInput with an IMFMediaBuffer
  • If it succeeds ProcessOutput to an MFT_OUTPUT_DATA_BUFFER
  • Extract DXGIBuffer from the sample to access the decoded frame data.
Windows development | Windows API - Win32
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2023-11-08T13:38:03.94+00:00
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.