Discussion:
Problem with VMR9 video window embedded in a C# form
(too old to reply)
m***@gmail.com
2007-09-14 17:47:52 UTC
Permalink
Hi,

I am having a problem with VMR9 filter.

I have a C++ COM object which implements a direct show player.

The player is displayed in a C# form which contains a panel.
Panel's handler is passed to player, which in turn sets the owner for
the video window.

Player = new DSPlayerClass();
Player.LoadMedia(strFilePath);

Player.OwnerWnd = (Int32)previewCtl.Handle;
Player.PositionWindow((ushort)previewCtl.Width,
(ushort)previewCtl.Height);

Player.Pause();

After a while, the image dissapears, and even though I call
IVideoWindow::ShowWindow(OATRUE) the window remains hidden. This only
happens if the graph is paused.

If I use a normal video renderer everything is fine.

I am using the DirectX October 2006 SDK with Microsoft Visual C# 2005,
Windows XP Professional Version 2002 Service Pack 2 and the Platform
SDK for Windows Server 2003 R2.
Olie
2007-09-26 13:07:10 UTC
Permalink
Have you looked at the DirectShowLib samples?

http://directshownet.sourceforge.net/

The library has many samples which use VMR in C# forms.

Loading...