This repository was archived by the owner on Nov 1, 2024. It is now read-only.
forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdafx.h
More file actions
161 lines (124 loc) · 4.93 KB
/
stdafx.h
File metadata and controls
161 lines (124 loc) · 4.93 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
#include <atlcom.h>
#include <shellscalingapi.h>
#pragma comment(lib, "Shcore.lib")
#pragma warning(disable:4819)
#define APP_ID "<enter your agora app id>"
#define APP_TOKEN ""
#include <IAgoraRtcEngine.h>
#include <IAgoraMediaEngine.h>
#include <IAgoraRtcChannel.h>
#include <string>
#include "CConfig.h"
#include "Language.h"
#include <afxcontrolbars.h>
#include <resource.h>
#pragma comment(lib, "agora_rtc_sdk.lib")
using namespace agora;
using namespace agora::rtc;
using namespace agora::media;
#define WM_MSGID(code) (WM_USER+0x200+code)
//Agora Event Handler Message and structure
#define EID_JOINCHANNEL_SUCCESS 0x00000001
#define EID_LEAVE_CHANNEL 0x00000002
#define EID_USER_JOINED 0x00000003
#define EID_USER_OFFLINE 0x00000004
#define EID_INJECT_STATUS 0x00000005
#define EID_RTMP_STREAM_STATE_CHANGED 0x00000006
#define EID_REMOTE_VIDEO_STATE_CHANED 0x00000007
#define RECV_METADATA_MSG 0x00000008
#define mediaPLAYER_STATE_CHANGED 0x00000009
#define mediaPLAYER_POSTION_CHANGED 0x0000000A
#define EID_LOCAL_VIDEO_STATE_CHANGED 0x0000000B
#define EID_LASTMILE_QUAILTY 0x0000000C
#define EID_LASTMILE_PROBE_RESULT 0x0000000D
#define EID_AUDIO_VOLUME_INDICATION 0x0000000E
#define EID_AUDIO_ACTIVE_SPEAKER 0x0000000F
#define EID_RTC_STATS 0x00000010
#define EID_REMOTE_AUDIO_STATS 0x00000011
#define EID_REMOTE_VIDEO_STATS 0x00000012
#define EID_LOCAL_VIDEO_STATS 0x00000013
#define EID_CHANNEL_MEDIA_RELAY_STATE_CHNAGENED 0x00000014
#define EID_CHANNEL_MEDIA_RELAY_EVENT 0x00000015
#define EID_RTMP_STREAM_STATE_PUBLISHED 0x00000016
#define EID_RTMP_STREAM_STATE_UNPUBLISHED 0x00000017
#define EID_AUDIO_MIXING_STATE_CHANGED 0x00000018
#define EID_AUDIO_DEVICE_STATE_CHANGED 0x00000019
#define EID_RTMP_STREAM_EVENT 0x00000020
typedef struct _StreamPublished {
char* url;
int error;
}StreamPublished, *PStreamPublished, *LPStreamPublished;
typedef struct _tagRtmpStreamStateChanged {
char* url;
int state;
int error;
}RtmpStreamStreamStateChanged, *PRtmpStreamStreamStateChanged;
typedef struct _tagRtmpStreamEvent {
char* url;
int eventCode;
}RtmpStreamEvent, *PRtmpStreamEvent;
typedef struct _tagVideoStateStateChanged {
uid_t uid;
REMOTE_VIDEO_STATE state;
REMOTE_VIDEO_STATE_REASON reason;
}VideoStateStateChanged, *PVideoStateStateChanged;
std::string cs2utf8(CString str);
CString utf82cs(std::string utf8);
CString getCurrentTime();
BOOL PASCAL SaveResourceToFile(LPCTSTR lpResourceType, WORD wResourceID, LPCTSTR lpFilePath);
//screenshare
typedef enum eScreenShareType
{
ShareType_BaseInfo,
ShareType_Start,
ShareType_Stop,
ShareType_Close,
}SHARETYPE;
typedef struct _AGE_SCREENSHARE_BASEINFO
{
std::string appid;
std::string channelname;
UINT uMainuID;
UINT uSubuID;
HANDLE processHandle = NULL;
}AGE_SCREENSHARE_BASEINFO, *PAGE_SCREENSHARE_BASEINFO, *LPAGE_SCREENSHARE_BASEINFO;
#define EID_SCREENSHARE_BASEINFO 0x00000021
typedef struct _AGE_SCREENSHARE_START
{
HWND hWnd;
}AGE_SCREENSHARE_START, *PAGE_SCREENSHARE_START, *LPAGE_SCREENSHARE_START;
#define EID_SCREENSHARE_START 0x00000022
#define EID_SCREENSHARE_STOP 0x00000023
#define EID_SCREENSHARE_CLOSE 0x00000024
#define ID_BASEWND_VIDEO 20000
#define MAIN_AREA_TOP 20
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif