Re: Windows CE 6 - DMO registration & instanciation

I made some tests, according to what I understood (!), comments and
questions below.

On 7 déc, 16:46, "Alessandro Angeli" <nob...@xxxxxxxxxxxxxxxxxx>
From: "Tophe"

Yet, the com object (CLSID_SystemDeviceEnum) does not
exist. Have I missed something ? (I juste made a
copy/pase of the example code)
I also have full COM & DCOM.

AFAIK the SysDevEnum does not exist on WinCE, only on

Thanks, I'm not so crazy ;-)

As my DMO has to be used inside Windows Media Player,
should I implement the directshow wrapper filter or the
graphfilter does not need it ?

DirectShow provides its own DMOWrapper filter and the WMF
runtime knows how to use DMOs directly.

That's the point I do not catch : according to the traces, the graph
builder tries to find IBaseFilter interface :-(
So, it may be because I wrote a mistake in the registry :
here is what I have :

NoRemove CLSID
ForceRemove %CLSID_AVCDecoder% = s '%DESCRIPTION%'
VersionIndependentProgID = s '%PROGID%'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
val ThreadingModel = s '%THREADING%'
'TypeLib' = s '%LIBID%'

val 'Merit' = d '12345678'
val 'DMOCategory' = s '%DMOCategory%'
val 'DMOGuid' = s '%LIBID%'
val 'ConnectsToPin' = s 'Output'
val 'ConnectsToPin' = s 'Input'
NoRemove 'DirectShow'
NoRemove 'MediaObjects'
'%CLSID_AVCDecoder%' = s '%DESCRIPTION%'
val 'InputTypes' = b
val 'OutputTypes' = b
NoRemove 'Filter'
'%CLSID_AVCDecoder%' = s '%DESCRIPTION%'

With this rgs file, the h264 FOURCC is recognized and the DLL is
Also, your speaking about Windows Media Foundation, but does
DirectShow of Windows CE knows how to use DMOs directly ?

(Indeed, I suppose I
should implement this wrapper, as none of my InternalXXX
functions is called !)

The Internal*() methods are called by the template
implementation and not by any external code, since they are
not even part of the known public interfaces.

Yes, in the firsts tests, I thought it would have been more straight
forward... but there were breakpoints just to know if theses Internal*
are called or not ;-)

Third point :
My interface derives from IUnkown, and my class
implements this interface.

*Your* interface? What interface? A DMO *must* implement
IMediaObject. Custom intefaces do not count.

Yes, I do implement IMediaObject, but should I implement something
else ?

in the .h file :

and in the IDL :

import "oaidl.idl";
import "ocidl.idl";
import "atliface.idl";
import "mediaobj.idl";

library HW2DMO
interface IDocHostUIHandlerDispatch;
interface IAxWinAmbientDispatchEx;

helpstring("AVCDecoder Class")
coclass AVCDecoder
[default] interface IMediaObject;

Is it correct or should i derives from IDispatch?


Ok, I close my mouth : since, I read what IDispatch was ;-)

Alors, if I have to implements the wrapper filter, wich
interface(s) should I implements in this class ?

If you want to write a filter, you need to implement the
interfaces required by a filter, which means at least
IBaseFilter and IPin on the filter's pins plus IMemInputPin
on the input pins and IMediaSeeking on the output ones
(those last 2 interfaces are optional, but are necessary for
a "normal" transform filter).

Ok, If I'm not able to use the DMO, I'll write a filter :-/

// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com

Thanks a lot !
I hope I've been Understandable...

Relevant Pages

  • Re: compress a generic audio file into mp3
    ... Well this frightens me:(I'm only a novice with DirectShow, ... If FHg is MPEG Layer-3" filter in quartz.dll, ... remember I queried that interface for it's out pin not the filter itself ... ... by using a DS graph then a recompression with LAME dll :-) ...
  • Re: how to implement a virtual video driver base on testcap?
    ... DllRegisterServerfunction to change my filter ... IAMStreamConfig is a COM ... > interface defined by DirectShow framework. ... >> Can anyone tell me how to add IAMStreamConfig interface to my DShow ...
  • Re: Problems getting custom filter interface to work with application
    ... I'm new to DirectShow too, but I managed to add custom interface to my ... Then derive Your filter class from it (sometimes You need Your Pin class to ...
  • Re: Regarding directshow transform filter
    ... I want use my own directshow tranform filter in my application.If I ... register this custom transform filter in that systems also.Will this ... special control interface that lets you specify the media type, ...
  • RE: DirectShow, .NET and apartments - actual tests - Round 2: marshali
    ... DirectMusicPerformance interface being called upon canot be marshaled across ... private volatile bool finishThread1; ... //get the source filter ... Basically all the calls made from the second thread on the COM ...