1
votes

I need your advice. I'd like to develop the app for audio/video splitting using Metro interface.

Usually I use DirectShow for it using the follow schema: create a grabber, add it to DS graph, capture by it the audio/video streams and pass them to my AVstream drivers for splitting. But in new program I want to use Media Foundation and insert it into UWP.

How I see my new app. It must have Metro interface for common control: choice of sources, adding parameters, changing modes and etc. I'd like to use MediaCapture class for capture of streams and rendering them too. Here I don't see any problems, MSDN has many samples for it. But I have no ideas how to insert a grabber between source and render.

Which operations a grabber will do:

  1. Receive input stream from MediaCapture.
  2. Stream converting : YUV -> RGB, adding effects and etc.
  3. Send output stream for rendering (MediaCapture) and to my AVstream driver for splitting with any apps (Skype, Adobe Flash Player, Edge, ....).

How to make a grabber. In MSDN I found three ways:

  1. Sample Grabber Sink (https://msdn.microsoft.com/en-us/library/windows/desktop/hh184779(v=vs.85).aspx). No problem to receive/control/send stream in MF dll. But I don't know how to link that dll with MediaCapture?
  2. Source Reader (https://msdn.microsoft.com/en-us/library/windows/desktop/dd940436(v=vs.85).aspx). The same problems, plus the Source Reader doesn't work for playback.
  3. Custom MFT? Any case MediaCapture allows to connect to MFT by AddEffectAsync().

My environment: MS Windows 10, MS Visual Studio Community 2015.

Thank you for any ideas.

1

1 Answers

0
votes

This question and UWP are not actual for me at all. I found the following:

"Some apps can work intensively in background, for example it maybe video converting, online financial data processing and more. Now UWP application will suspended when it go offscreen."

https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/9950598-exclude-suspending-in-desktop

So if the user minimizes the program window, then the program stops a video stream.