Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

imposterrific

DirectShow: creating a DVD filter graph

This topic is 5235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m writing a DVD application and have already got it working. However I would like to specify exactly which filters are placed in the graph to improve consistency over multiple machines. If I were using an IGraphBuilder I would be able to specify the filters easily, but it requires me to specify a source file. When playing a DVD I just want it to read from the DVD drive. I use IDvdGraphBuilder to create various interfaces and it will automatically create the graph filter (without specifying a source file) using RenderDvdVideoVolume. However, I haven''t found any way to create filters with IDvdGraphBuilder as you can with IGraphBuilder. Is there a way to do it or am I stuck? Thanks for your help. Jeff

Share this post


Link to post
Share on other sites
Advertisement
I found some great hints at:

http://www.flipcode.com/tutorials/tut_dshow03.shtml

However when I use CoCreateInstance(CUSTOM_GUID,...); I get a null object on my IBaseFilter pointer pointer. My GUID definition looks like this:

DEFINE_GUID(CUSTOM_GUID,0x9B8C4620,0x2C1A,0x11D0,0x84,0x93,0x00,
0xA0,0x24,0x38,0xAD,0x48);

the GUID I have hard coded there is the GUID for a Dvd video decoder which I did not create myself. Can anyone see what I'm doing wrong?

-Jeff

Share this post


Link to post
Share on other sites
I checked the return code from CoCreateInstance and got an unexpected result. MSDN states that CoCreateInstance will return one of four possible HRESULTs: REGDB_E_CLASSNOTREG, CLASS_E_NOAGGREGATION, E_NOINTERFACE, S_OK. However I get an HRESULT of E_FAIL which doesn't help me very much. The return code occurs here:

hr = CoCreateInstance(My_Dvd_VideoDecoder,NULL,CLSCTX_INPROC_SERVER,__uuidof(IBaseFilter),
(void**)&videoDecoder);
return hr; // returns: 0x80004005, return added for debugging

and at the start of my program I have:
DEFINE_GUID(My_Dvd_VideoDecoder,0x0246Ca20,0x776D,0x11D2,0x80,0x10,0x00,
0x10,0x4B,0x9B,0x85,0x92);

-Jeff

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!