We are required to Display Live View from a Camera in a WPF Application.
A TV-Tuner is being used to capture the video.
We had already achieved this in WinForm (VS2005) using DShow.
To implement this in WPF we are using the same code (code used in WinForm) except that we pass the Handle to DShow's "SetVideoClippingWindow(IntPtr hwnd)" by using "new WindowInteropHelper(this).Handle" as shown below:

IntPtr mainWindowHandle;
        private void mainWindow_Loaded(object sender, RoutedEventArgs e)
            mainWindowHandle = new WindowInteropHelper(this).Handle;

        private void LiveView()
            //code copied from WinForm application which was working fine.
            hr = windowlessCtrl.SetVideoClippingWindow(mainWindowHandle);

But we get a White Blank Screen (have made the default grid present on top of the Window small to enable us to see the Window on which we expect the Live View to be displayed.)

Please guide if there is anything else to be done to get the LiveView in WPF.

8 Years
Discussion Span
Last Post by dilake

I had missed SetVideoPosition(....).
Now I am getting the Live View.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.