2025-04-27 07:49:33 -04:00

50 lines
2.2 KiB
Plaintext

DMO test issues - GetOutputType() and SetOutputType()
First issue:
Problem:
HRESULT GetOutputType( DWORD dwOutputStreamIndex,
DWORD dwTypeIndex,
DMO_MEDIA_TYPE *pmt)
Get the dwTypeIndex type for the outputStream dwOutputStreamIndex. According to the DMO spec,
the media type returned in pmt may be a partial type indicating a range of preferred types.
Does this mean that some fields in the media type structure may be left blank after calling
GetOutputType?
Currently, the DMO streaming test regarding SetOutputType() is implemented this way:
-----------------------------------------------------------------------
do {
hrGet = GetOutputType( 0, dwOutputTypeIndex, &mt );
if( FAILED( hrGet ) && (DMO_E_NO_MORE_ITEMS != hrGet) ) {
return hrGet;
}
if( DMO_E_NO_MORE_ITEMS != hrGet ) {
hrSet = SetOutputType( 0, &mt, 0 );
MoFreeMediaType(&mt);
dwOutputTypeIndex++;
}
} while( (hrGet != DMO_E_NO_MORE_ITEMS) && FAILED( hrSet ) );
------------------------------------------------------------------------
The input media type to the SetOutputType() is the output media type from
GetOutputType(). If some fileds such as format type and format block is not
filled by GetOutputType(), SetoutputType() will fail. Please see DMO bug 150653,
150643 in Millennium db.
Question:
Therefore, the DMO test app need to fill the media type structure fields before calling
SetOutputType(). The question is which fields has been filed by getOUtputType(), which fields
need to be filled by the test app. Do we need to allow the test tool to get output media type
from the user. If so, we need to provide options for the user to choose, since the media type
involves lots of low level details.
Second issue:
I read from the online DMO doc( http://mikewasson/dshow/dmo/oview/dmo_using.htm) that:
"...For a decoder, you would generally set the input type and then choose an output type.
For an encoder, you would set the output type and then choose an input type...". Please
give more explanations. currently in DMO test code, encoder and decoder are tested the same
way (see above code snippet).
Please educate me on the above issues.