Ejemplo n.º 1
0
HRESULT OutpinVideo::GetCurrentPosition(LONGLONG* p)
{
    Filter::Lock lock;

    HRESULT hr = lock.Seize(m_pFilter);

    if (FAILED(hr))
        return hr;

    if (!bool(m_pPinConnection))
        return VFW_E_NOT_CONNECTED;

    const Inpin& inpin = m_pFilter->m_inpin;
#if 0
    const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);

    if (bool(pSeek))
    {
        lock.Release();
        return pSeek->GetCurrentPosition(p);
    }

    if (p == 0)
        return E_POINTER;

    return E_FAIL;
#else
    if (p == 0)
        return E_POINTER;

    *p = inpin.m_start_reftime;

    return S_OK;
#endif
}
Ejemplo n.º 2
0
HRESULT Outpin::GetCurrentPosition(LONGLONG* p) {
  const Inpin& inpin = m_pFilter->m_inpin;
  const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);

  if (bool(pSeek))
    return pSeek->GetCurrentPosition(p);

  if (p == 0)
    return E_POINTER;

  return E_FAIL;
}