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


C++ BaseProtocol::EnqueueForDelete方法代码示例

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


在下文中一共展示了BaseProtocol::EnqueueForDelete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: BindSSL

bool InboundRTMPSDiscriminatorProtocol::BindSSL(IOBuffer &buffer) {
	//1. Create the RTMP protocol
	BaseProtocol *pRTMP = new InboundRTMPProtocol();
	if (!pRTMP->Initialize(GetCustomParameters())) {
		FATAL("Unable to create RTMP protocol");
		pRTMP->EnqueueForDelete();
		return false;
	}

	//2. Destroy the link
	BaseProtocol *pFar = _pFarProtocol;
	pFar->ResetNearProtocol();
	ResetFarProtocol();

	//3. Create the new links
	pFar->SetNearProtocol(pRTMP);
	pRTMP->SetFarProtocol(pFar);

	//4. Set the application
	pRTMP->SetApplication(GetApplication());

	//5. Enqueue for delete this protocol
	EnqueueForDelete();

	//6. Process the data
	if (!pRTMP->SignalInputData(buffer)) {
		FATAL("Unable to process data");
		pRTMP->EnqueueForDelete();
	}

	return true;
}
开发者ID:2php,项目名称:crtmpserver,代码行数:32,代码来源:inboundrtmpsdiscriminatorprotocol.cpp

示例2: SignalDetachedFromInStream

void OutboundConnectivity::SignalDetachedFromInStream() {
	BaseProtocol *pProtocol = ProtocolManager::GetProtocol(_rtpClient.protocolId);
	if (pProtocol != NULL) {
		pProtocol->EnqueueForDelete();
	}
	_pRTSPProtocol = NULL;
}
开发者ID:OpenQCam,项目名称:qcam,代码行数:7,代码来源:outboundconnectivity.cpp

示例3: SignalStreamUnRegistered

void AppleStreamingClientApplication::SignalStreamUnRegistered(BaseStream *pStream) {
	if (pStream->GetType() != ST_IN_NET_TS)
		return;

	BaseProtocol *pProtocol = pStream->GetProtocol();
	if (pProtocol == NULL) {
		ASSERT("Protocol is NULL!!!");
	}
	uint32_t contextId = pProtocol->GetCustomParameters()["contextId"];
	ClientContext *pContext = ClientContext::GetContext(contextId, 0, 0);
	if (pContext == NULL) {
		WARN("Context not available anymore");
		pProtocol->EnqueueForDelete();
		return;
	}

	pContext->SignalStreamUnRegistered(pStream);
}
开发者ID:2php,项目名称:crtmpserver-1,代码行数:18,代码来源:applestreamingclientapplication.cpp

示例4:

	FOR_MAP(_clients, uint32_t, RTPClient, i) {
		BaseProtocol *pProtocol = ProtocolManager::GetProtocol(MAP_KEY(i));
		if (pProtocol != NULL)
			pProtocol->EnqueueForDelete();
	}
开发者ID:dista,项目名称:crtmpserver,代码行数:5,代码来源:outboundconnectivity.cpp


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