本文整理汇总了C++中CBaseSplitterOutputPin::QueueCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseSplitterOutputPin::QueueCount方法的具体用法?C++ CBaseSplitterOutputPin::QueueCount怎么用?C++ CBaseSplitterOutputPin::QueueCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseSplitterOutputPin
的用法示例。
在下文中一共展示了CBaseSplitterOutputPin::QueueCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetStatus
STDMETHODIMP CBaseSplitterFilter::GetStatus(int i, int& samples, int& size)
{
CAutoLock cAutoLock(m_pLock);
if (POSITION pos = m_pOutputs.FindIndex(i)) {
CBaseSplitterOutputPin* pPin = m_pOutputs.GetAt(pos);
samples = pPin->QueueCount();
size = pPin->QueueSize();
return pPin->IsConnected() ? S_OK : S_FALSE;
}
return E_INVALIDARG;
}
示例2: IsAnyPinDrying
bool CBaseSplitterFilter::IsAnyPinDrying()
{
int totalcount = 0, totalsize = 0;
POSITION pos = m_pActivePins.GetHeadPosition();
while (pos) {
CBaseSplitterOutputPin* pPin = m_pActivePins.GetNext(pos);
int count = pPin->QueueCount();
int size = pPin->QueueSize();
if (!pPin->IsDiscontinuous() && (count < MINPACKETS || size < MINPACKETSIZE)) {
// if (m_priority != THREAD_PRIORITY_ABOVE_NORMAL && (count < MINPACKETS/3 || size < MINPACKETSIZE/3))
if (m_priority != THREAD_PRIORITY_BELOW_NORMAL && (count < MINPACKETS / 3 || size < MINPACKETSIZE / 3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_ABOVE_NORMAL);
POSITION pos = m_pOutputs.GetHeadPosition();
while (pos) {
m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
}
m_priority = THREAD_PRIORITY_BELOW_NORMAL;
}
return true;
}
totalcount += count;
totalsize += size;
}
if (m_priority != THREAD_PRIORITY_NORMAL && (totalcount > m_QueueMaxPackets * 2 / 3 || totalsize > MAXPACKETSIZE * 2 / 3)) {
// SetThreadPriority(m_hThread, m_priority = THREAD_PRIORITY_NORMAL);
POSITION pos = m_pOutputs.GetHeadPosition();
while (pos) {
m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
}
m_priority = THREAD_PRIORITY_NORMAL;
}
if (totalcount < m_QueueMaxPackets && totalsize < MAXPACKETSIZE) {
return true;
}
return false;
}
示例3: IsAnyPinDrying
bool CBaseSplitterFilter::IsAnyPinDrying(DWORD MaxQueuePackets)
{
size_t totalcount = 0, totalsize = 0;
POSITION pos = m_pActivePins.GetHeadPosition();
while (pos) {
CBaseSplitterOutputPin* pPin = m_pActivePins.GetNext(pos);
size_t count = pPin->QueueCount();
size_t size = pPin->QueueSize();
if (!pPin->IsDiscontinuous() && (count < m_MinQueuePackets || size < GetMinQueueSize())) {
if (m_priority != THREAD_PRIORITY_BELOW_NORMAL && (count < m_MinQueuePackets/3 || size < GetMinQueueSize()/3)) {
POSITION pos = m_pOutputs.GetHeadPosition();
while (pos) {
m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
}
m_priority = THREAD_PRIORITY_BELOW_NORMAL;
}
return true;
}
totalcount += count;
totalsize += size;
}
if (m_priority != THREAD_PRIORITY_NORMAL && (totalcount > MaxQueuePackets*2/3 || totalsize > GetMaxQueueSize()*2/3)) {
POSITION pos = m_pOutputs.GetHeadPosition();
while (pos) {
m_pOutputs.GetNext(pos)->SetThreadPriority(THREAD_PRIORITY_NORMAL);
}
m_priority = THREAD_PRIORITY_NORMAL;
}
if (totalcount < m_MaxQueuePackets && totalsize < GetMaxQueueSize()) {
return true;
}
return false;
}