By Jeremiah Morrill on
11/27/2009 11:22 AM
For...
Read More »
|
By Jeremiah Morrill on
10/19/2009 1:57 PM
About a month or...
Read More »
|
By Jeremiah Morrill on
10/13/2009 12:16 PM
This...
Read More »
|
By Jeremiah Morrill on
10/10/2009 7:36 PM
MVVM has been a trending topic lately. And why shouldn’t it be? People want to build great WPF/SL applications and want guidance on how to build them using the framework’s strengths. If you are anything like me, you started your WPF/SL career, learning the framework classes and hierarchy. You learned XAML, triggers, storyboards and animations. You even hobbled together something that looked mind blowing, but the code was a monstrosity. Where do you go from here? How do you leverage all this separation...
Read More »
|
By Jeremiah Morrill on
10/4/2009 10:57 PM
The code in the WPF portion of WPF Mediakit was starting to get a little spahgetti-ish. This was mostly do to me trying to handle as many usages of this control as possible and also dealing with the async nature of MediaKit. It has to support the XAML parser and code-behind. But what if you had properties set in a certain order in the xaml, but you put them in another order and everything breaks? What if you set the source property and start playing in code-behind, then you put it in the visual...
Read More »
|
By Jeremiah Morrill on
9/29/2009 10:30 PM
I haven’t had much time the last few months, but in my spare minutes I’ve been doing some work with the MediaKit. Mostly to solve some very outstanding issues and annoyances. The biggest one was a reported memory leak and another was a problem with reentrancy of the message pump. Both were somewhat related. Both had to be fixed. Why would you want to dump the leak MediaElement for something that leaked just as bad or worse?
Reentrancy? What? In the WPF MediaKit, I was using a new WPF...
Read More »
|
By Jeremiah Morrill on
9/9/2009 2:01 AM
Ever since I’ve installed Windows 7, it seems as if hardware video acceleration no longer works. In WPF MediaKit, wmv HD files that used 8% CPU in Vista are now running at 35% - 45%. This is a quad core too!
I doubled checked the graph and I confirmed that the wmv DirectShow filter was sending NV12 samples to the renderer! After scouring the internet, I found something that worked for me (not saying it will for you!) and now my wmv files are back where they should be, ~8% again.
Here...
Read More »
|
By Jeremiah Morrill on
8/7/2009 10:04 AM
I had to write a rebuttal to this post. It’s not up there yet, so here it is now:
Although you have pointed out some valid grievances with SL we may agree upon, I think overall we have a large disparity in our opinions.
1.) Text being selectable in a browser comes from the browser's historical utility of being a document browser, not an application...
Read More »
|
By Jeremiah Morrill on
8/6/2009 3:44 PM
Silverlight does not come with an Unloaded event like it’s big brother WPF. Here is a very simple behavior that adds support for it.
A Blend user simply has to supply the target method name and the target method context (Control or DataContext) and the method will be executed when the control has been removed from the visual tree.
using System;using System.Reflection;using System.Windows;using System.Windows.Controls;using System.Windows.Interactivity;using System.Windows.Media; namespace...
Read More »
|
By Jeremiah Morrill on
4/5/2009 10:21 PM

I've created a new custom behavior for WPF that allows for a glass like effect. Essentially you can place this behavior on any Visual, point to to a target visual and give it an effect and it will create an effect that looks like a piece of glass was placed over the screen. You pretty much can make your own Aero effects within your application. . .
Usage is simple. The following XAML will create a similar...
Read More »
|
By Jeremiah Morrill on
4/3/2009 1:06 PM
Microsoft's Karl Shifflett and Jaime Rodriguez are packing up and hitting the road to teach the masses how to make great business applications using WPF. Best of all they teach you how to leverage WPF the most along with the M-V-VM pattern. To top it off, if you tell them I sent ya, you'll get in free! No joke!
http://blogs.msdn.com/jaimer/archive/2009/04/01/announcing-the-using-wpf-to-build-lob-applications-training-tour.aspx
...
Read More »
|
By Jeremiah Morrill on
3/9/2009 7:43 AM
Josh Smith has recently uploaded a collection of 3D WPF controls called Thriple. If you've ever had the itch to add some 3D sexiness to your WPF app, but didn't know where to start, or couldn't justify the learning curve.look no further! At the moment Thriple comes with some high quality controls that are highly configurable so they should fit any visual style. ...
Read More »
|
By Jeremiah Morrill on
3/9/2009 4:27 AM
In case anyone had trouble compiling the new EVR renderer in media kit, I have included the binaries in the release section of the WPF MediaKit. The sample application is set to use the EVR and this may be Vista only at the moment. -Jer
|
By Jeremiah Morrill on
3/6/2009 12:35 AM
1.) http://wpfmediakit.codeplex.com
2.)
MediaKit:MediaUriElement x:Name="mediaPlayer"
Width="Auto"
Height="Auto"
LoadedBehavior="Play"
UnloadedBehavior="Close"
PreferedPositionFormat="Frame"
Volume="1"
Stretch="Uniform"
VideoRenderer="EnhancedVideoRenderer" />...
Read More »
|
By Jeremiah Morrill on
3/5/2009 4:50 AM
I have uploaded the EVR enabled WPF MediaKit to Codeplex. This is only a test build at the moment. To enable the MediaUriPlayer to use the EVR, just add "USE_EVR_PRESENTER" to the conditional compilation symbols of the WPFMediaKit project. The project is setup to compile both 32 and 64bit native code and the WPF MediaKit automatically loads the correct dll based on its environment.
A couple notes on this build. I have...
Read More »
|
By Jeremiah Morrill on
3/4/2009 2:59 AM
I gave up on a pure C# EVR presenter. But I now have a working EVR custom presenter, in all C++. I still have some more work to do on it, but it's the first step in having MediaFoundation support for WPF. I am committed to supporting Any CPU builds, so I'm building in the code to automatically use the correct native library based on the the bitage of the process. Further more, you shall not have to register any COM.
One bug that I'll leave for later is the custom EVR presenter can really...
Read More »
|
By Jeremiah Morrill on
3/1/2009 7:26 PM
Jaimie has posted about a handful of interesting threads from Microsoft's internal forums. The most interesting is about the MediaElement and memory leaks. It surely is worth a look-see if you are heavily invested into the MediaElement. -Jer
|
By Jeremiah Morrill on
2/5/2009 7:20 AM
It was a difficult decision to make, but I have made the jump over to freelance. I have had a wonderful experience with my last employer over the last few years, but going out on my own is something I've had an itch to do for more than a while. I will miss my old peeps, but being a telecommuter, they will not be any further than they were last week... an instant message away. :)
So what exactly am I doing? Well for one, I think "freelance" is a bad way to represent my situation. I have...
Read More »
|
By Jeremiah Morrill on
2/2/2009 12:48 AM
The DVDPlayerElement got a big overhaul. Hopefully it supports XP now. I am without an XP box, so somebody will have to tell me. It should now build the graph off your default DVD decoder. It also now has DVDDirectory dependency property so you can set the path of the DVD (ie D:\VIDEO_TS) so you can play a DVD off the harddrive. Let me know how it works: http://codeplex.com/WPFMediaKit -Jer
|
By Jeremiah Morrill on
2/1/2009 8:27 PM
A blog reader pointed out (Thanks Evan!) to me that the VMR9 and EVR (sometimes), will automatically scale the color for HD TV, which are pixel values 16-235. This is not a setting you can adjust and is actually done in the GPU driver. There are some registry hacks for some video drivers, but there is nothing consistent. I have created a new [bool] dependency property called DeeperColor. When set to true, it will apply a pixel shader that will scale the color back to 0-255. This gives the picture...
Read More »
|
By Jeremiah Morrill on
1/22/2009 8:44 PM
I'm having many issues with how .NET handles COM objects while writing this EVR custom presenter. I'm getting around it by writing my own COM wrapper for the 'trouble making' COM objects (most notibly IMFSample). Here is the base class for the custom COM wrapper I am going to use. It's a bit more boiler plate, but it will be well worth it :).
abstract public class Unknown
{
private readonly IntPtr m_comPointer;
private delegate int AddRefDelegate(IntPtr comPointer);
...
Read More »
|
By Jeremiah Morrill on
1/22/2009 1:09 AM
Wooo! I managed to render one (and just one) frame from my EVR custom presenter into WPF! There is still much to do and figure out. But this is really my first milestone.

Read More »
|
By Jeremiah Morrill on
1/15/2009 1:42 AM
I have been spending my free time, looking on how to support MediaFoundation and the EVR in the WPF MediaKit. MediaFoundation in Vista is pretty incomplete, used mostly for protected media path stuff like Blu-Ray. MediaFoundation will finally play a big part in multimedia in Windows 7. It will be able to play most popular media formats right out of the box. Step one (the most important step) is to make an EVR custom presenter. Of course I want to be done in all C# and this is where all my problems...
Read More »
|
By Jeremiah Morrill on
1/6/2009 2:41 AM
I've just committed a new update to the WPF DVDPlayerElement in the WPF MediaKit. I'm mostly excited about this because I wasted nearly two weekends searching for the performance issues (dropping frames) and the interactive menu's on the DVD not working correctly in some instances.but now it's fixed for the most part. I can get into details if someone is curious, but basically for just DVDs, I had to invalidate the D3DImage...
Read More »
|
By Jeremiah Morrill on
12/23/2008 7:43 PM
My buddy, who is learning Silverlight and MVVM, has been using the new Chart controls from the Silverlight Toolkit. The road block he was having was being able to data bind a collection of collections to a Chart's series. This was difficult because the Series property of the Chart does not play nice. So me being such a wonderful friend, I whipped up a quick attached behavior to allow this.
Here is the usage:
Charting:Chart x:Name="chart"...
Read More »
|
By Jeremiah Morrill on
12/18/2008 11:04 AM
I have added a DVD player over the weekend that supports interactive menus into the WPF MediaKit. This is very preliminary, so its not fully featured and surely has some bugs. One bug that is killing me is the DVD video will appear to be choppy at some points. I don't think this is a problem with WPF or D3DImage performance.
If you look at the code and say "Wow, you coulda made the DVD graph a lot easier", well you're...
Read More »
|
By Jeremiah Morrill on
11/16/2008 4:00 PM
I just added the ability to use anything derived from my D3DRenderer class (ie MediaUriElement), to be used as a VisualBrush, on any thread. If you've ever tried using the VisualBrush on these elements from another thread, you'll find that it does not work. This fixes that with a method on D3DRenderer called CloneD3DRenderer. There is also a new DP on the D3DRenderer called IsRenderingEnabled, so if a particular instance of the D3DImage you need to stop rendering to save some processing cycles,...
Read More »
|
By Jeremiah Morrill on
11/14/2008 9:26 AM
I just committed some bug fixes to CodePlex. I now support MTA and STA graphs. Before I only supported MTA because a DirectShow thread that came through the VMR9Allocator (in PresentImage) needed to touch some of the COM objects. This was overcome by making the VMR9Allocator inherit from the DispatcherObject and any calls that need to touch the COM objects are dispatched. Hopefully this fixes any RaceOnRCW MDA errors anyone...
Read More »
|
By Jeremiah Morrill on
11/7/2008 5:15 AM
I don't have a whole lot of time, even for this post. Been bombarded with work. I still wanted to share my latest concoction.
Simply put, I am able to grab the Direct3D shared Surface the Vista DWM uses (undocumented API) to paint all Direct3D based windows. Once I have that, I am able to use it as a "VisualBrush" in WPF or I can copy the Direct3D Surface to system memory for very high frame rate captures.and you can stream it out too.to Silverlight even! This idea is similar in concept...
Read More »
|
By Jeremiah Morrill on
11/3/2008 9:04 AM
I've been working a MediaDetector control...
Read More »
|