设为首页 - 加入收藏 焦点技术网
热搜:java
当前位置:首页 >

(DirectX系列07)DirectShow MFC下Filter编码分析

2010-10-26 08:01:00.0 DirectX filter mfc video null  
导读:{}HRESULT CAppTransform::Transform(IMediaSample *pSample){ // Override to do something inside the application // Such as grabbing a poster frame... // ...    return S_OK;}// Check if we can support th...。。。
{
}

HRESULT CAppTransform::Transform(IMediaSample *pSample)
{
 // Override to do something inside the application
 // Such as grabbing a poster frame...
 // ...

    return S_OK;
}

// Check if we can support this specific proposed type and format
HRESULT CAppTransform::CheckInputType(const CMediaType *pmt)
{
 // We accept a series of raw media types
 if (pmt->majortype == MEDIATYPE_Video &&
  (pmt->subtype == MEDIASUBTYPE_RGB32 ||
  pmt->subtype == MEDIASUBTYPE_RGB24 ||
  pmt->subtype == MEDIASUBTYPE_RGB565 ||
  pmt->subtype == MEDIASUBTYPE_RGB555 ||
  pmt->subtype == MEDIASUBTYPE_UYVY ||
  pmt->subtype == MEDIASUBTYPE_YUY2))
 {
  return NOERROR;
 }
 return E_FAIL;
}

(编辑: xxxluozhen)

网友评论
相关文章