void BridgeSink::OnEOS(bool bConnected) { { CAutoLock lock(&m_csEOS); long nPins = 0; for (int n = 0; n < m_nPins; n++) { if (m_pPins[n]->IsConnected()) { nPins++; } } if (++m_nEOS != nPins) { LOG((TEXT("Sink 0x%x EOS discarded"), this)); return; } } if (bConnected) { BridgeController* pC = m_pPins[0]->GetStream()->GetController(); LOG((TEXT("Sink 0x%x EOS"), this)); pC->OnEndOfSegment(); } }
void BridgeSink::OnEOS(bool bConnected) { { CAutoLock lock(&m_csEOS); m_nEOS += 1; if (!IsAtEOS()) { LOG((TEXT("Sink 0x%x EOS discarded"), this)); return; } } if (bConnected) { BridgeController* pC = m_pPins[0]->GetStream()->GetController(); LOG((TEXT("Sink 0x%x EOS"), this)); pC->OnEndOfSegment(); } }