locked
Eventing in MFT for ProcessInput RRS feed

  • Question

  • Hi,

    I have a doubt over MFT , can MFT send a Event to the Application from ProcessInput() function, if so whats the interface to be used for the same.

     

    This is because i need the processInput to be called asyncronously with out the intervention of processOutput() function,OR Is there is a way to define the MFT by which ProcessInput can be called "n" times before a ProcessOutput being called, by which i can queue the data in input side and process it and notify the application that the data is ready for output.

     

    Thanks in advance,

     

    Vicky

    Monday, October 15, 2007 12:55 PM

Answers

  • No.  For example, if you're running this in the MF Media Session (a la WMP or probably any other playback application), the first data-processing call to your MFT will likely be ProcessOutput.  (... To which you return MF_E_TRANSFORM_NEED_MORE_INPUT, and then MF goes upstream and tries to generate you some input)

     

     

    Friday, October 19, 2007 2:57 PM

All replies

  • This is one of the known shortcomings of today's MFT model: The MFT gets no say in when ProcessInput and ProcessOutput is called.  Here's the general pattern by which the MF pipeline calls ProcessInput/ProcessOutput on an MFT (I'm omitting some details for the sake of clarity):

    1. When the MF pipeline wants a sample from the MFT to send downstream, it calls ProcessOutput.  The timing of these requests is typically controlled by the rate at which the downstream Media Sink is requesting samples.  ProcessOutput can do one of two things:
      1. Deliver a sample
      2. Return MF_E_TRANSFORM_NEED_MORE_INPUT.  The pipeline responds to this by going to the next node upstream and trying to produce data there.
    2. When the MF pipeline has input for the MFT, it calls ProcessInput.  The timing of these requests is typically controlled by the rate at which upstream components are producing data (which, in turn, is usually a result of the rate at which the downstream components were requesting data...).  Then MF calls ProcessOutput, which can either deliver a sample or return MF_E_TRANSFORM_NEED_MORE_INPUT.
    Tuesday, October 16, 2007 1:28 PM
  • > When the MF pipeline has input for the MFT, it calls ProcessInput. ..  Then MF calls ProcessOutput, which can either > deliver a sample or return

    Is it guaranteed that ProcessOutput will be called only after ProcessInput has returned?

     

     

     

    Wednesday, October 17, 2007 8:07 PM
  • I think you should consider a DirectShow-based solution. DirectShow seems to be more flexible in this particular instance.

    Thursday, October 18, 2007 5:43 AM
  • No.  For example, if you're running this in the MF Media Session (a la WMP or probably any other playback application), the first data-processing call to your MFT will likely be ProcessOutput.  (... To which you return MF_E_TRANSFORM_NEED_MORE_INPUT, and then MF goes upstream and tries to generate you some input)

     

     

    Friday, October 19, 2007 2:57 PM