Simple example for MediaUriElement

Sep 15, 2009 at 2:44 AM
Edited Sep 15, 2009 at 2:45 AM

I am trying to create a simple example for MediaUriElement.  I have a simple WPF window, I have included all necessary references with the following code: 

 

<DShow:MediaUriElement x:Name="mediaPlayer" Width="Auto" Height="Auto" LoadedBehavior="Play" UnloadedBehavior="Close" PreferedPositionFormat="Frame" Volume="1" Stretch="Uniform" Source="c:\test.wmv" VideoRenderer="EnhancedVideoRenderer" />

The app builds fine.  When I run, nothing appears in the mediaPlayer and there are no errors thrown.  If I use MediaElement with the same video file/params, it does play.

Is there anything else that I need to get just a simple example running? 

 

Coordinator
Sep 15, 2009 at 2:47 AM
Do you have the EvrPresenter32/64.dll in the same directory as your executable?  Does it work if you set the MediaUriElement's VideoRenderer to VideoMixingRenderer9?
Sep 15, 2009 at 2:57 AM

Thanks for the quick reply (I think that was the fastest I have ever seen).  I just tried with Evr 32/64 in the same dir as my exe and tried with VideoMixingRender9 and still nothing appears.  I should mention that I am using .net 3.5 sp1 on Windows XP.  I don't have Blend 3 so the Sample App does not build for me.  Any other thoughts?

Coordinator
Sep 15, 2009 at 3:06 AM
What RenderTier is your WPF application reporting?
Sep 15, 2009 at 3:45 AM

RenderTier is reporting a 1, so I re-installed DirectX 9 and restarted my machine.  Still reporting a 1.

Coordinator
Sep 15, 2009 at 4:16 AM
IIRC, you need tier 2 for this library to work.  It may work with the MediaElement because WPF has it's own software rendering fallback, where this library does not and relies on the D3DImage.

Did you try updating the video drivers?  And is your GPU capable of tier2?

Sep 15, 2009 at 2:44 PM

Thanks for all the help.  I tried it on a better machine and it worked.

From: jmorrill [mailto:notifications@codeplex.com]
Sent: Tuesday, September 15, 2009 12:16 AM
To: Christopher Renzi
Subject: Re: Simple example for MediaUriElement [WPFMediaKit:68932]

From: jmorrill

IIRC, you need tier 2 for this library to work. It may work with the MediaElement because WPF has it's own software rendering fallback, where this library does not and relies on the D3DImage.

Did you try updating the video drivers? And is your GPU capable of tier2?

Read the full discussion online.

To add a post to this discussion, reply to this email (WPFMediaKit@discussions.codeplex.com)

To start a new discussion for this project, email WPFMediaKit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.96/2369 - Release Date: 09/14/09 17:52:00