|
Dec
18
Written by:
Jeremiah Morrill
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 wrong ;). The VMR9 in renderless mode doesn't jive well with the IDvdControl2 interface well. I believe it's because the IDvdControl2 is looking for an IVideoWindow on the graph and does not find it when the VMR9 is in renderless. So of course, I had to build the graph manually and employ some work-arounds. Here's a video: -Jer
Tags:
18 comment(s) so far...
Is this getting posted? Sorry for spam
Hi,
I can't seem to find any contact information so I'm posting this here, feel free to answer me by mail. I'm trying to integrate this excellent framework you've done with HLSL and CUDA (interop) for some GPGPU image processing. (It would've been a lot eaiser (for me :-)) if you'de stayed with SlimDX, which in the November Release is platform idenpendent, i.e. you can build for any cpu.)
My question : In D3DRenderer, InvalidateVideoImage right before we lock and mark the surface as dirty, if I'd like to read the IntPtr data, to which struct should I cast it? My idea is to copy it to a byte[] and process it and then copy it back (for starters).
Keep up the good work,
/Ajden
By Ajden Towfeek on
12/18/2008 3:43 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Hi Ajden, you can email me at jeremiah.morrill [at sign] gmail.com
The IntPtr should be a D3d Surface. You should still be able to use SlimDX just fine with this as I think I remember you can create new SlimDX classes by passing the COM pointer, in this case the IntPtr
By Jeremiah Morrill on
12/18/2008 3:47 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Good work Jer, this is a good inspiration and source of information. Sorry for the repost, but in case you missed it, I'll post this comment here as well.
I've written my own implementation of DirectShow/VMR9/Allocator/D3DImage player, based on the Direct Show VMR9 Allocator sample and the D3DImage walkthroughs. With full hardware acceleration on XP, I get about 2.5%-3% higher CPU usage with this solution compared to the Media Element. Both mine and your solution makes use of the VMR9 instead of the EVR, which the Media Element uses.
Have you made any tests or comparisons between these renderers to see if there is any inherent performance difference between them? Or is this performance penalty likely due to how we have to interface with the D3DImage instead of hooking up with WPF directly (like the Media Element might be doing)?
I'm reluctant to implement the EVR presenter, since it's quite a different beast, just to find out that it makes no difference.
Cheers
By UncleRedz on
12/19/2008 2:28 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Hi UncleRedz!
I don't think the EVR will give any performance advantages in WPF other than DXVA 2.0 support (In Vista). Though I still want to write an EVR presenter in C#, just so I can support MediaFoundation in WPF, which is going to be huge in Windows 7. But yeah, it's one helluva different beast...Scary even :)
I believe the EVR/MediaElement does have some performance advantages we can't yet tap into. The MediaElement's EVR presenter has the joy of being sync'd with the render thread of WPF, whereas the D3DImage is sync'd with the UI thread. Also the EVR can take advantage of queuing up surfaces in the WPF's D3D device for smoother playback (which I believe was a large selling point of the EVR).
I do think you'll have better performance in Vista (with DWM/Aero on) for whatever thats worth.
Feel free to email me at jeremiah.morrill [at sign] gmail dot com if you want to rap about it some more.
By Jeremiah Morrill on
12/19/2008 5:15 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Hi Jer,
I think scary is the right word for the EVR. :-) I'm on vacation during the holidays now, but I'll be sending you an email when I'm back at work.
For now, have a happy Christmas and a Good New Year!
Cheers
By UncleRedz on
12/20/2008 8:03 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Hey Jeremiah,
Great work! The WPF Media Kit is awesome...I'm really impressed with the added DVD playback support.
I did have a quick question. Have you ever run into the DirectShow graph not bringing over the sound from the video source? I'm running into that with the new dvd control and I've seen this in the past as well with other DirectShow filters.
Thoughts?
Cheers, Brian
By Brian Morris on
12/20/2008 4:44 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Thanks Brian,
I've only tested the DVD player on one computer (my Vista devel box), but the audio is working over here. I have seen maybe a bug where the audio wouldn't play unless you set the Volume property in the XAML.
You can connect to the remote graph with graph edit. Maybe that will yield some clues.
By Jeremiah Morrill on
12/20/2008 6:27 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Ah....was able to figure it out. Looks like it was related to the mpeg-2 codecs. I installed the ffdshow codec pack and audio works flawlessly now. Pretty bizarre.
One other thing I've been struggling with (if anyone else has come across this) is a way to grab the DVD title from the disc? I've tried about every technique via the DVDNavigator and IDvdInfo, and can't seem to grab titles/chapter info? The GetDvdText seems to be the right way msdn.microsoft.com/en-us/library/ms783480(VS.85).aspx), but comes up blank on my end.
If you know of a good DirectShow forum to post to that would be great.
Anyway, thanks again Jeremiah for the cool work with MediaKit! Brian
By Brian Morris on
12/24/2008 6:49 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
Will this work on XP? Also hwo do I work around the setting volume in xaml?
By Alejandro on
4/25/2009 10:24 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
If this is the case I hope Windows 7 is better than Telstra itself ! I found file for downloading here rapid4me.com/?q=windows+7+ultimate+build+x64
By tgoit on
4/30/2009 4:35 AM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
I'm definitely interested in EVR support ... how do you think the performance will compare with your VMR9 work?
By replica Dior-Handbag on
1/5/2010 11:15 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
I'm definitely interested in EVR support ... how do you think the performance will compare with your VMR9 work?
By replica Dior-Handbag on
1/5/2010 11:15 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
if you want to buy here is some good Website for another you can see this any more jordan shoes air jordan shoes michael jordan shoes
By gucci shoes on
2/25/2010 9:31 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
if you want to buy here is some good Website for another you can see this any more jordan shoes air jordan shoes michael jordan shoes
By gucci shoes on
2/25/2010 9:49 PM
|
Re: DVD Player with Interactive Menus in WPF MediaKit
thank you for your great post, and I did want to share this. I hope you will also like it, if you think it is spamming, please kindly delete it. thank you!abercrombiesee what is this? abercrombie and fitch uk abercrombie and fitch abercrombie fitch uk
By abercrombie on
3/11/2010 6:13 AM
|
|
|
ed hardy
ED Hardy Hoodies ED Hardy Hoodies Ed Hardy Swimwear Ed Hardy Swimwear ed hardy tops ed hardy tops ed hardy shoes ed hardy shoes ed hardy t shirt ed hardy t shirt ed hardy shirts ed hardy shirts christian audigier christian audigier ed hardy kids ed hardy kids Ed Hardy Sunglasses Ed Hardy Sunglasses ED Hardy belts ED Hardy belts ed hardy Bags ed hardy Bags ed hardy purse ed hardy purse ed hardy mens ed hardy mens ed hardy womens d hardy womens ed hardy mens shirts ed hardy mens shirts ed hardy mens tops ed hardy mens tops ed hardy mens hoodies d hardy mens hoodies ed hardy mens swim trunks ed hardy mens swim trunks ed hardy mens shoes ed hardy mens shoes ed hardy womens swimwear ed hardy womens swimwear ed hardy womens t shirt ed hardy womens t shirt ed hardy womens tops ed hardy womens tops ed hardy womens pants ed hardy womens pants ed hardy womens hoodies ed hardy womens hoodies ed hardy womens shoes ed hardy womens shoes ed hardy womens clothing ed hardy womens clothing
By ed hardy on
3/15/2010 9:30 PM
|
cheap nike shox
There are wide variety of Nike Shox for both men and women's selection.The Nike Shox Sale are best selling nowadays.Get your own Cheap Nike Shox now.It's definitely time for you to buy womens nike shox and wens nike shox, Wearing them will keep you in a perfect condition.
By nike shox on
3/16/2010 10:31 PM
|
|
|
|