forked from ZhaoliangGuo/pxScreenLiveStreaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpxScreenLiveStreamingDlg.h
76 lines (58 loc) · 1.69 KB
/
pxScreenLiveStreamingDlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// pxScreenLiveStreamingDlg.h : 头文件
//
#pragma once
extern "C"
{
void _cdecl rgb32_to_yv12_mmx(unsigned char *y_out, unsigned char *u_out, unsigned char *v_out,
unsigned char *src, int width, int height, int stride);
void _cdecl rgb24_to_yv12_mmx(unsigned char *y_out, unsigned char *u_out, unsigned char *v_out,
unsigned char *src, int width, int height, int stride);
}
#define AVC_SEQUENCE_HEADER_LEN (1024)
#define AAC_SEQUENCE_HEADER_LEN (512)
// CpxScreenLiveStreamingDlg 对话框
class CPxScreenLiveStreamingDlg : public CDialogEx
{
// 构造
public:
CPxScreenLiveStreamingDlg(CWnd* pParent = NULL); // 标准构造函数
~CPxScreenLiveStreamingDlg();
// 对话框数据
enum { IDD = IDD_PXSCREENLIVESTREAMING_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
HICON m_hIcon;
// 生成的消息映射函数
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnStartRecord();
afx_msg void OnStopRecord();
bool Init();
// video
public:
int m_nScreenWidth;
int m_nScreenHeight;
CDC *pDC;
CDC memDC;
CBitmap memBitmap; // 建立和屏幕兼容的bitmap
CBitmap m_hCompatibleBitmap;
BITMAPFILEHEADER m_BitmapFileHeader;
BITMAPINFOHEADER m_BitmapInfoHeader;
BYTE * m_pBitmapBuffer;
int m_nBitmapBufferLen;
LARGE_INTEGER m_liPerfFreq;
LARGE_INTEGER m_liBeginTime;
LARGE_INTEGER m_liEndTime;
// YUV
public:
BYTE * m_pYUVBuffer; //YUV数据
int m_nUOffset;
int m_nVOffset;
int m_nYUVBufferSize;
};