tags:

views:

38

answers:

0

Hello, This is a Direct Media Objects related problem. Basicly, I am trying to use the Color Converter DSP CLSID_CColorConvertDMO to convert from a YV12 video format to RGB24 video format. To init the input interface I have to call IMediaObject::SetInputType with a description of the video format in a DMO_MEDIA_TYPE structure as the second argument. Inside the DMO_MEDIA_TYPE structure RGB24 format is specified as a subtype MEDIASUBTYPE_RGB24, however DMO_MEDIA_TYPE has got a field pbFormat which in the case of video is either VIDEOINFOHEADER or VIDEOINFOHEADER2, which in turn has got a BITMAPINFOHEADER inside. Now the BITMAPINFOHEADER has got a field biCompression which is supposed to hold the FOURCC of the video format. Problem is, what is a valid FOURCC for RGB24 in this case. I tried various possibilities, such as getting the FOURCC from MEDIASUBTYPE_RGB24, but none worked, SetInputType just keeps rejecting. The funny thing is that it accepts a YV12 format. Has anybody used this component before? I would be most grateful if you could post some example code. Thanks in advance