I'm developing a multi track video player in wpf and need to be able to copy the video that is playing in one grid layout of the main window into a seperate window that will go out of a projector. The videos are loaded and drawn onto rectangles using drawing brush and are added to a grid. I can't call clone on the rectangle, or the grid, or the canvas, so I'm currently resorting to copying the drawing brushes, passing them through to the otherwindow class and reassigning them to newly drawn rectangles.
However, this gets even worse as I'm 'cross-fading' between two video by drawing another rectangle with a new video in front, then chang开发者_C百科ing the opacity value of the front video to gradually block out the one behind. So I now have two brushes on two rectangles tied to storyboards to animate, and I'm having to pass everything through and basically compute everything twice.
Is there any sensible way of doing this? I'd love to be able to literally grab the pixels from one area of the main video and display them in the second window, but everything seems abstracted away.
Any suggestions would be a massive help
Have you looked at VisualBrush
?
精彩评论