PDA

View Full Version : help me write a DMO wrapper


sysKin
1st June 2007, 15:13
Hi ~

DirectX Media Objects, aka DMOs, are the current recommended way of implementing audio/video transformations within directx framework. They're really simple COM objects - you push a frame into input, call a Process() function and get a frame on the other end.

Exactly like avs filters, but hard to use if I want to encode stuff (easy if I used graphedit but blah).

I happen to have some useful DMOs that do useful things with video, and I suspect there might be more of them in the future. Therefore, I'd like to write a wrapper that would allow me to use them as part of my script - they are just filters after all.

The problem is I have absolutely zero experience with all this COM stuff. I don't know how to load such dmo, how to get the functions I want, etc etc.

Can someone help me please? The avs part is easy thanks to sticky filter example (thanks!) but the COM part is hard - for me at least.

Thanks!

some reference on how to use DMOs (once you know how to load them lol): http://msdn2.microsoft.com/en-us/library/ms783322.aspx

:)

squid_80
2nd June 2007, 17:53
I think you'd have to call CoCreateInstance passing the CLSID of the DMO you want to use to get an IUnknown interface, then use its QueryInterface method to get the other interfaces (IMediaObject, IMediaObjectInPlace etc).

sysKin
3rd June 2007, 18:36
Hmmm thanks squid_80!

Silly exams might prevent me from doing this just yet... But this definitely sounds like what I should do.

dancho
5th June 2007, 09:48
COM in plain C (1-6) , this is link to first one...

http://www.codeproject.com/com/com_in_c1.asp

JohnnyMalaria
5th June 2007, 20:25
Hi ~

DirectX Media Objects, aka DMOs, are the current recommended way of implementing audio/video transformations within directx framework.

Actually, Microsoft have done away with the DMO samples and documentation in the SDK.

I was writing DMOs a while back and was somewhat amazed to see that they have seem to have fallen by the wayside.

hanfrunz
6th June 2007, 15:42
this (http://www.amazon.com/Programming-Microsoft-DirectShow-Digital-Television/dp/0735618216/ref=sr_1_1/105-2083794-6526850?ie=UTF8&s=books&qid=1181137267&sr=8-1) book is pretty good, if you get it for a good price :)