AudioVideoPlayback
by Michael Clark · in Technical Issues · 11/02/2004 (11:45 pm) · 4 replies
Hi Guys,
I'm quite screwed if I can't get this to work...
What I'm trying to do... render a video into a Direct3D fullscreen window via a texture. The environment so far is Visual C++.net with Managed DirectX9.0c.
The approach I have taken is to use AudioVideoPlayback.
For reasons unknown, all my attempts crash after 5-500secs. There is also a symptom of the dx window occasionaly flickering.
I've attached the full visual studio project for the skeleton attempt.
The Error message reads:-
An unhandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately. Error in the application.
And in the error message dropdown bit (typed, since its on another machine and i can't be bothered transfering):-
*********** Exception Text *************
Error in the application -2146232832 (Unknown) at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT* sourceRectangle, tagRECT* destRectangle, IntPtr overrideWindow)
at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT * sourceRectangle, tagRECT * destRectangle, Control overrideWindow)
at Microsoft.DirectX.Direct3D.Device.Present()
at dx02.Form.do_Render() in c:\... *snip*
at dx02.Form.Form1.Form1_Paint( Object sender, PaintEventArgs e) in c:\... *snip*
Please don't just reply with "Use Windows Media Player Control", I quite simply don't understand the integration of managed directx9 and wmp, plus, this seems a fraction away from actually working... grrrr.
If you want to take a peek at a demo project showing this problem, i've put one on www.furness.net/corpa/dx.zip
Help!!!! Please!!!
*tempted to throw bribery in*
I'm quite screwed if I can't get this to work...
What I'm trying to do... render a video into a Direct3D fullscreen window via a texture. The environment so far is Visual C++.net with Managed DirectX9.0c.
The approach I have taken is to use AudioVideoPlayback.
For reasons unknown, all my attempts crash after 5-500secs. There is also a symptom of the dx window occasionaly flickering.
I've attached the full visual studio project for the skeleton attempt.
The Error message reads:-
An unhandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately. Error in the application.
And in the error message dropdown bit (typed, since its on another machine and i can't be bothered transfering):-
*********** Exception Text *************
Error in the application -2146232832 (Unknown) at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT* sourceRectangle, tagRECT* destRectangle, IntPtr overrideWindow)
at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT * sourceRectangle, tagRECT * destRectangle, Control overrideWindow)
at Microsoft.DirectX.Direct3D.Device.Present()
at dx02.Form.do_Render() in c:\... *snip*
at dx02.Form.Form1.Form1_Paint( Object sender, PaintEventArgs e) in c:\... *snip*
Please don't just reply with "Use Windows Media Player Control", I quite simply don't understand the integration of managed directx9 and wmp, plus, this seems a fraction away from actually working... grrrr.
If you want to take a peek at a demo project showing this problem, i've put one on www.furness.net/corpa/dx.zip
Help!!!! Please!!!
*tempted to throw bribery in*
#2
Thanks for the reply. That problem was a few years back...
I managed to use one of the 2 support calls that come with a purchase of Visual Studio... and contacted Microsoft. After a few emails, they admitted the fault was theirs and that using TextureReadyToRender to save a texture for use in your main render loop was faulty.
After a few months, I updated my directX version from 9.0b to 9.0c, and this issue was fixed. As far as I'm aware, it should all be working fine now. If you suspect this might be the same case with you, use dxdiag to check you are definitely using at least 9.0c. I'm not sure what the latest version is now, as I've moved away from games programming to be a programming-bitch for a boring larger company.
06/26/2006 (3:50 pm)
Hi,Thanks for the reply. That problem was a few years back...
I managed to use one of the 2 support calls that come with a purchase of Visual Studio... and contacted Microsoft. After a few emails, they admitted the fault was theirs and that using TextureReadyToRender to save a texture for use in your main render loop was faulty.
After a few months, I updated my directX version from 9.0b to 9.0c, and this issue was fixed. As far as I'm aware, it should all be working fine now. If you suspect this might be the same case with you, use dxdiag to check you are definitely using at least 9.0c. I'm not sure what the latest version is now, as I've moved away from games programming to be a programming-bitch for a boring larger company.
#3
06/27/2006 (7:23 am)
Lol - now thats funny reply to a 2 year old thread.. oh well.. Yah I am using the latest dx, the flicker i was seeing looked like the backbuffer (ie sometimes my guis would apear on the texture). But yah moving the texture generation out of the render loop did the trick..
#4
02/08/2007 (11:21 am)
Haha yea that's cool, years fly by :p
Torque Owner Kevin Johnson
TextureReadyToRender() was being fired when other objects were trying to render..
What solved it for me was pre loading the generated textures into an array, then incrementing the texture @25fps