Problem with surface on some machines

Mar 2, 2010 at 3:09 AM

Hi jmorrill,

First thanks for your fantastic effort. You have no doubt made many people happy.

I seem to have found something quite odd. I have two developement machines at work both using the same version of XP and MediaPlayer. On one machine the MediaUriElement works flawlessly and on the other i get the sound but what seems to be a transparent image.

I am using the d3dimage to draw to my own Border Element with an ImageBrush. I have used DirectShowLib's VMR9Allocator2 app on the problem machine and that works fine. I can also see that the dimentions of the image source from the d3dimage, and that is what it's meant to be.

I have filled the background of the border with a color on startup and when the MediaUriElement starts to play, it becomes transparent. Can still see the border.

At first i thought perhaps something in the setup of the problem machine, but the VMR9Allocator app works fine.

I have also tried to convert the imagebrush from the d3dimage to a rendertargetbitmap from a thread, and fill that to another element and supprise, i do get an image then? So the surface must be getting each frame.

Any suggestions or require more info?

Mar 25, 2010 at 1:18 AM

Update to the problem.

If i use the WPF MediaElement or MediaPlayer, these work fine. Have also tried just using the MediaUriElement on its own and is still transparent.

I'm sure that this must be a WPFMediaKit VMR9Allocator issue with some machines but not sure how. I do get audio.

Any ideas?

Mar 25, 2010 at 3:21 AM

If anyone wants to know the issue.

I had a few video hook drivers installed. Not sure which one it was as i uninstalled all of them. Anyway i was getting a RenderMode.Tier of 0 now i'm getting 2. Apparently D3DImage wont show on Tier 0. May need to build into my code to make a graph with SampleGrabber if Tier is < 1.

Hope this helps someone.