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
192 lines (154 loc) · 6.42 KB
/
stdafx.h
File metadata and controls
192 lines (154 loc) · 6.42 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// 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 <string>
#include "CConfig.h"
#include "Language.h"
#include <afxcontrolbars.h>
#include <afxcontrolbars.h>
#include <afxcontrolbars.h>
#include <afxcontrolbars.h>
#include <afxcontrolbars.h>
#include <chrono>
#include <random>
#include <afxcontrolbars.h>
#pragma comment(lib, "agora_rtc_sdk.dll.lib")
#pragma comment(lib, "libagora_segmentation_extension.dll.lib")
//#pragma comment(lib, "libagora_video_process.dll.lib")
#pragma comment(lib, "libagora-ffmpeg.dll.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_CHANGED 0x00000007
#define RECV_METADATA_MSG 0x00000008
#define MEIDAPLAYER_STATE_CHANGED 0x00000009
#define MEIDAPLAYER_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 mediaPLAYER_STATE_CHANGED 0x00000016
#define mediaPLAYER_POSTION_CHANGED 0x00000017
#define EID_REMOTE_AUDIO_MIXING_STATE_CHANED 0x00000018
#define EID_REMOTE_CHANNEL_MDIA_REPLAY 0x00000019
#define EID_CHANNEL_REPLAY_STATE_CHANGED 0x00000020
#define mediaPLAYER_EVENT 0x00000021
#define EID_NETWORK_QUALITY 0x00000022
#define EID_LOCAL_AUDIO_STATS 0x00000024
#define EID_LOCAL_AUDIO_STATE_CHANED 0x00000025
#define EID_REMOTE_AUDIO_STATE_CHANGED 0x00000027
#define EID_AUDIO_EFFECT_FINISHED 0x000000028
#define EID_CONTENT_INSPECT_RESULT 0x000000029
#define EID_CHANNEL_WARN 0x0000000B
#define EID_CHANNEL_ERROR 0x0000000B
#define EID_CHANNEL_REJOIN_CHANENL 0x0000000B
#define EID_CHANNEL_WARN 0x0000000B
#define EID_AUDIO_MIXING_STATE_CHANGED 0x000000029
#define EID_REMOTE_VIDEO_STATE_CHANED 0x000000030
#define MAX_VIDEO_COUNT 16
#define EID_SNAPSHOT_TAKEN 0x00000032
#define EID_VIDEO_RENDERING_TRACING_RESULT 0x00000033
#define EID_RECORDER_STATE_CHANGE 0x00000034
#define EID_RECORDER_INFO_UPDATE 0x00000035
#define EID_EXTENSION_EVENT 0x00000036
#define EID_ON_CAPTURE_VIDEOFRAME 0x00000037
#define EID_ERROR 0x00000038
#define EID_ON_FACE_INFO 0x00000039
#define EID_ON_RECV_AUDIO_METADATA 0x0000003A
typedef struct _tagRtmpStreamStateChanged {
char* url;
int state;
int error;
}RtmpStreamStreamStateChanged, *PRtmpStreamStreamStateChanged;
typedef struct _tagVideoStateStateChanged {
agora::rtc::uid_t uid;
agora::rtc::REMOTE_VIDEO_STATE state;
agora::rtc::REMOTE_VIDEO_STATE_REASON reason;
}VideoStateStateChanged, *PVideoStateStateChanged;
typedef struct _tagAudioMixingState {
int state;
int error;
}AudioMixingState, *PAudioMixingState;
typedef struct _tagNetworkQuality{
uid_t uid;
int txQuality;
int rxQuality;
}NetworkQuality,*PNetworkQuality;
typedef struct _tagRemoteAudioState {
uid_t uid;
REMOTE_AUDIO_STATE state;
REMOTE_AUDIO_STATE_REASON reason;
int elapsed;
}RemoteAudioState, *PRemoteAudioState;
typedef struct _tagRemoteVideoState {
uid_t uid;
REMOTE_VIDEO_STATE state;
REMOTE_VIDEO_STATE_REASON reason;
int elapsed;
}RemoteVideoState, *PRemoteVideoState;
typedef struct _tagExtensionEvent {
char* provider;
char* extension;
char* key;
char* value;
}ExtensionEvent, *PExtensionEvent;
std::string cs2ANSI(CString str);
std::string cs2utf8(CString str);
CString utf82cs(std::string utf8);
CString getCurrentTime();
CString GetExePath();
std::string UrlANSI(const char *str);
BOOL PASCAL SaveResourceToFile(LPCTSTR lpResourceType, WORD wResourceID, LPCTSTR lpFilePath);
unsigned int generateUid();
#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