简体   繁体   中英

How use MFT in windows application without using media transform pipeline

I am newbie in media foundation programming and windows programing as well.

It might looks very silly question but i didn't get clear answer anywhere.

My application is to capture screen, scale, encode and send the data to network. I am looking to improve the performance of my pipeline. so i want to change some intermediate libraries like scaling or encoding libraries.

When i do a lot of search for better option of scaling and encoding, i end up with some MFT(media foundation transform) eg Video Processor MFT and H.264 Video Encoder MFT .

My application already implemented pipeline and i don't want to change complete architecture.

can we directly use MFT as a library and add in my project? or i have to build complete pipeline, source and sink. As per architecture of Media foundation a MFT is intermediate block. It requires IMFTransform::GetInputStreamInfo and IMFTransform::GetOutputStreamInfo. Is it any way to call direct API's of MFT to perform (scaling and encoding) with creating complete pipeline?

Please provide link if any similar question already asked.

Yes you can create this IMFTransform directly and use it in isolation from pipeline. It is very typical usage model for encoder MFT. You will need to configure input / output media types, start streaming, feed input frames and grab output frames.

Depending on whether your transform is synchronous or asynchronous (which may differ depending on HW or SW implementation of your MFT) you may need use basic ( https://msdn.microsoft.com/en-us/library/windows/desktop/aa965264(v=vs.85).aspx ) or async ( https://msdn.microsoft.com/en-us/library/windows/desktop/dd317909(v=vs.85).aspx ) processing model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM