Re: D3DImage VideoPlayer
Glad to see you posting again. You had me scared for awhile. You posts and projects are valuable to us all, we appreciate your time.
By Chris on
8/12/2008 9:00 AM
|
Re: D3DImage VideoPlayer
Thanks for this, we are keeping a close eye on this over at www.meedios.com, it would be great to have a proper DVD player using WPF.
By Zag on
8/12/2008 12:45 PM
|
Re: D3DImage VideoPlayer
Just finished implementing the D3DImage in SichboPVR (http://pvr.sichbo.ca) tonight also. So far so good (I think) So long MediaElement anyhow!
I found I had to add a Quality slider setting and use D3D StretchRectangle() during PresentImage so that it can scale down 1080i content to 720i Surface for slower machines. (This of course doubles as a YUV->RGB conversion.) WPF CPU usage seems to correlate with the size of the Surface you've handed it. So long as the surface isn't too large, it can scale it right across your monitor quite nicely with not too bad frame rate.
By Sichbo on
8/12/2008 6:52 PM
|
Re: D3DImage VideoPlayer
Hey Sichbo,
Did my code help you or did you roll your own D3DImage solution? I was thinking about trying to support the EVR and MediaFoundation also in the future.
-Jer
By Jeremiah Morrill on
8/14/2008 5:56 AM
|
Re: D3DImage VideoPlayer
This is just what I was looking for. Please keep it up, and tweek on the performance.
/Ken
By Ken on
8/18/2008 11:50 AM
|
Re: D3DImage VideoPlayer
Hi Ken!
I don't know the performance characteristics on other OS's if you aren't running Vista SP1. I do have to say with the computers I have tested on (some slow, some fast), the D3DImage provides great performance, near that of MediaElement. There's really not much more I can do with performance as I'm just using the raw DShow, D3D and WPF. You can do like Sichbo said and lower the surface dimensions for better performance on low end hardware.
-Jer
By Jeremiah Morrill on
8/18/2008 12:51 PM
|
Re: D3DImage VideoPlayer
Jer, performance (in speed) was maybe the wrong word to use.
I run Vista (32 bit) on a Quad code (2.4) with GeForce 8800GT, so it runs realy smooth and video clip starts much fatster than MediaElement. And a big plus is that I can play .VOB files, MediaPlyar can't do that. And I can now easily build my own graph for TV card (BDA).
But it seem to leek memory (not releasing when I load another video clip).
/Ken
By Ken on
8/19/2008 9:34 AM
|
Re: D3DImage VideoPlayer
Thanks for the feedback Ken!
Yeah I have a few memory leaks in this version. I suspect it's a COM interface or some D3D stuff I'm not releasing. I'm working a new, clean version that should fix that. Let me know if you see anything in the code that is a obvious leak.
-Jer
By Jeremiah Morrill on
8/19/2008 9:44 AM
|
Re: D3DImage VideoPlayer
Jer,
Great work as usual. Looking forward to the clean version. That will finally convince my boss that we need to be coding for 3.51 and not 3.0! (I suspect my CC issues are going to be much easier to solve now.)
-Eric
By Eric Meyer on
8/20/2008 5:39 AM
|
Re: D3DImage VideoPlayer
Hey Jer,
Didn't get a chance to take a look at your work, just rolled my own. Performance is still not where I'd like it to be. Everybody seems to render on CompositionTarget.Rendering -- for me this gives choppy playback, even when checking RenderingEventArgs.RenderTime for duplicate frame renders, and of course only rendering when the VMR9 Custom A/P has pushed a frame onto the surface for us to hand off.. Better performance seems to come from a simple DispatcherTimer running @ 30ms, but still not quite smooth enough.
By Sichbo on
8/23/2008 12:38 PM
|
Re: D3DImage VideoPlayer
sichbo, just don't update on the rendering event. Update on each frame via the dispatcher. It yields great performance this way.
By Jeremiah Morrill on
8/23/2008 6:48 PM
|
Re: D3DImage VideoPlayer
Would you happen to know how to support interactive menus?
By Brandon on
8/31/2008 2:58 PM
|
Re: D3DImage VideoPlayer
i can't get the VMR9 work in renderless mode when using a dvb-t as source. i think it disables the YUV->RGB Convertor or something... it simply doesn't work...
any suggestions?
By scors.agra on
9/9/2008 8:07 AM
|
Re: D3DImage VideoPlayer
scors.agra,
This is probably because your GPU doen't support YUV on a D3D surface. I have a fix for this in my new project (WPF MediaKit), but this prototype probably isn't supported. Hopefully by the weekend I'll have it up on codeplex.
-Jer
By Jeremiah Morrill on
9/9/2008 8:33 AM
|
Re: D3DImage VideoPlayer
I'm trying to build DVD Player . But when I run your application the application is not displyaing anything as shown in the picture given along with this article. Also when I press the button it starts a new window "ActiveMovie" window. Can you please help me to understand this? I'm trying to build one dvd player app using d3dimage. Please help
By John on
9/14/2008 4:26 PM
|
Re: D3DImage VideoPlayer
About the interactive menus... It seems like the active button does not get highlighted. You mentioned a problem with using SelectionAt with VMR9 in renderless mode, but this is even before any mouse event. Would you have an idea of what could be causing this? I'm trying to integrate a DVD player in my WPF app and keyboard navigation would be fine too.
Thanks! --h
By hanh on
10/28/2008 11:33 PM
|
Re: D3DImage VideoPlayer
The button not getting highlighted is because the subpicture pin is not rendered - probably on purpose because of the issues regarding ActivateButton. Actually, the problem with the SelectAtPosition, etc. and interactive menus crashing are caused by "OnNewAllocatorFrame" calling the Dispatcher.Invoke. Anyway, all is good now. Thanks
By hanh on
10/30/2008 10:13 AM
|
Re: D3DImage VideoPlayer
This is a great component. It solves some issues I was having with DirectShow content with a transparent Window. Small problem when you set AllowsTransparency=True on the Window, your DirectShow content no longer renders.
One problem though... If I set the Opacity level on my Window to say 80% it also sets the opacity of the video to 80%. Is there a way around this? I want my video to 100% opaque and just the non-VIdeo client Area of the Window to be opaque.
By Louis on
1/10/2009 5:36 PM
|
Re: D3DImage VideoPlayer
Louis, this is an old prototype. Please try out the WPF MediaKit at www.codeplex.com/WPFMediaKit. AllowsTransparency=True should work. Also, transparency of visual is inherited from the parent, so you should adjust your UI to make the background semi transparent and the video opaque. Think about seeing the background color to transparent vs. setting the visual's opacity setting.
-Jer
By Jeremiah Morrill on
1/10/2009 7:33 PM
|
Re: D3DImage VideoPlayer
Hi. Nice job. The DVD player plays, but where is the MPEG decoder getting added to the graph?
Thanks, Bill
By Bill on
10/21/2009 8:25 AM
|
Re: D3DImage VideoPlayer
Please use WPF MediaKit wpfmediakit.codeplex.com). This is just an old protoype!
By Jeremiah Morrill on
10/21/2009 10:39 AM
|
Re: D3DImage VideoPlayer
This is true, but I'm still learning and starting with the basics seemed like a good idea. :)
I think I got it running through my own codec, but now it shows my movie in a new windows called "Active Movie". I have no idea how that happened.
By Bill on
10/21/2009 11:55 AM
|
Re: D3DImage VideoPlayer
If you are seeing an "Active Movie" window because whatever you did either caused a new renderer to be loaded or caused the current configured renderer to not be able to take the media type.
By Jeremiah Morrill on
10/21/2009 12:02 PM
|
Re: D3DImage VideoPlayer
I'll check into that some more. Thanks again. :)
By Bill on
10/21/2009 12:07 PM
|
Image Size
If you vertically squish the DVD image, it automatically resizes to keep the correct aspect ratio. Do you know how to determine the width and height of the actual dvd clip as it appears on the screen? ie... I don't need the original feed resolution, or the resolution of the display panel (which could have black space above and below or to the right and left). I am needing to grab the resolution of the dvd image as it is being displayed on the screen.
Thank you very much. Don
By Don on
10/22/2009 7:54 AM
|
Apartment State
Hi. Play() contains the following:
var t = new Thread((() => BuildGraph())); t.SetApartmentState(ApartmentState.MTA); t.Start();
Once this is done (on the different thread), how do you access the controls within it, such as m_dvdCtrl. I get errors such as "Object reference not set to an instance of an object." when accessing various controls unless I replace the above code with:
Do I need to invoke functions somehow using the dispatcher?
if (m_mediaCtrl == null) BuildGraph();
Thank you, Bill.
By Bill on
12/21/2009 8:53 AM
|
Re: D3DImage VideoPlayer
this is something i have been very interested in lately. thanks.
By Replica Burberry Handbag on
1/5/2010 11:22 PM
|
Re: D3DImage VideoPlayer
this is something this is something i have been very interested in lately. thanks.i have been very interested in lately. thanks.
By replica fendi scarf on
1/5/2010 11:23 PM
|