none
Custom Media Sink Help needed (MF_E_TRANSFORM_NEED_MORE_INPUT) RRS feed

  • Question

  • Hello,

    I am trying to create a custom media sink (and stream sink) for video playback in OpenGL using C# and MediaFoundation.NET.
    My issue is that my Stream Sink never receives any samples.
    My testing scenario is a simple mp4 file, MediaSession with my video sink and default audio sink directly connected to the Media Source and resolved with the TopologyLoader.

    Using MFTrace i have found that somewhere in the topology an MFT keeps raising this error:
    MF_E_TRANSFORM_NEED_MORE_INPUT.

    I have setup my stream sink to only accept RGB32 samples, so I suppose that in the topology some conversion from h.264 YV12 (or similiar) to RGB32 happens. However, I cannot pinpoint which MFT is failing (the decoder, the color transform, or some other).

    Sidenote: I have no idea how the topology looks in the end because I am not familiar with MFTrace Output and the article 'Automating Trace Analysis' from the Media Foundation Blog references cmd files that are not available anymore. If anyone has them (or maybe MS themselves) I would appreciate if they would re-upload them somewhere.

    If any more details are required, I can provide full traces or snippets.

    Thanks in advance,

    John

    Update

    I have programmatically iterated through the completed topology, and this is what I found (for the video path):
    Source -> (Video, h264) -> MFTransform -> (Video, NV12) -> MFTransform -> (Video, RGB32) -> My Media Sink

    Still have no idea how to find wich MFTransform is giving the error.

    Update 2

    If I try to set the Input media format of my Stream Sink to NV12, everything seems to work fine, so I guess this is a problem of the Color Transform MFT interacting with the h.264 decoder

    • Edited by JPSgfx Thursday, September 6, 2018 6:46 AM
    Wednesday, September 5, 2018 9:39 AM