Tee nodes with custom MFTs as outputs RRS feed

  • Question

  • Hi guys,

    Hopefully you have an idea on what I am observing. To give you guys a background on my application. I originally setup a pipeline that would take some user video editing requests and applies them to the frames. For example, users want to chop the video into shorter pieces and apply color conversion, Resizing, frame rate change and other desired action. This is done by selecting time markers and set of transformations known by my API. To achieve this I wrote a custom MFT node and added it in my pipeline. There were some limitations that were needed to be resolved for future releases. There is a need to perform several requests with overlapping time frames with different transformations for each request. For example one segment needs to be turned into grayscale while the others retain their color. This is just an example. Other requirement was to write each segment to a different file, rather than writing all of them to one file. 10 video segments would result in 10 output files, rather than 10 transformations to 1 file. Technically 1 sink per request.

    I looked into the possibility of using Tee nodes. I added a tee node between the decoder and the custom MFT . Then I proceeded to create multiple instances of my custom MFTs. Each custom MFT was therefore connected to a media sink. With this I could perform different conversions and create multiple output files at the same time.

    One responsibility of each custom MFT is to inspect the input sample and make sure that sample is in the time frame the user requested. Therefore there is a need to discard a sample if it does not fall into the desired time frame. To discard samples, the ProcessOutput will return MF_E_TRANSFORM_NEED_MORE_INPUT.

    Issue I see is that I receive an MFERROR with the hresult E_OUTOFMEMORY. 


    1) How does the session handle multiple requests from the tee node branches, such as multiple MF_E_TRANSFORM_NEED_MORE_INPUT or multiple MEStreamSinkRequestSample?

    2) Are the samples getting queued up?

    I think the samples are getting queued, therefore the process is running out of memory. Are Tee nodes supposed to be used with Media Sinks or should the location of the tee node in the pipeline be irrelevant?

    Sorry if the problem is complicated and unclear.

    • Edited by Kevin S P Friday, March 6, 2015 10:00 PM Corrections
    Friday, March 6, 2015 9:56 PM