// Intended to be called by the owing filter during EOS processing so
// that the media times can be adjusted to the stop time.  This ensures
// that the GetCurrentPosition will actully get to the stop position.
HRESULT
CRendererPosPassThru::EOS()
{
    HRESULT hr;

    if ( m_bReset == TRUE ) hr = E_FAIL;
    else
    {
	LONGLONG llStop;
	if SUCCEEDED(hr=GetStopPosition(&llStop))
	{
	    CAutoLock cAutoLock(&m_PositionLock);
	    m_StartMedia =
	    m_EndMedia	 = llStop;
	}
    }
Beispiel #2
0
void DDFStateMachine::SetStateWaitingForNextFetch(ULO rasterY, ULO cylinder)
{
  ULO stop = GetStopPosition();
  ULO start = GetStartPosition();
  ULO currentCycle = cylinder / 2;

  if ((stop & 7) != (start & 7)) stop += GetFetchSize();
  
  if (stop > currentCycle)
  {
    // More fetches on this line
    SetState(DDF_STATE_WAITING_FOR_NEXT_FETCH, MakeArriveTime(rasterY, cylinder + GetFetchSize()*2));
  }
  else if (start > currentCycle)
  {
    // Fetch start will be seen on this line
    SetState(DDF_STATE_WAITING_FOR_FIRST_FETCH, MakeArriveTime(rasterY, start*2));
  }
  else
  {
    SetState(DDF_STATE_WAITING_FOR_FIRST_FETCH, MakeArriveTime(rasterY + 1, start*2));
  }
}
Beispiel #3
0
STDMETHODIMP CStreamSwitcherPassThru::GetStopPosition(LONGLONG* pStop)
{
    CallPeerSeeking(GetStopPosition(pStop));
}