当前位置: 首页>>代码示例>>C++>>正文


C++ CBaseSplitterOutputPin::QueueSize方法代码示例

本文整理汇总了C++中CBaseSplitterOutputPin::QueueSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseSplitterOutputPin::QueueSize方法的具体用法?C++ CBaseSplitterOutputPin::QueueSize怎么用?C++ CBaseSplitterOutputPin::QueueSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBaseSplitterOutputPin的用法示例。


在下文中一共展示了CBaseSplitterOutputPin::QueueSize方法的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;
}
开发者ID:DanHenebry,项目名称:mpc-hc,代码行数:13,代码来源:BaseSplitter.cpp

示例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;
}
开发者ID:DanHenebry,项目名称:mpc-hc,代码行数:40,代码来源:BaseSplitter.cpp

示例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;
}
开发者ID:avdbg,项目名称:MPC-BE,代码行数:37,代码来源:BaseSplitter.cpp


注:本文中的CBaseSplitterOutputPin::QueueSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。