Alpha-Blended DirectX Overlay

Hi,

I would like to create an overlay with a surface that overlays another surface. The specific application is to take the video rendered from a AX control drawing using DX, then create an menu overlay with another DX surface and have the menu alpha-blended over the video surface.

So far I have tried a transparent dialog box, but the video underneith flickers as the region is invalidated. The overlay box fades in and out perfectly, but only when the overlay menu is completely faded out does the video stop flickering.

I do not have control over the video surface, so I would like to do it as a seperate overlay surface.

Any advice or hints would be greatly appreciated!

Bob Scheffler

[732 byte] By [Robert_Scheffler] at [2007-12-21]
# 1
Not sure what your end result should be Bob but it sounds like your background brush is being redrawn when it should not be.
DouglasJordan at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2
negative - I have the same problem here. I have a GDI+ control over the top of an AX control. The GDI+ control uses an SVG library to render SVG via GDI+. The AX control is either Windows Media Player or Quicktime. Basically, the SVG displays fine if the video isn't playing, but once the video is playing, it overlays itself on the GDI control and hides the drawing. Pause the video, click on the control and the GDI shows again. Basically, I would like to to the same thing as the first poster and am wondering if it's at all possible to overlay my own surface over, or mix with, the AX control's overlay?
kop48 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3
Your problem is very similiar however quicktime's ax control does not use an overlay. It is very inefficient and uses paint messages to update the control window.
DouglasJordan at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 4
In Quicktime preferences -> Advanced -> Video
You have two options:
*GDI (which is what you're refering to?)
*Direct X + DirectDraw Acceleration

Are you SURE they don't both render the same way?

kop48 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 5
I said it does not use an overlay. It does however use window messages including WM_TIMER on when to update. It may use DirectDraw to display the video but it is not a hardware overlay. The preferences in the player may not actually control the default configuration of the AX control. The drawing method may be a control exclusive to Apple's player executable.
DouglasJordan at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 6
Ok. Firstly, the preferences in the player DO affect the control. If I disable DirectX rendering, the GDI drawing stays there fine (same for WMP, by turning off hardware acceleration).

Keeping this in mind, is there any way for me to generate an overlay to keep my GDI control over the top of the overlay (or DirectDraw canvas, in QT's case)?

kop48 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 7
I don't see how you can mix or overlay from two different processes without controlling both. I do not know of a method within the QT Ax control that will allow connection into a DirectShow graph. You could do this with other formats that Media Player supports but it is not neccessary to use Media Player. DirectShow can do everything that Media Player can do and you can control the renderer directly.
DouglasJordan at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 8
I know DirectDraw overlays (rather than DirectShow) are deprecated, but is there any way to use that? The problem I ran into when I tried that was that DirectDraw overlays do not have alpha transparencies, as far as I could see.

Failing that, I might just have to use the source code from Media Player Classic to control the playing of Quicktime files myself....

kop48 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 9

The latest quicktime version does not use DirectShow so no way to use that unless you are going to write a QT decoder filter.

You can use a DirectDraw overlay which is a hardware overlay. You can use the DirectShow playwnd sample.

DouglasJordan at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 10
I tried playing around with that (not too much, because I didn't understand it very well) and the playWnd example needed a video file specified or it wouldn't create the overlay.... :(
kop48 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified