fast-yolo4/fast/PlayWnd.h

145 lines
3.7 KiB
C
Raw Normal View History

2024-09-25 09:43:03 +08:00
#if !defined(AFX_PLAYWND_H__158FCA3F_D545_4DB6_9946_0FC9F7D9D5CE__INCLUDED_)
#define AFX_PLAYWND_H__158FCA3F_D545_4DB6_9946_0FC9F7D9D5CE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PlayWnd.h : header file
//
#include "MessageText.h"
#include "dhnetsdk.h"
/////////////////////////////////////////////////////////////////////////////
// CPlayWnd window
/////////////////////////
// POPUP MENU ID DEFINE
#define VIDEO_MENU_BASE WM_USER + 1979
#define VIDEO_MENU_END WM_USER + 1985
#define VIDEO_MENU_FULLSCREEN WM_USER + 1979
#define VIDEO_MENU_MULTISCREEN WM_USER + 1980
#define VIDEO_MENU_AUTOADJUST WM_USER + 1981
#define VIDEO_MENU_RECORDVIDEO WM_USER + 1982
#define VIDEO_MENU_PRINTSCREEN WM_USER + 1983
#define VIDEO_MENU_EXITDECODE WM_USER + 1984
#define VIDEO_MENU_EXITCYCLE WM_USER + 1985
#define VIDEO_REPAINT WM_USER + 1999
// KeyColor
//#define VIDEO_BACK_COLOR RGB(111,104,160)
#define VIDEO_BACK_COLOR RGB(34,34,34)
// #define NAME_MENU_FULLSCREEN "ȫ<><C8AB><EFBFBD><EFBFBD>ʾ"
// #define NAME_MENU_MULTISCREEN "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ"
// #define NAME_MENU_AUTOADJUST "<22>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>"
// #define NAME_MENU_EXITDECODE "<22>رս<D8B1><D5BD><EFBFBD>"
// #define NAME_MENU_EXITCYCLE "<22>ر<EFBFBD><D8B1><EFBFBD>Ѳ"
/////////////////////////////////////////////////////////////////////////////
// CPlayWnd dialog
2024-09-29 13:58:12 +08:00
class CPtzScreen;
2024-09-25 09:43:03 +08:00
class CPlayWnd : public CWnd
{
// Construction
public:
CPlayWnd(); // standard constructor
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPlayWnd)
public:
virtual BOOL DestroyWindow();
protected:
virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
afx_msg void OnVideoMenu(UINT nID);
afx_msg LRESULT OnRepaintWnd(WPARAM wParam, LPARAM lParam);
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPlayWnd)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
#if _MSC_VER >= 1300
afx_msg void OnTimer(UINT_PTR nIDEvent);
#else
afx_msg void OnTimer(UINT nIDEvent);
#endif
#if _MSC_VER >= 1300
afx_msg void OnActivateApp(BOOL bActive, DWORD hTask);
#else
afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
#endif
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
2024-09-29 13:58:12 +08:00
void SetWinID(int ID, CString strName, CString strIp, int nPort, CString strUser, CString strPassword, CPtzScreen *pParent)
2024-09-25 09:43:03 +08:00
{
m_strCameraName = strName;
m_strCameraIp = strIp;
m_nCameraPort = nPort;
m_strUserName = strUser;
m_strPassWord = strPassword;
m_nWndID = ID;
2024-09-29 13:58:12 +08:00
m_pParentWnd = pParent;
2024-09-25 09:43:03 +08:00
}
int GetWinID(void){return m_nWndID;}
void SetWndPlaying(bool bPlay){ bIsPlaying = bPlay; }
private:
2024-09-29 13:58:12 +08:00
2024-09-25 09:43:03 +08:00
CPoint pointStart;
CPoint pointEnd;
CPoint pointMove;
BOOL m_FlagRect;
bool bIsPlaying;
2024-09-29 13:58:12 +08:00
public:
2024-09-25 09:43:03 +08:00
CString m_strCameraName;
CString m_strCameraIp;
CString m_strUserName;
CString m_strPassWord;
int m_nCameraPort;
2024-09-29 13:58:12 +08:00
LONG m_nWndID;
2024-09-25 09:43:03 +08:00
LLONG m_llLoginId;
LLONG m_DispHanle;
2024-09-29 13:58:12 +08:00
LLONG m_lRealHandle;
2024-09-25 09:43:03 +08:00
int m_nIndex;
int m_nState;
2024-09-29 13:58:12 +08:00
LONG m_nPlayPort;
CPtzScreen *m_pParentWnd;
2024-09-25 09:43:03 +08:00
public:
2024-09-29 13:58:12 +08:00
LLONG Login();
2024-09-25 09:43:03 +08:00
static void CALL_METHOD fDisplayCB(LONG nPort, char * pBuf, LONG nSize, LONG nWidth, LONG nHeight, LONG nStamp, LONG nType, void* pReserved);
2024-09-29 13:58:12 +08:00
void DrawMat(cv::Mat& img, int nOffset);
2024-09-25 09:43:03 +08:00
void ShowLoginErrorReason(int nError);
2024-09-29 13:58:12 +08:00
void StopPlayForServerMode();
2024-09-25 09:43:03 +08:00
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PLAYWND_H__158FCA3F_D545_4DB6_9946_0FC9F7D9D5CE__INCLUDED_)