Sign in to follow this  
TheSilentOne

Video and Audio playback to texture or overlay

Recommended Posts

TheSilentOne    122
Hi,

We are using DirectX 10 (or 9 if required) and C++ and would like to play back a video "in game".

That is to say there is either rendered to a quad within the game a video overlay. It will also need to play audio.

A bit of googling shows there is a managed control "AudioVideoPlayback" that does this, but nothing for C++ as far as we can find.

So any pointers on how to achieve this in C++ and DX 9/10?

Cheers.

Share this post


Link to post
Share on other sites
TheSilentOne    122
I've found a helpful library DSDX ([url="http://sourceforge.net/projects/dsdxlibrary/"]http://sourceforge.net/projects/dsdxlibrary/[/url]) which uses direct show to decode the video to a texture.

I've only got the sample working in DX9c but hopefully will get it working in DX10 soon.

Notes for anyone wanting to use this:

1) Download the windows SDK (make sure you get the correct 32/AMD (64bit) version
2) Install the SDK including the samples
3) In the samples you'll find under multimedia the directshow code/includes and solution for building the strmbase(d).lib. Build this
4) In your DSDX project reference the directX and windows SDK and directshow includes. MAKE SURE you put the directshow includes before the windows/direct x ones.
5) build and hopefully bobs your uncle!

Note if you are trying to build the DSDX dlls from scratch you will need to use [url="http://msdn.microsoft.com/en-us/library/7k30y2k5%28v=vs.80%29.aspx"]pragma export[/url] as I couldn't get the .def file working in VS2010 for some reason.

Eventually when I get DX10 sample working I'll commit them back to the sourceforge project.

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this