2

Is there a way to prevent the black background when resizing the window while a video is playing?

I've tried setting the TVideoWindow.Color and the TVideoWindow.Canvas.Color to white but every time the window is resized a black background appears during the resize action.

This also happens for a brief split second when a new video is loaded.

TLama
  • 75,147
  • 17
  • 214
  • 392
  • 1
    You need to disable erases of the window behind video output. This usually involved handling/overriding `WM_ERASEBKGND` and possibly `WM_PAINT` message. – Roman R. Dec 16 '12 at 14:13
  • @Roman, even when the `IVideoWindow` is resized to the full control's size ? In short, what happens inside of this control; the `IVideoWindow::SetWindowPosition` is called from the `WM_SIZE` message handler to resize the video window to the actual control size. I've tried to do what you've mentioned, but it seems the problem is that renderer invalidates target window immediately when it's resized (what is natural), but it fills the window by a black background. – TLama Dec 16 '12 at 16:59
  • Yes, video renderers alone do not cause flickering. It is windows undertheneath that do. I have number of small ups on my site, e.g. [RenderInterlacedVideo.exe](http://alax.info/trac/public/browser/trunk/Utilities/RenderInterlacedVideo/_Bin/Win32/Development%20Release%20Trace/RenderInterlacedVideo.exe) that can be sized without flickering (they are DirectShow but not Delphi). – Roman R. Dec 16 '12 at 17:29

0 Answers0