Hi,
I've been working for a little time with Media Foundation, trying to implement an application I had once created with DShow. This is a C# form using a wrapper and a filter to play a video file applying a transform.
With DShow, I was able to write a filter to write on the video, using a HBITMAP and the m_pinput properties in the CTransformFilter Class. In MF, I'm not able to reproduce the same process like that.
So my question is : "Is it possible to write a filter with MF, which would allow to write on the video (using Superimposition)
Thanks

Superimposition filter with MF
MaggieChan
Try writing an MFT (Media Foundation transform). Take a look at the GrayscaleMFT sample in the Windows SDK, it should get you started.
----------------------------------------------------------------------------
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
(c) 2007 Microsoft Corporation. All rights reserved.
Scott Butler
Thank you for your answer.
I finally found a way to implement my filter. The true hidden question surely was : "Is ther an easy way to do this, as in DShow it's not that difficult".
What I did was :
write a function which passes from NV12 to RGB (WMV9 sample files was in that format)
write a function which creates a bitmap (mapping text) on my frames (putting it upside-down before, because of the Bottom-Top property of Bitmaps).
write the reciproque function to the first : RGB to NV12
As you can imagine, my filter hardly works in "Real-Time" Mode. So I finally have to throw it away and come back to DShow, at least until there is a better way to apply that kind of filters on a live streaming. (Media Foundation is expected to evolve, no )
Sincerely
Gromlir
Alex Terem
I've already written a filter for MF. But my goal is to write one which would allow to put text on the video. I'm trying to do sth more sophisticated than just keeping luminance in a YUV media. I think I have to do sth more than just manipulating pixel by pixel each frame.
As I said, for DShow, I was using proerties of the CTransformFilter Class, which does not exist in MF.
So, my question still is : "Is it possible to write more complex filters than Grayscale, like the one I'm trying to do ; or is it not the time for MF to allow this (maybe in V2 ) "
olelar
The Grayscale MFT sample is there mostly to show you around the mechanics of implementing an MFT; of course we expect MFTs in the wild to be doing something more complex.
So I want to try to understand more about what's more complex about your MFT and why you think MF may not allow it. Certainly, if this is about adding text to the video frames, you should be able to do that. Are you asking about whether we have specific video processing helpers such as one that would overlay text on the video (we don't) Or is there some other challenge you're facing