Пример #1
0
HRESULT CVideoPin::GetMediaType(CMediaType* pmt)
{
  GetMediaTypeInternal(pmt);

  if (pmt->subtype == FOURCCMap('1CVW') && m_VC1Override != GUID_NULL)
  {
    pmt->subtype = m_VC1Override;
    LogDebug("vid: GetMediaType - force VC-1 GUID");
  }

  return S_OK;
}
Пример #2
0
HRESULT CAudioPin::CheckMediaType(const CMediaType* pmt)
{
  CAutoLock lock(m_pFilter->pStateLock());

  CMediaType mt;
  GetMediaTypeInternal(&mt);

  if (pmt->subtype == MEDIASUBTYPE_BD_LPCM_AUDIO)
    mt.subtype = MEDIASUBTYPE_BD_LPCM_AUDIO;

  if (mt == *pmt) 
    return NOERROR;

  return E_FAIL;  
}
Пример #3
0
HRESULT CAudioPin::GetMediaType(int iPosition, CMediaType* pMediaType)
{
  CAutoLock lock(m_pFilter->pStateLock());

  CMediaType mt;
  GetMediaTypeInternal(&mt);

  if (mt.subtype == MEDIASUBTYPE_PCM && iPosition == 0)
  {
    mt.subtype = MEDIASUBTYPE_BD_LPCM_AUDIO;
    *pMediaType = mt;
  }
  else if ((mt.subtype == MEDIASUBTYPE_PCM && iPosition == 1) || iPosition == 0)
    *pMediaType = mt;
  else
    return VFW_S_NO_MORE_ITEMS;

  return S_OK;
}