Re: Windows CE 6 - DMO registration & instanciation



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

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

(http://msdn2.microsoft.com/en-us/library/aa921461.aspx)
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
Win32/Win64.

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 :

HKCR
{
NoRemove CLSID
{
ForceRemove %CLSID_AVCDecoder% = s '%DESCRIPTION%'
{
ProgID = s '%PROGID%.%VERSION%'
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%'
'Pins'
{
'Input'
{
val 'ConnectsToPin' = s 'Output'
'Types'
{
'%MEDIATYPE_Video%'
{
'%UUID_FOURCC_H264%'
}
}
}
'Output'
{
val 'ConnectsToPin' = s 'Input'
'Types'
{
'%MEDIATYPE_Video%'
{
'%MEDIASUBTYPE_RGB565%'
}
}
}
}
}
}
NoRemove 'DirectShow'
{
NoRemove 'MediaObjects'
{
'%LIBID%'
'%CLSID_AVCDecoder%' = s '%DESCRIPTION%'
{
val 'InputTypes' = b
7669647300001000800000aa00389b716832363400001000800000aa00389b71
val 'OutputTypes' = b
7669647300001000800000aa00389b717beb36e44f52ce119f530020af0ba770
}
'Categories'
{
'%DMOCategory%'
{
'%CLSID_AVCDecoder%'
}
}
}
}
NoRemove 'Filter'
{
'%CLSID_AVCDecoder%' = s '%DESCRIPTION%'
}
}


With this rgs file, the h264 FOURCC is recognized and the DLL is
loaded.
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 :
BEGIN_COM_MAP(CAVCDecoder)
COM_INTERFACE_ENTRY(IMediaObject)
END_COM_MAP()


and in the IDL :

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

library HW2DMO
{
importlib("stdole2.tlb");
interface IDocHostUIHandlerDispatch;
interface IAxWinAmbientDispatchEx;


[
uuid(817D7FF6-B252-42CB-9B90-B2E7FBBAAE77),
helpstring("AVCDecoder Class")
]
coclass AVCDecoder
{
[default] interface IMediaObject;
};
};



Is it correct or should i derives from IDispatch?

Why?

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
//http://www.riseoftheants.com/mmx/faq.htm


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