MSDV----> DV Splitter ---> DV Decoder ---> DMO Encoder
For encoding video data receive from DV Decoder we are using
WindowsMedia Encoder DMO(CLSID_CWMV9EncMediaObject).
We have set DVDECODERRESOLUTION to DVRESOLUTION_FULL so
are getting interlace video.
We have configured the encoder in the following way :
1 )We are setting g_wszWMVCInterlacedCodingEnabled property to TRUE on
the DMO using IPropertyBag.
2) The media type with format as VIDEOINFOHEADER2 receive from the
DvDecoder
is set as the DMO InputType( using IMediaObkect::SetInputType), which
is successful ( returns S_OK)
3) We make the output media type modifying the input MediaType
(VIDEOINFOHEADER2) as
VIH->bmiHeader.biCompression = WMCFOURCC_WMV3;
VIH->bmiHeader.dwbitrate = dwtargetBitrate;
mt-> SetSubtype(&WMCMEDIASUBTYPE_WMV3)
keeping rest of the members
same.
Pass this mediatype for
IWMCodecPrivateData::SetPartialOutputType.
It returns error code "Unexpected Exception raised" -
(0x80040205)
Please guide on the issue.
If we dont enable interlaced encoding i.e If we set the input type and
the output type format to VIDEOINFOHEADER,irrespective of the actual
interlaced data, it works fine.Also g_wszWMVCInterlacedCodingEnabled
is FALSE.
Note : (We are using Windows Media Player 11, wherein creating DMO
with CLSID_CWMVEncMediaObject2 fails as unregistered component.)