Pixel Shader for IIS H.264 playback

Mar 29, 2011 at 3:53 PM

Hi all,

I am new to Silverlight programming.  I plan to develop video effect (using pixel shader) for IIS H.264 playback and find useful resource in sample custom player code. And the SmoothStreamingMediaPlugin class is very likely the base plugin I would like to start from. But, it doesn't expose the property of MediaElement which we need to have to manipulate the actual video content. Instead, it has the property of SmoothStreamingMediaElement which we can use to access the control features Would anyone know how to get around with it? Or there are some reasons not to expose the MediaElement.



Mar 29, 2011 at 4:24 PM

kccpac, I'd recommend setting your pixel shader on ActiveMediaPlugin.VisualElement (set the .Effect property). For the SmoothStreamingPlugin this will apply the effect to the SmoothStreamingMediaElement which uses the MediaElement internally.

Note: You will need to inherit SMFPlayer to access the ActiveMediaPlugin property because it is protected.

Hope that helps,

Tim Greenfield

Mar 31, 2011 at 2:08 PM


Thank you for your help. I can put a simple video effect on the sample player in sdk. But, I found that it was restricted to pixel shader model 2. Are there any ways to work around that in Silverlight 4 (to use PS3.0 shader like WPF4.0)?