本文整理汇总了C++中PacketStream::ChangeDeliveryBandwidth方法的典型用法代码示例。如果您正苦于以下问题:C++ PacketStream::ChangeDeliveryBandwidth方法的具体用法?C++ PacketStream::ChangeDeliveryBandwidth怎么用?C++ PacketStream::ChangeDeliveryBandwidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketStream
的用法示例。
在下文中一共展示了PacketStream::ChangeDeliveryBandwidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
STDMETHODIMP
BasicPacketFlow::HandleUnSubscribe(INT32 lRuleNumber, UINT16 unStreamNumber)
{
PacketStream* pStream = &m_pStreams[unStreamNumber];
HX_ASSERT(pStream->m_bStreamRegistered);
if (lRuleNumber >= pStream->m_lNumRules)
return HXR_OK;
pStream->m_pRules[lRuleNumber].m_bRuleOn = FALSE;
if (!m_bInitialSubscriptionDone)
{
return HXR_OK;
}
if (pStream->m_pRules[lRuleNumber].m_bWaitForSwitchOffFlag)
{
pStream->m_pRules[lRuleNumber].m_PendingAction = ACTION_OFF;
}
else if (pStream->m_pRules[lRuleNumber].m_bBitRateReported)
{
// Update delivery rate
if (m_pRateManager)
{
IHXPacketFlowControl* pRateMgrFlowControl = NULL;
if (HXR_OK == m_pRateManager->QueryInterface(IID_IHXPacketFlowControl,
(void**)&pRateMgrFlowControl))
{
pRateMgrFlowControl->HandleUnSubscribe(lRuleNumber, unStreamNumber);
HX_RELEASE(pRateMgrFlowControl);
}
}
INT32 lChange = (-1) * (INT32)pStream->m_pRules[lRuleNumber].m_ulAvgBitRate;
ASSERT(pStream->m_bGotSubscribe);
pStream->ChangeDeliveryBandwidth(lChange);
m_pFlowMgr->ChangeDeliveryBandwidth(
lChange, !m_bIsMulticast && !pStream->m_bNullSetup);
pStream->m_pRules[lRuleNumber].m_bBitRateReported = FALSE;
}
return HXR_OK;
}