From: Wouter on
Hi all,

I am trying to decode a video stream encoded as WMV3 on a Windows Mobile
5.0 device. More precisely, I have a DirectShow filter graph, with as
source filter a RTP source that receives WMV3 video from the network.
The goal is to render the video data in a video window.

I noticed that there is a DMO for WMV9 *encoding*, but not for decoding!

The WMV9 encoder DMO can be successfully added to the filter graph:
> CHK( pVideoEncoder.CoCreateInstance( CLSID_DMOWrapperFilter ));
> CHK( pVideoEncoder.QueryInterface( &pWrapperFilter ));
> CHK( pWrapperFilter->Init( CLSID_CWMV9EncMediaObject, DMOCATEGORY_VIDEO_ENCODER ));
> CHK( pFilterGraph->AddFilter( pVideoEncoder, L"WMV9 DMO Encoder" ));

This doesn't work for the decoder DMO however:
> CHK( pWrapperFilter->Init( CLSID_CWMVDecMediaObject, DMOCATEGORY_VIDEO_DECODER ));
results in hr = 0x80040154 {Class not registered}

After some research I found out that indeed there is no such filter in
the list of DMO's; in the registry at
HKEY_CLASSES_ROOT\DirectShow\MediaObjects\.
(the only ones are an MP3 decoder, and a WMV9 encoder... strange
selection if you ask me.)

I figured that maybe they forgot to register the decoder, so I did that
myself:
> DMO_PARTIAL_MEDIATYPE wmv3 = { MEDIATYPE_Video, MEDIASUBTYPE_WMV3 };
> hr = DMORegister(L"WMV Decoder", CLSID_CWMVDecMediaObject, DMOCATEGORY_VIDEO_DECODER, 0, 1, &wmv3, 1, &wmv3);
which succeeds. (the CLSID is added under MediaObjects, and the category
is added under MediaObjects\Categories.)

This, however, does not solve the original problem: Init still returns
Class not registered.

How can I access the WMV decoder in a DirectShow graph on WM5?
Thanks for your help.

Wouter
From: Wouter on
Since I have not received a reply on my original post, I am re-posting
this to a few additional groups.
F'up to: microsoft.public.pocketpc.developer

I wrote:
> Hi all,
>
> I am trying to decode a video stream encoded as WMV3 on a Windows Mobile
> 5.0 device. More precisely, I have a DirectShow filter graph, with as
> source filter a RTP source that receives WMV3 video from the network.
> The goal is to render the video data in a video window.
>
> I noticed that there is a DMO for WMV9 *encoding*, but not for decoding!
>
> The WMV9 encoder DMO can be successfully added to the filter graph:
>> CHK( pVideoEncoder.CoCreateInstance( CLSID_DMOWrapperFilter ));
>> CHK( pVideoEncoder.QueryInterface( &pWrapperFilter ));
>> CHK( pWrapperFilter->Init( CLSID_CWMV9EncMediaObject,
>> DMOCATEGORY_VIDEO_ENCODER ));
>> CHK( pFilterGraph->AddFilter( pVideoEncoder, L"WMV9 DMO Encoder" ));
>
> This doesn't work for the decoder DMO however:
>> CHK( pWrapperFilter->Init( CLSID_CWMVDecMediaObject,
>> DMOCATEGORY_VIDEO_DECODER ));
> results in hr = 0x80040154 {Class not registered}
>
> After some research I found out that indeed there is no such filter in
> the list of DMO's; in the registry at
> HKEY_CLASSES_ROOT\DirectShow\MediaObjects\.
> (the only ones are an MP3 decoder, and a WMV9 encoder... strange
> selection if you ask me.)
>
> I figured that maybe they forgot to register the decoder, so I did that
> myself:
>> DMO_PARTIAL_MEDIATYPE wmv3 = { MEDIATYPE_Video, MEDIASUBTYPE_WMV3 };
>> hr = DMORegister(L"WMV Decoder", CLSID_CWMVDecMediaObject,
>> DMOCATEGORY_VIDEO_DECODER, 0, 1, &wmv3, 1, &wmv3);
> which succeeds. (the CLSID is added under MediaObjects, and the category
> is added under MediaObjects\Categories.)
>
> This, however, does not solve the original problem: Init still returns
> Class not registered.
>
> How can I access the WMV decoder in a DirectShow graph on WM5?
> Thanks for your help.
>
> Wouter