Moshe Haim

Hi,

I'm using EVR pretty much the same way as one would use VMR9 Windowless (they share most of the calling conventions).

I encountered a very annoying issue. If I set the output rectangle (SetVideoPosition) to an area smaller than the clipping window, and resize the video area, i get flickering in parts of my window where the video is no longer displaying. The flickering looks like 3-4 frames (possibly backbuffers ) looping.

I am aware that you need to clear these newly unused areas and I'm doing so and the same code works just fine when using the same mechanism with VMR9 Windowless (I even tried clearing the entire clipping window area to see if it would make a difference, knowing it would introduce a different type of flickering. It made no difference).

Since I'm seeing what looks to be backbuffers, I suspect there might be a problem with Desktop Composition (Aero) or possibly the display driver (NVIDIA vista 32bit 101.45).

I also tested with "SetRenderingPrefs" used with different values, but this doesn't make a difference as far as I can see.



Re: DirectShow Development EVR Clipping Window bug

alex224

I have the same problem.
Also if you set output rectangle larger than clipping window, there is also problem, video is no longer displayed it's just black (if it's larger for just a few pixels it works, but then it stops). It works with VMR7 or VMR9.




Re: DirectShow Development EVR Clipping Window bug

Moshe Haim

Can this issue be addressed by anyone at microsoft

It has been over 6 months since this has been posted, for some reason, when the video window is resized, the backbuffers aren't cleared. Users are complaining and microsoft is ignoring, this is very frustrating.

Can we please get a progress update regarding a possible fix.

This issue seems to occur when the video destination rectangle doesn't cover the entire window handle surface when the image is resized. SetPosition is called after the resize as instructed and the image appears properly except for outside the destination rectangle (but within the image) where the backbuffers repeat in a loop.





Re: DirectShow Development EVR Clipping Window bug

Mike Wasson - MSFT

Hi,

One of our developers is looking at this issue, but is unable to reproduce the problem. Can you post the code that is showing the bug

I know it's impractical to post a whole unamanged app to the MSDN forums ... but if you can post just the code showing how you build the graph, configure the EVR, and respond to the window resize, that might help us to get a repro case.

Thanks!

----------------------------------------------------------------------------
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.






Re: DirectShow Development EVR Clipping Window bug

Moshe Haim

I managed to track and bypass the issue, but I still believe it's a bug.

Here's where the problem is,
If the window handle assigned to the renderer is bigger than the size of the video and you resize, the non-video area will start showing uncleared backbuffers when you resize the video.

I managed to work around this issue by ensuring that the window handle I set for use with EVR is always the same size as the video area.

Please note that I disable aspect ratio support in EVR (I control the AR using my own code).





Re: DirectShow Development EVR Clipping Window bug

Lukas F

Hi there,

I experience the exact same issue. I am developing a managed video player and if I resize the video window so that the video area does not fill the whole window anymore, I often get this flickering in areas where video has been displayed before. Very annoying! (Note: There must have been video in the window area before, to make the flicker appear atfer resize)

It seems that sometimes the backbuffers are cleared and sometimes not. When slowly changing the size, it starts flickering somewhere, then the flickering suddenly disappears and reappears when further resizing (in the new non-video areas).

This is how the filter is initialized in my code (using interop). Nothing special here. Handling resize and repaint messages as advised, disabled aspect ratio control.

Code Block

videoRenderer = (IBaseFilter)new EnhancedVideoRenderer();
videoRendererName = "Enhanced Video Renderer";

object obj;

Guid guid = typeof(IMFVideoDisplayControl).GUID;
int hr = ((IMFGetService)videoRenderer).GetService(
ref MFServiceIdentifiers.MR_VIDEO_RENDER_SERVICE,
ref guid,
out obj);

DsError.ThrowExceptionForHR(hr);

videoDisplayControl = (IMFVideoDisplayControl)obj;
hr = videoDisplayControl.SetVideoWindow(control.Handle);
DsError.ThrowExceptionForHR(hr);


hr = videoDisplayControl.SetAspectRatioMode(
MFVideoAspectRatioMode.MFVideoARMode_None);



I recently installed Vista SP1 RC and there have been some great improvements to EVR it seems, it is much more responsive when seeking and changing the video window. However, this issue has gotten even worse! On Pre-SP2, the flickering normally disappeared when opening a new file. Now if it comes, it stays forever - or until the flickering areas are re-covered by video. So when playing a 4:3 clip and then some 16:9 clips, often the letterbox bars are flickering as hell and this does not stop. Even if I stop the filter graph, re-load the 16:9 clip, the flickering still stays.

I really hope that you devs at Microsoft start to take this seriously as it is a very annoying bug. The SetVideoPosition command is pretty useless if you can only set it safely to fill the whole video area. I am using VMR7/9 and EVR in parallel and I really don't want to write some special window sizing code only to circumvent this EVR bug.