Multiple VideoCaptureElements render each other's frames

May 24, 2010 at 7:03 PM

I am displaying 2 VideoCaptureElements in a Grid, each with their own unique capture device assigned as the source. The majority of the time the VideoCaptureElements display video from their assigned capture devices, however every few seconds or so one of teh VideoCaptureElements will display one or more frames from the alternate VideoCaptureElement's capture source.

The issue doesn't occur simultaneously on both VideoCaptureElements, it seems to randomly affect one or the other at any given point in time. I am not using any custom code, could there be an issue with the custom vmr9 allocator? How might I go about resolving this.

Your control is amazing and seems to be the only option available for WPF custom direct show integration, any help would be greatly appreciated! :)

Coordinator
May 24, 2010 at 7:09 PM
I've heard of this happening one other time.  Not positive what it is, but try modifying the Vmr9Allocator.cs.  In there there is a single static D3D device shared between all allocators.

You should just be able to remove all "static" modifiers from the class's fields.  Move the static constructor stuff to the instance constructor.  You may want to add a Marshal.ReleaseComObject on the d3d device and IDirect3D9/Ex classes on the dispose of the class.

Let me know if it helps fix the issue!

-Jer

On Mon, May 24, 2010 at 12:03 PM, thoughtwist <notifications@codeplex.com> wrote:

From: thoughtwist

I am displaying 2 VideoCaptureElements in a Grid, each with their own unique capture device assigned as the source. The majority of the time the VideoCaptureElements display video from their assigned capture devices, however every few seconds or so one of teh VideoCaptureElements will display one or more frames from the alternate VideoCaptureElement's capture source.

The issue doesn't occur simultaneously on both VideoCaptureElements, it seems to randomly affect one or the other at any given point in time. I am not using any custom code, could there be an issue with the custom vmr9 allocator? How might I go about resolving this.

Your control is amazing and seems to be the only option available for WPF custom direct show integration, any help would be greatly appreciated! :)

Read the full discussion online.

To add a post to this discussion, reply to this email (WPFMediaKit@discussions.codeplex.com)

To start a new discussion for this project, email WPFMediaKit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 25, 2010 at 12:40 PM

Jer,

That worked perfectly and with no negative impact on performance or resource utilization!

Thank you again for this valuable contribution.

Mike