I have a video graph in c# with DirectShow.
Now I want to show all video sources with its preview. But it should not adjust the video area to the size of the panel.
Currently it shows me the video on the panel, but it adjust the size of the video proportional into the panel.
I want to show only a single area of the video in this panel. For example this picture: http://www.cnet.de/i/story_media/41557373/weitwinkel.jpg If this would be my video and the smallest area on it would be the size of my panel. I don't want to fit the whole video in my panel size, it should only show a small part of the video.
My code is:
//get the video window from the graph
IVideoWindow videoWindow2 = (IVideoWindow)_graph;
//Set the owner of the videoWindow to an IntPtr of some sort (the Handle of any control - could be a form / button etc.)
int hr = videoWindow2.put_Owner(panel.Handle);
panel is of type Panel.