Microsoft DirectX 8.1 (C++) |
You must override the CheckInputType function to determine if the proposed input to your filter is valid. (This does not apply to filter classes derived from CBaseFilter.) Your implementation should return an error for media types it can't support. The media types your filter supports are listed in the AMOVIESETUP_MEDIATYPE structure. For example:
HRESULT CMyFilter::CheckInputType(const CMediaType *pmt)
{
if (pmt->majortype != MEDIATYPE_Video) {
return S_FALSE;
}
else return S_OK;
}