Esempio n. 1
0
//	开始播放
BOOL CRealPlayXCtrl::StartPlay() 
{
	// TODO: Add your dispatch handler code here
	BOOL bSuccess = FALSE;

	if(0 != m_LoginID)
	{
		//	关闭当前画面视频
		if(0 != m_hRealPlay)
		{
			BOOL bRet = CLIENT_StopRealPlay(m_hRealPlay);
			//刷新页面
			Invalidate();
		}

		//	开始播放
		long lRet = CLIENT_RealPlay(m_LoginID,m_nChannel,m_hWnd);
		if(0 != lRet)
		{
			m_hRealPlay = lRet;
			bSuccess = TRUE;
		}
		else
		{
			m_hRealPlay = 0;
			bSuccess = FALSE;
		}
	}

	return bSuccess;
}
j_result_t CDahuaChannel::CloseStream(const CXlClientCmdData &cmdData)
{
	if (m_llStreamHandle != 0)
	{
		CLIENT_StopRealPlay(m_llStreamHandle);
		m_llStreamHandle = 0;
	}
	DelRingBuffer(cmdData.cmdRealPlay.pBuffer);

	return J_OK;
}
Esempio n. 3
0
/*----------------------------------
函数功能:停止播放实时流媒体
调用参数:
返回参数:
函数说明:
-----------------------------------*/
_EXT_C_DEVCAM_API BOOL CAM_StopStreamPlay(CommonParam *commonParam,long channel){
	if (commonParam == NULL){
		commonParam->devError = StopPlayError;
		return FALSE;
	}
	
	if(commonParam->deviceType == NET_IPC_SERIAL){
		CLIENT_StopRealPlay(commonParam->playHandle);
		delete []commonParam->frameBuffer;
		commonParam->frameBuffer = NULL;
		delete []commonParam->JPEGBuffer;
		commonParam->JPEGBuffer = NULL;
	}
	if(commonParam->deviceType == NET_NVR_SERIAL){
		CLIENT_StopRealPlay(commonParam->cameraParam[channel].playHandle);
		delete []commonParam->cameraParam[channel].frameBuffer;
		commonParam->cameraParam[channel].frameBuffer = NULL;
		delete []commonParam->cameraParam[channel].JPEGBuffer;
		commonParam->cameraParam[channel].JPEGBuffer = NULL;
	}
	return TRUE;
}
Esempio n. 4
0
static void 
dah_stop_real_stream(stream_info_t *strm_info)
{show_debug("%s()<------------------------\n", __FUNCTION__);
    NMP_ASSERT(strm_info);

    if (DAH_INVALID_HANDLE != strm_info->handle)
    {
        CLIENT_StopRealPlay((LONG)strm_info->handle);
        strm_info->handle = DAH_INVALID_HANDLE;
    }

    return ;
}
void CDahuaChannel::DoRealPlayDisConnect(LLONG lOperateHandle, EM_REALPLAY_DISCONNECT_EVENT_TYPE dwEventType, void* param)
{
	J_StreamHeader streamHeader = { 0 };
	streamHeader.frameType = jo_media_broken;
	TLock(m_vecLocker);
	std::vector<RingBufferInfo>::iterator it = m_vecRingBuffer.begin();
	for (; it != m_vecRingBuffer.end(); it++)
	{
		it->pRingBuffer->PushBuffer(NULL, streamHeader);
	}
	TUnlock(m_vecLocker);

	CLIENT_StopRealPlay(lOperateHandle);
	m_llStreamHandle = 0;
}
Esempio n. 6
0
//	停止播放
BOOL CRealPlayXCtrl::StopPlay() 
{
	// TODO: Add your dispatch handler code here
	BOOL bSuccess = TRUE;

	//	关闭视频
	if(0 != m_hRealPlay)
	{
		BOOL bRet = CLIENT_StopRealPlay(m_hRealPlay);
		m_hRealPlay = 0;

		//刷新页面
		Invalidate();
	}

	return bSuccess;
}