Anyone Help Me!! Windows Media Player does never call the IMediaObject::ProcessOutput in My DMO

I'm writing a DMO Decoder to be used in windows media player.
Things are almost done...
Media negotiation is fine and the player calls the ProcessInput()
function well..
but the WMP does not call the ProcessOutput() function at all.

The function call sequence in my DMO that I see is called as you look
like this:


InternalAcceptingInput
InternalFlush
InternalAcceptingInput
InternalProcessInput
InternalGetOutputSizeInfo


InternalAcceptingInput
InternalFlush
InternalAcceptingInput
InternalProcessInput
InternalGetOutputSizeInfo


InternalAcceptingInput
InternalFlush
InternalAcceptingInput
InternalProcessInput
InternalGetOutputSizeInfo


InternalAcceptingInput
InternalFlush
InternalAcceptingInput
InternalProcessInput
InternalGetOutputSizeInfo


the media player calls ProcessInput() and Flush() repeatedly until the
all video frames are exhausted.
and then the player gets into deadlock.


as i debugged,
the player had retrieved all the frames in the loadded file and they
had been passed into the ProcessInput() function.
My DMO had been wrriten with the modified DMOSample source provided
with DX9 SDK.


I've tested also in Graph Editor and i found the DMO worked
beautifully and fine.
Why the ProcessOutput() function is not called...?


Any ideas on what I need to do to get it to call the
InternalProcessOutput function?


Thanx in advance..


Regards...
MyeongJeong Park.

[1671 byte] By [MyeongJeong,Park] at [2008-1-8]
# 1

Hmm.

Well, I'd start by making sure you aren't sending S_FALSE back from InternalProcessInput (or ProcessInput). That would indicate that there is no output for the sample.

Next, I'd check what you are returning from InternalGetOutputSizeInfo. If you said you were returning zero bytes, that might do this.

Lastly, I'd see about setting a breakpoint (or logging statement) in ProcessOutput to see if it is rejecting the call before it gets to InternalProcessOutput.

LGS at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2

Windows Media Player becomes dead-locked as soon as the ASF Reader filter reads up all the frames.

In fact, I've printed frame counts in the ProcessInput function. The frame count was same as the asf file contains.

Here is the DMO with which i'm testing. Download the DMO with the problem.

The .dsw file in the "project" directory is the VC6 workspace file.

There is the sample asf file that should be played by the Windows Media Player.

My DMO is working successfully in the Graph Editor.

The Graph Editor draws the filter graph as follows :

ASF Reader --> iCanTek MPEG4 Decoder DMO --> Video Renderer

( Sample.asf )

All things are fine in the graph editor.

But Only the WMP does not call the ProcessOutput function.

Please look at the DMO source code and find any faults i made..

Thanx guys in advance With best regards...

MyeongJeong, Park.

MyeongJeong,Park at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3

I Modified the "dmoimpl.h" file and I inserted the OutputDebugString() function printing the function name on top of the each functions.

and your third suggestion is impossible, because I maked a break point on the begining of the ProcessOutput Function in the "dmoimpl.h" file many times then the debugger diddn't trigger at all.

thanx very much any way...

This DMO example source is on the following URL:

http://grinbee.woobi.co.kr/MySampleDMO.zip

MyeongJeong,Park at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 4

Are you working on Vista or XP?

If it is Vista, WMP v11 goes MF (media foundation) channel by default which means that your DMO will not be used. The option is to write a MF Transform for Vista.

Refer to:

“Migrating from DirectShow to Media Foundation”

http://msdn2.microsoft.com/en-us/library/aa468614.aspx

My suggestions:

1. Test your DMO on XP and make sure whether it works well.

2. Build MFT if you want to port your DMO to Vista.

MADLAX at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 5

No... I'm working on XP home edition.

so the IMediaFoundation interface is not necessary at the moment...

(it must be implemented in the future for vista though....).

At the moment, My DMO( SampleDMO in DX Sample ) does NEVER work with WMP on XP.

the main problem is that the WMP does not call the IMediaObject:Stick out tonguerocessOutput method.

My DMO works beautifully fine in the DSPlay in the WMSDK utility and GraphEditor in the DX utility.

You can get an example source code from : http://grinbee.woobi.co.kr/MySampleDMO.zip

thanx for reading...

in addition, i'll really appreciate if you test the sample source.

MyeongJeong,Park at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 6

The download link does not work.

MADLAX at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 7

Thak you guys very much..

thanx to you, i resolved the problem...

it was very simple...

INsert the following line at the end of the SetOutputType() method or InternalCheckOutputType() method :

pmt->bFixedSizeSamples = TRUE;

MyeongJeong,Park at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 8

Can you please update the steps required to write a DMO.

From everywhere we are getting the information that we have to overwrite the IMediaObject methods , that is fine we have a running codec and can perform the same.

Question is what will be the initial step to write a DMO , the development environment and from where to get the wizard and how to integrate the abstract base classes ?

Will it be a COM component or what , is there any sample DMO frameform available , if yes from where

Regards

Vishal

Vishalarora67767 at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 9

Microsoft does not provide a DMO wizard. There is a template class, IMediaObjectImpl, defined in the header file dmoimpl.h, which is available in the Windows SDK. You don't have to use this class, but it helps with some common tasks like parameter checking and storing the media types.

http://msdn2.microsoft.com/en-us/library/ms785938.aspx

To implement the COM parts of a DMO (IUnknown, class factory), I would recommend using ATL. IMediaObjectImpl is designed to be compatible with the ATL COM wizard.

Unfortunately, there is no DMO sample in the Windows SDK.

-
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.

MikeWasson-MSFT at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 10

I know where to find some sample DMOs. However, they are written in c#. Don't know how useful that would be for your needs.

If you'd like to see them, they are at http://DirectShowNet.SourceForge.net . You'll need to download both the library and the samples zip files if you want them to run.

Co-author DirectShowNet

LGS at 2007-10-2 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified