/[rtss_sdk]/trunk/Include/RTSSSharedMemory.h
ViewVC logotype

Contents of /trunk/Include/RTSSSharedMemory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Aug 8 11:41:35 2014 UTC (5 years ago) by william
File MIME type: text/plain
File size: 16519 byte(s)
initial commit of RTSS SDK (from 6.1.0.7305)
Available from: http://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 // This header file defines statistics server's shared memory format
4 //
5 /////////////////////////////////////////////////////////////////////////////
6 #ifndef _RTSS_SHARED_MEMORY_INCLUDED_
7 #define _RTSS_SHARED_MEMORY_INCLUDED_
8 /////////////////////////////////////////////////////////////////////////////
9 // v1.0 memory structure
10 typedef struct RTSS_SHARED_MEMORY_V_1_0
11 {
12 DWORD dwSignature;
13 //signature allows applications to verify status of shared memory
14
15 //The signature can be set to:
16 //'RTSS' - statistics server's memory is initialized and contains
17 // valid data
18 //0xDEAD - statistics server's memory is marked for deallocation and
19 // no longer contain valid data
20 //otherwise the memory is not initialized
21 DWORD dwVersion;
22 //structure version ((major<<16) + minor)
23 //must be set to 0x00010000 for v1.0 structure
24 DWORD dwTime0;
25 //start time of framerate measurement period (in milliseconds)
26
27 //Take a note that this field must contain non-zero value to calculate
28 //framerate properly!
29 DWORD dwTime1;
30 //end time of framerate measurement period (in milliseconds)
31 DWORD dwFrames;
32 //amount of frames rendered during (dwTime1 - dwTime0) period
33
34 //to calculate framerate use the following formula:
35 //1000.0f * dwFrames / (dwTime1 - dwTime0)
36
37 } RTSS_SHARED_MEMORY_V_1_0, *LPRTSS_SHARED_MEMORY_V_1_0;
38 /////////////////////////////////////////////////////////////////////////////
39 #define OSDFLAG_UPDATED 0x00000001
40 //use this flag to force the server to update OSD
41 /////////////////////////////////////////////////////////////////////////////
42 // v1.1 memory structure
43 typedef struct RTSS_SHARED_MEMORY_V_1_1
44 {
45 DWORD dwSignature;
46 //signature allows applications to verify status of shared memory
47
48 //The signature can be set to:
49 //'RTSS' - statistics server's memory is initialized and contains
50 // valid data
51 //0xDEAD - statistics server's memory is marked for deallocation and
52 // no longer contain valid data
53 //otherwise the memory is not initialized
54 DWORD dwVersion;
55 //structure version ((major<<16) + minor)
56 //must be set to 0x00010001 for v1.1 structure
57 DWORD dwTime0;
58 //start time of framerate measurement period (in milliseconds)
59
60 //Take a note that this field must contain non-zero value to calculate
61 //framerate properly!
62 DWORD dwTime1;
63 //end time of framerate measurement period (in milliseconds)
64 DWORD dwFrames;
65 //amount of frames rendered during (dwTime1 - dwTime0) period
66
67 //to calculate framerate use the following formula:
68 //1000.0f * dwFrames / (dwTime1 - dwTime0)
69
70 DWORD dwOSDFlags;
71 //bitmask, containing combination of OSDFLAG_... flags
72
73 //Note: set OSDFLAG_UPDATED flag as soon as you change any OSD related
74 //field
75 DWORD dwOSDX;
76 //OSD X-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
77 //pixel offset from the right side of the screen)
78 DWORD dwOSDY;
79 //OSD Y-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
80 //pixel offset from the bottom side of the screen)
81 DWORD dwOSDPixel;
82 //OSD pixel zooming ratio
83 DWORD dwOSDColor;
84 //OSD color in RGB format
85 char szOSD[256];
86 //OSD text
87 char szOSDOwner[32];
88 //OSD owner ID
89
90 //Use this field to capture OSD and prevent other applications from
91 //using OSD when it is already in use by your application.
92 //You should change this field only if it is empty (i.e. when OSD is
93 //not owned by any application) or if it is set to your own application's
94 //ID (i.e. when you own OSD)
95 //You shouldn't change any OSD related feilds until you own OSD
96
97 } RTSS_SHARED_MEMORY_V_1_1, *LPRTSS_SHARED_MEMORY_V_1_1;
98 /////////////////////////////////////////////////////////////////////////////
99 // v1.2 memory structure
100 typedef struct RTSS_SHARED_MEMORY_V_1_2
101 {
102 DWORD dwSignature;
103 //signature allows applications to verify status of shared memory
104
105 //The signature can be set to:
106 //'RTSS' - statistics server's memory is initialized and contains
107 // valid data
108 //0xDEAD - statistics server's memory is marked for deallocation and
109 // no longer contain valid data
110 //otherwise the memory is not initialized
111 DWORD dwVersion;
112 //structure version ((major<<16) + minor)
113 //must be set to 0x00010002 for v1.2 structure
114 DWORD dwTime0;
115 //start time of framerate measurement period (in milliseconds)
116
117 //Take a note that this field must contain non-zero value to calculate
118 //framerate properly!
119 DWORD dwTime1;
120 //end time of framerate measurement period (in milliseconds)
121 DWORD dwFrames;
122 //amount of frames rendered during (dwTime1 - dwTime0) period
123
124 //to calculate framerate use the following formula:
125 //1000.0f * dwFrames / (dwTime1 - dwTime0)
126
127 DWORD dwOSDFlags;
128 //bitmask, containing combination of OSDFLAG_... flags
129
130 //Note: set OSDFLAG_UPDATED flag as soon as you change any OSD related
131 //field
132 DWORD dwOSDX;
133 //OSD X-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
134 //pixel offset from the right side of the screen)
135 DWORD dwOSDY;
136 //OSD Y-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
137 //pixel offset from the bottom side of the screen)
138 DWORD dwOSDPixel;
139 //OSD pixel zooming ratio
140 DWORD dwOSDColor;
141 //OSD color in RGB format
142 char szOSD[256];
143 //primary OSD slot text
144 char szOSDOwner[32];
145 //primary OSD slot owner ID
146
147 //Use this field to capture OSD slot and prevent other applications from
148 //using OSD when it is already in use by your application.
149 //You should change this field only if it is empty (i.e. when OSD slot is
150 //not owned by any application) or if it is set to your own application's
151 //ID (i.e. when you own OSD slot)
152 //You shouldn't change any OSD related feilds until you own OSD slot
153
154 char szOSD1[256];
155 //OSD slot 1 text
156 char szOSD1Owner[32];
157 //OSD slot 1 owner ID
158 char szOSD2[256];
159 //OSD slot 2 text
160 char szOSD2Owner[32];
161 //OSD slot 2 owner ID
162 char szOSD3[256];
163 //OSD slot 3 text
164 char szOSD3Owner[32];
165 //OSD slot 3 owner ID
166 } RTSS_SHARED_MEMORY_V_1_2, *LPRTSS_SHARED_MEMORY_V_1_2;
167 /////////////////////////////////////////////////////////////////////////////
168 #define STATFLAG_RECORD 0x00000001
169 /////////////////////////////////////////////////////////////////////////////
170 // v1.3 memory structure
171 typedef struct RTSS_SHARED_MEMORY_V_1_3
172 {
173 DWORD dwSignature;
174 //signature allows applications to verify status of shared memory
175
176 //The signature can be set to:
177 //'RTSS' - statistics server's memory is initialized and contains
178 // valid data
179 //0xDEAD - statistics server's memory is marked for deallocation and
180 // no longer contain valid data
181 //otherwise the memory is not initialized
182 DWORD dwVersion;
183 //structure version ((major<<16) + minor)
184 //must be set to 0x00010003 for v1.3 structure
185 DWORD dwTime0;
186 //start time of framerate measurement period (in milliseconds)
187
188 //Take a note that this field must contain non-zero value to calculate
189 //framerate properly!
190 DWORD dwTime1;
191 //end time of framerate measurement period (in milliseconds)
192 DWORD dwFrames;
193 //amount of frames rendered during (dwTime1 - dwTime0) period
194
195 //to calculate framerate use the following formula:
196 //1000.0f * dwFrames / (dwTime1 - dwTime0)
197
198 DWORD dwOSDFlags;
199 //bitmask, containing combination of OSDFLAG_... flags
200
201 //Note: set OSDFLAG_UPDATED flag as soon as you change any OSD related
202 //field
203 DWORD dwOSDX;
204 //OSD X-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
205 //pixel offset from the right side of the screen)
206 DWORD dwOSDY;
207 //OSD Y-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
208 //pixel offset from the bottom side of the screen)
209 DWORD dwOSDPixel;
210 //OSD pixel zooming ratio
211 DWORD dwOSDColor;
212 //OSD color in RGB format
213 char szOSD[256];
214 //primary OSD slot text
215 char szOSDOwner[32];
216 //primary OSD slot owner ID
217
218 //Use this field to capture OSD slot and prevent other applications from
219 //using OSD when it is already in use by your application.
220 //You should change this field only if it is empty (i.e. when OSD slot is
221 //not owned by any application) or if it is set to your own application's
222 //ID (i.e. when you own OSD slot)
223 //You shouldn't change any OSD related feilds until you own OSD slot
224
225 char szOSD1[256];
226 //OSD slot 1 text
227 char szOSD1Owner[32];
228 //OSD slot 1 owner ID
229 char szOSD2[256];
230 //OSD slot 2 text
231 char szOSD2Owner[32];
232 //OSD slot 2 owner ID
233 char szOSD3[256];
234 //OSD slot 3 text
235 char szOSD3Owner[32];
236 //OSD slot 3 owner ID
237
238 DWORD dwStatFlags;
239 //bitmask containing combination of STATFLAG_... flags
240 DWORD dwStatTime0;
241 //statistics record period start time
242 DWORD dwStatTime1;
243 //statistics record period end time
244 DWORD dwStatFrames;
245 //total amount of frames rendered during statistics record period
246 DWORD dwStatCount;
247 //amount of min/avg/max measurements during statistics record period
248 DWORD dwStatFramerateMin;
249 //minimum instantaneous framerate measured during statistics record period
250 DWORD dwStatFramerateAvg;
251 //average instantaneous framerate measured during statistics record period
252 DWORD dwStatFramerateMax;
253 //maximum instantaneous framerate measured during statistics record period
254 } RTSS_SHARED_MEMORY_V_1_3, *LPRTSS_SHARED_MEMORY_V_1_3;
255 /////////////////////////////////////////////////////////////////////////////
256 #define APPFLAG_DD 0x00000010
257 #define APPFLAG_D3D8 0x00000100
258 #define APPFLAG_D3D9 0x00001000
259 #define APPFLAG_D3D9EX 0x00002000
260 #define APPFLAG_OGL 0x00010000
261 #define APPFLAG_D3D10 0x00100000
262 #define APPFLAG_D3D11 0x01000000
263
264 #define APPFLAG_API_USAGE_MASK (APPFLAG_DD | APPFLAG_D3D8 | APPFLAG_D3D9 | APPFLAG_D3D9EX | APPFLAG_OGL | APPFLAG_D3D10 | APPFLAG_D3D11)
265
266 #define APPFLAG_PROFILE_UPDATE_REQUESTED 0x10000000
267 /////////////////////////////////////////////////////////////////////////////
268 #define SCREENCAPTUREFLAG_REQUEST_CAPTURE 0x00000001
269 #define SCREENCAPTUREFLAG_REQUEST_CAPTURE_OSD 0x00000010
270 /////////////////////////////////////////////////////////////////////////////
271 #define VIDEOCAPTUREFLAG_REQUEST_CAPTURE_START 0x00000001
272 #define VIDEOCAPTUREFLAG_REQUEST_CAPTURE_PROGRESS 0x00000002
273 #define VIDEOCAPTUREFLAG_REQUEST_CAPTURE_STOP 0x00000004
274 #define VIDEOCAPTUREFLAG_REQUEST_CAPTURE_MASK 0x00000007
275 #define VIDEOCAPTUREFLAG_REQUEST_CAPTURE_OSD 0x00000010
276
277 #define VIDEOCAPTUREFLAG_INTERNAL_RESIZE 0x00010000
278 /////////////////////////////////////////////////////////////////////////////
279
280 // v2.0 memory structure
281 typedef struct RTSS_SHARED_MEMORY
282 {
283 DWORD dwSignature;
284 //signature allows applications to verify status of shared memory
285
286 //The signature can be set to:
287 //'RTSS' - statistics server's memory is initialized and contains
288 // valid data
289 //0xDEAD - statistics server's memory is marked for deallocation and
290 // no longer contain valid data
291 //otherwise the memory is not initialized
292 DWORD dwVersion;
293 //structure version ((major<<16) + minor)
294 //must be set to 0x0002xxxx for v2.x structure
295
296 DWORD dwAppEntrySize;
297 //size of RTSS_SHARED_MEMORY_OSD_ENTRY for compatibility with future versions
298 DWORD dwAppArrOffset;
299 //offset of arrOSD array for compatibility with future versions
300 DWORD dwAppArrSize;
301 //size of arrOSD array for compatibility with future versions
302
303 DWORD dwOSDEntrySize;
304 //size of RTSS_SHARED_MEMORY_APP_ENTRY for compatibility with future versions
305 DWORD dwOSDArrOffset;
306 //offset of arrApp array for compatibility with future versions
307 DWORD dwOSDArrSize;
308 //size of arrOSD array for compatibility with future versions
309
310 DWORD dwOSDFrame;
311 //Global OSD frame ID. Increment it to force the server to update OSD for all currently active 3D
312 //applications.
313
314 //OSD slot descriptor structure
315
316 typedef struct RTSS_SHARED_MEMORY_OSD_ENTRY
317 {
318 char szOSD[256];
319 //OSD slot text
320 char szOSDOwner[256];
321 //OSD slot owner ID
322
323 //next fields are valid for v2.7 and newer shared memory format only
324
325 char szOSDEx[4096];
326 //extended OSD slot text
327
328 } RTSS_SHARED_MEMORY_OSD_ENTRY, *LPRTSS_SHARED_MEMORY_OSD_ENTRY;
329
330 //application descriptor structure
331
332 typedef struct RTSS_SHARED_MEMORY_APP_ENTRY
333 {
334 //application identification related fields
335
336 DWORD dwProcessID;
337 //process ID
338 char szName[MAX_PATH];
339 //process executable name
340 DWORD dwFlags;
341 //application specific flags
342
343 //instantaneous framerate related fields
344
345 DWORD dwTime0;
346 //start time of framerate measurement period (in milliseconds)
347
348 //Take a note that this field must contain non-zero value to calculate
349 //framerate properly!
350 DWORD dwTime1;
351 //end time of framerate measurement period (in milliseconds)
352 DWORD dwFrames;
353 //amount of frames rendered during (dwTime1 - dwTime0) period
354 DWORD dwFrameTime;
355 //frame time (in microseconds)
356
357
358 //to calculate framerate use the following formulas:
359
360 //1000.0f * dwFrames / (dwTime1 - dwTime0) for framerate calculated once per second
361 //or
362 //1000000.0f / dwFrameTime for framerate calculated once per frame
363
364 //framerate statistics related fields
365
366 DWORD dwStatFlags;
367 //bitmask containing combination of STATFLAG_... flags
368 DWORD dwStatTime0;
369 //statistics record period start time
370 DWORD dwStatTime1;
371 //statistics record period end time
372 DWORD dwStatFrames;
373 //total amount of frames rendered during statistics record period
374 DWORD dwStatCount;
375 //amount of min/avg/max measurements during statistics record period
376 DWORD dwStatFramerateMin;
377 //minimum instantaneous framerate measured during statistics record period
378 DWORD dwStatFramerateAvg;
379 //average instantaneous framerate measured during statistics record period
380 DWORD dwStatFramerateMax;
381 //maximum instantaneous framerate measured during statistics record period
382
383 //OSD related fields
384
385 DWORD dwOSDX;
386 //OSD X-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
387 //pixel offset from the right side of the screen)
388 DWORD dwOSDY;
389 //OSD Y-coordinate (coordinate wrapping is allowed, i.e. -5 defines 5
390 //pixel offset from the bottom side of the screen)
391 DWORD dwOSDPixel;
392 //OSD pixel zooming ratio
393 DWORD dwOSDColor;
394 //OSD color in RGB format
395 DWORD dwOSDFrame;
396 //application specific OSD frame ID. Don't change it directly!
397
398 DWORD dwScreenCaptureFlags;
399 char szScreenCapturePath[MAX_PATH];
400
401 //next fields are valid for v2.1 and newer shared memory format only
402
403 DWORD dwOSDBgndColor;
404 //OSD background color in RGB format
405
406 //next fields are valid for v2.2 and newer shared memory format only
407
408 DWORD dwVideoCaptureFlags;
409 char szVideoCapturePath[MAX_PATH];
410 DWORD dwVideoFramerate;
411 DWORD dwVideoFramesize;
412 DWORD dwVideoFormat;
413 DWORD dwVideoQuality;
414 DWORD dwVideoCaptureThreads;
415
416 DWORD dwScreenCaptureQuality;
417 DWORD dwScreenCaptureThreads;
418
419 //next fields are valid for v2.3 and newer shared memory format only
420
421 DWORD dwAudioCaptureFlags;
422
423 //next fields are valid for v2.4 and newer shared memory format only
424
425 DWORD dwVideoCaptureFlagsEx;
426
427 //next fields are valid for v2.5 and newer shared memory format only
428
429 DWORD dwAudioCaptureFlags2;
430
431 DWORD dwStatFrameTimeMin;
432 DWORD dwStatFrameTimeAvg;
433 DWORD dwStatFrameTimeMax;
434 DWORD dwStatFrameTimeCount;
435
436 DWORD dwStatFrameTimeBuf[1024];
437 DWORD dwStatFrameTimeBufPos;
438 DWORD dwStatFrameTimeBufFramerate;
439
440 //next fields are valid for v2.6 and newer shared memory format only
441
442 LARGE_INTEGER qwAudioCapturePTTEventPush;
443 LARGE_INTEGER qwAudioCapturePTTEventRelease;
444
445 LARGE_INTEGER qwAudioCapturePTTEventPush2;
446 LARGE_INTEGER qwAudioCapturePTTEventRelease2;
447
448 } RTSS_SHARED_MEMORY_APP_ENTRY, *LPRTSS_SHARED_MEMORY_APP_ENTRY;
449
450 RTSS_SHARED_MEMORY_OSD_ENTRY arrOSD[8];
451 //array of OSD slots
452 RTSS_SHARED_MEMORY_APP_ENTRY arrApp[256];
453 //array of application descriptors
454
455 } RTSS_SHARED_MEMORY, *LPRTSS_SHARED_MEMORY;
456 /////////////////////////////////////////////////////////////////////////////
457 #endif //_RTSS_SHARED_MEMORY_INCLUDED_

  ViewVC Help
Powered by ViewVC 1.1.22