Overlaying Simple Text on a video capture Application
Hi All,
I am a beginning programmer and this is my first time doing any DirectShow Application and was hoping that I could be provided with some help.
Basically, I want to use the playcap.exe (packaged in the c++ samples folder) video capture application and overlay text on the video. I read everywhere that I would have to define a vmr9AlphaBitmap and "blend" it into the video. Is this the only or easiest way to accomplish this? (Eg. text.exe) Again, all I want to overlay is simple text.
Also, could is it possible to edit the bitmap during runtime with different texts, if so what would be the logic? Thank you.
[654 byte] By [
SeanK] at [2007-12-22]
The alpha blended bitmap is the most current method and you can update your bitmap at any time.
Another method is to use the older hardware overlay render which uses a color key to display the video. You can then draw text or graphics in the color key area in other than the color key color and it will show on top of the video.
Thanks Doug.
Well, I've been trying with a different method now, with the windows function ExtTextOut, it does draw the text, but the streaming video seems to override it everytime. I'm guessing to force a call to it somehow very quickly.
Is there a way to just have this text displayed on the top of the windows App?
I've been trying to use the IOverlay interface to set the color key, but it compiles but terminates due to an error, I declared the IOverlay like wise.
IOverlay *pOL;
COLORKEY *ckey;
pOL->GetColorKey(ckey);
Then I would set the background of the window by doing something like...
wc.hbrBackground = .....
However, when I call SetColorKey, the program terminates. Is there another way to declare and call the setcolorkey?
Also, when I was working with the VMR9-Text Sample Program, I could directly call ExtTextOut function and it would write on top of the currently playing video, however, with PlayCapMoniker, once the streaming video starts streaming, calling ExtTextOut never writes on top of the video. Will it not until I correctly define the window background?
Thanks