Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 16-Feb-12 7:38am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You could use DirectShow Video Mixing Renderer (VMR9) for overlay.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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 ?
  Permalink  
Comments
doscho at 6-Mar-13 23:08pm
   
whether solved and how to solve.
There is a discription above the question in msdn of ms.
mOOmOOn_ at 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)

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 16 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100