locked
MFT_MESSAGE_NOTIFY_END_OF_STREAM vs MFT_MESSAGE_COMMAND_DRAIN RRS feed

  • Question

  • Hi,


    Do you know whats the difference between the "MFT_MESSAGE_NOTIFY_END_OF_STREAM" message and the MFT_MESSAGE_COMMAND_DRAIN for a synchronous MFT?

    I`m  using the AAC decoder and try to convert audio files from AAC to wav. This is working as expected. To get the last bytes of the audio file from the converter I have to drain the converter. Using the MFT_MESSAGE_COMMAND_DRAIN command, I get some unexpected audio frames as well as the audio frames. The documentation says that the MFT discard any data that cannot be processed into a complete output sample. Ok.

    When I use the MFT_MESSAGE_NOTIFY_END_OF_STREAM message I get only the expected audio frames. The documentation says that internally the MFT gets also a drain command. I`m happy that this command is working as expected but it would be great to know why.

    best regards

    saoirse

    Friday, October 13, 2017 7:11 AM

All replies

  • The documentation says that internally the MFT gets also a drain command.
    Where did you find this? MSDN language about MFT_MESSAGE_NOTIFY_END_OF_STREAM is suggesting that handling of this message is optional and draining is to be done separately, typically right after sending end of stream notification.

    http://alax.info/blog/tag/directshow

    Friday, October 13, 2017 11:58 AM