int CHikVision::CloseChannel( HANDLE hChannel ) { if ( bRecorder ) { StopVideoCapture( hChannel ); } return ChannelClose( hChannel ); }
void EncodedStream::stop(){ if (m_channel_id >= 0){ if (m_g_real_handler != NULL || m_g_real_handler_ext != NULL){ StopVideoCapture(m_channel_handle); } if (m_g_real_ori_handler != NULL){ SetImageStream(m_channel_handle, false, 25, WIDTH, HEIGHT, NULL); } } }
void CMainDlg::StopCaptureVideo(int iChannel,bool sub) { StopVideoCapture(m_channelHandle[iChannel]); if (sub) { StopSubVideoCapture(m_channelHandle[iChannel]); m_isVideoCapture[iChannel+BLM_CHANNEL_MAX] = FALSE; } SYSTEMTIME systemTime; GetLocalTime(&systemTime); updateEndTime(systemTime,m_recordFileName[iChannel]); CloseHandle(m_fileHandle[iChannel]); if(sub) { updateEndTime(systemTime,m_recordFileName[iChannel+BLM_CHANNEL_MAX]); CloseHandle(m_fileHandle[iChannel+BLM_CHANNEL_MAX]); } m_isVideoCapture[iChannel] = FALSE; }