Пример #1
0
HRESULT Outpin::SetPositions(LONGLONG* pCurr, DWORD dwCurr, LONGLONG* pStop,
                             DWORD dwStop) {
  const Inpin& inpin = m_pFilter->m_inpin;
  const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);

  if (bool(pSeek))
    return pSeek->SetPositions(pCurr, dwCurr, pStop, dwStop);

  return E_FAIL;
}
Пример #2
0
HRESULT OutpinVideo::SetPositions(
    LONGLONG* pCurr_,
    DWORD dwCurr_,
    LONGLONG* pStop_,
    DWORD dwStop_)
{
    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;
    const GraphUtil::IMediaSeekingPtr pSeek(inpin.m_pPinConnection);

    if (bool(pSeek))
    {
        lock.Release();

        LONGLONG curr;
        LONGLONG* const pCurr = pCurr_ ? pCurr_ : &curr;

        const DWORD dwCurr = pCurr_ ? dwCurr_ : AM_SEEKING_NoPositioning;

        LONGLONG stop;
        LONGLONG* const pStop = pStop_ ? pStop_ : &stop;

        const DWORD dwStop = pStop_ ? dwStop_ : AM_SEEKING_NoPositioning;

        return pSeek->SetPositions(pCurr, dwCurr, pStop, dwStop);
    }

    return E_FAIL;
}