I have a CLI/C++ component that implements a Media Foundation player. Currently I am creating a Systems.Windows.Forms.PictureBox in XAML and passing the PictureBox handle to IMFVideoDisplayControl::SetVideoWindow().
<WindowsFormsHost><wf:PictureBox x:Name="clippingWindow" /></WindowsFormsHost>
However the performance seems okay on some machines, but on others it's pretty poor (frame rate issues) compared to playing the same (mp4) video on Windows Media Player.
What's the best practice/recommended method to render video using Media Foundation in a WPF application? Is there a standard implementation code example I can follow?