Esempio n. 1
0
int CHikVision::SystemStartup( HWND hOverlayWnd )
{
    int nEncodeChannel = InitDSPs( );
    qDebug( ) << "Encode Channel Number :" << nEncodeChannel << endl;
    int nRet = RegisterStreamDirectReadCallback( ( STREAM_DIRECT_READ_CALLBACK ) StreamDirectReadCallback,this );
    nRet = 0;

    return nEncodeChannel;
}
Esempio n. 2
0
void EncodedStream::openDSP(){
	SetDefaultVideoStandard(StandardPAL); //no need default PAL
	m_g_channel_count = InitDSPs();
	RegisterImageStreamCallback(EncodedStream::interOriHandler, NULL);
	RegisterStreamDirectReadCallback(EncodedStream::internalHandler, NULL);
	RegisterStreamReadCallback(EncodedStream::internalHandlerExt, NULL);
	m_g_count = 0;
	m_g_dsp_opened = true;
}
Esempio n. 3
0
LRESULT CMainDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// set icons
	HICON hIcon = AtlLoadIconImage(IDR_MAINFRAME, LR_DEFAULTCOLOR, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON));
	SetIcon(hIcon, TRUE);
	HICON hIconSmall = AtlLoadIconImage(IDR_MAINFRAME, LR_DEFAULTCOLOR, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON));
	SetIcon(hIconSmall, FALSE);
	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);
	UIAddChildWindowContainer(m_hWnd);


	initValue();
	LoadSetting();
	InitDB();
	initPreviewDlg();
	initDH();
	initBottomButton();
	initTimeLabel();
	initSlide();
	initCradleButton();
	//默认选中channel 0
	FocusChannel(0);
	//默认布局
	SetPreviewDlgLayout(PREVIEWLAYOUT4,0);
	//计时器 时钟
	SetTimer(1,1000);
	//录像
	SetTimer(2,1000);
	SetWindowPos(NULL,0,0,1000,700,SWP_SHOWWINDOW);
	CenterWindow();

	RegisterStreamDirectReadCallback(StreamDirectReadCallback, this);
	updateSetting();
	return TRUE;
}