本文整理汇总了C++中CBaseSplitterOutputPin::QueuePacket方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseSplitterOutputPin::QueuePacket方法的具体用法?C++ CBaseSplitterOutputPin::QueuePacket怎么用?C++ CBaseSplitterOutputPin::QueuePacket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseSplitterOutputPin
的用法示例。
在下文中一共展示了CBaseSplitterOutputPin::QueuePacket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeliverPacket
HRESULT CBaseSplitterFilter::DeliverPacket(CAutoPtr<Packet> p)
{
HRESULT hr = S_FALSE;
CBaseSplitterOutputPin* pPin = GetOutputPin(p->TrackNumber);
if (!pPin || !pPin->IsConnected() || !m_pActivePins.Find(pPin)) {
return S_FALSE;
}
if (p->rtStart != Packet::INVALID_TIME) {
m_rtCurrent = p->rtStart;
p->rtStart -= m_rtStart;
p->rtStop -= m_rtStart;
ASSERT(p->rtStart <= p->rtStop);
}
{
CAutoLock cAutoLock(&m_csmtnew);
CMediaType mt;
if (m_mtnew.Lookup(p->TrackNumber, mt)) {
p->pmt = CreateMediaType(&mt);
m_mtnew.RemoveKey(p->TrackNumber);
}
}
if (!m_bDiscontinuitySent.Find(p->TrackNumber)) {
p->bDiscontinuity = TRUE;
}
DWORD TrackNumber = p->TrackNumber;
BOOL bDiscontinuity = p->bDiscontinuity;
#if defined(_DEBUG) && 0
TRACE(_T("[%d]: d%d s%d p%d, b=%d, [%20I64d - %20I64d]\n"),
p->TrackNumber,
p->bDiscontinuity, p->bSyncPoint, p->rtStart != Packet::INVALID_TIME && p->rtStart < 0,
p->GetCount(), p->rtStart, p->rtStop);
#endif
hr = pPin->QueuePacket(p);
if (S_OK != hr) {
if (POSITION pos = m_pActivePins.Find(pPin)) {
m_pActivePins.RemoveAt(pos);
}
if (!m_pActivePins.IsEmpty()) { // only die when all pins are down
hr = S_OK;
}
return hr;
}
if (bDiscontinuity) {
m_bDiscontinuitySent.AddTail(TrackNumber);
}
return hr;
}