Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,
I developped an application that is supposed to play a video in a dedicated window by using DirectShow, while a layered window allows for displaying of a png bitmap over the video, using GDI+.
All this works fine and smoothly with windows 7, but under XP I get flickering of the layered bitmap and video is choppy.

I am considering 4 possible issues :
- The CPU, which is an i7 1,7Ghz for the Windows 7 machine but a 2Ghz Dual Core for the XP machine
- Areo stuff that would manage layered windows smootly in Windows 7
- The graphic device that would need some specific hardware capabilities (both machines are using the embedded chipset)
- Something in my code that is not fully compliant with XP but would work with 7 for some reason.

Note that the main video window is created as following :

m_hWnd = CreateWindowEx(0, "VIDEO_WND", "Vidéo", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, m_hInst, this);


while the layered window is created this way :
(m_hWnd is the main video window)

RECT rPos;
GetWindowRect(m_hWnd,&rPos);
int nLX = rPos.right-rPos.left;
int nLY = rPos.bottom-rPos.top;
m_hwndLayer = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT, "LAYER", "LayerHabillage", WS_OVERLAPPED | WS_VISIBLE, rPos.left, rPos.top, nLX, nLY, m_hWnd, 0, m_hInst, 0);


Any idea would be very appreciated.
Thanks in advance.
Posted

You could use DirectShow Video Mixing Renderer (VMR9) for overlay.
 
Share this answer
 
Thanks for the advice.
Actually, that was the solution I tried first (and it actually works), but as I also deal with still images, and as VMR9 brings other issues with still images, I did not want to manage both cases and have a unique solution.
At the end, maybe I'll have to manage both.

In fact, did someone already succeed in overlaying a bitmap with layered windows over DShow video with XP ?
 
Share this answer
 
Comments
doscho 6-Mar-13 23:08pm    
whether solved and how to solve.
There is a discription above the question in msdn of ms.
mOOmOOn_ 7-Mar-13 3:39am    
Thanks for the info.
In MSDN, I could find some info related to hardware acceleration with XP, but no real solution. Did you actually find a link where the solution is described ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900