📄 ~video_channel.~h
字号:
#if !defined(AFX_VIDEO_CHANNEL_H__B15D7ED4_93C6_46DB_A5DD_E167250445AC__INCLUDED_)
#define AFX_VIDEO_CHANNEL_H__B15D7ED4_93C6_46DB_A5DD_E167250445AC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// video_channel.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// video_channel window
#include "../net/channel_info.h"
#include "selstatic.h"
#include "notif_cmd.h"
#include "notif_av.h"
class CRightLogin;
class video_channel : public CSelStatic, public video_mask
{
typedef CSelStatic baseclass;
// DDHANDLE dd;
// 从notif_cmd来的消息
//virtual void on_logout_success(IPPORT_TYPE);
//virtual void on_channel_opened(IPPORT_TYPE, ULONG mip, USHORT mport, ULONG channel);
//virtual void on_channel_closed(IPPORT_TYPE, ULONG channel);
//virtual void on_video_frame(int channel, void* vid_buf, ULONG size, int w, int h);
// 事件内部处理
void video_opened(ULONG ip, USHORT port, int chnl);
void video_closed(ULONG ip, USHORT port, int chnl);
ip_port v_ip; // 已经打开的视频IP
int v_chnl; // 已经打开的视频通道号
virtual void on_sel();
virtual void on_unsel();
/*
* 覆盖区域
*/
int w;
int h;
bool drawing_grid;
bitmap_mask mask;
virtual byte* mask_data();
virtual void set_grid(int w, int h);
virtual void clear_grid();
virtual void update();
void check_grid(byte* yuvbuf);
void calc_mask(CPoint pt, int& x, int& y);
void fill_black(byte* yuvbuf, int x, int y);
// Construction
public:
video_channel();
virtual bool create(int index, CWnd* parent, const CRect& rc = CRect(0,0,0,0),
DWORD style = SS_WHITERECT | WS_CHILD | WS_VISIBLE | SS_NOTIFY);
// Attributes
public:
void report_channel();
static void set_rlogin(CRightLogin* rl);
static video_channel* current_sel();
static video_channel* number(int idx);
static int count();
ip_port channel_ip();
int channel_index();
virtual bool is_video_opened();
bool is_vod();
// Operations
public:
// DirectDraw更新窗口区域
void dd_update();
void draw(void* buf);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(video_channel)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~video_channel();
// Generated message map functions
protected:
LRESULT on_logout(WPARAM, LPARAM);
LRESULT on_channel_opened(WPARAM, LPARAM);
LRESULT on_channel_closed(WPARAM, LPARAM);
LRESULT on_video_frame(WPARAM, LPARAM);
LRESULT on_vod_set_speed(WPARAM, LPARAM);
LRESULT on_snapshot(WPARAM, LPARAM);
//{{AFX_MSG(video_channel)
afx_msg void OnDestroy();
afx_msg void OnMove(int x, int y);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnPaint();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
void OnRButtonDown();
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VIDEO_CHANNEL_H__B15D7ED4_93C6_46DB_A5DD_E167250445AC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -