Sunshine master
Self-hosted game stream host for Moonlight.
display.h
Go to the documentation of this file.
1
5#pragma once
6
7// platform includes
8#include <d3d11.h>
9#include <d3d11_4.h>
10#include <d3dcommon.h>
11#include <dwmapi.h>
12#include <dxgi.h>
13#include <dxgi1_6.h>
14#include <Unknwn.h>
15#include <winrt/windows.graphics.capture.h>
16
17// local includes
18#include "src/platform/common.h"
19#include "src/utility.h"
20#include "src/video.h"
21
22namespace platf::dxgi {
23 extern const char *format_str[];
24
25 // Add D3D11_CREATE_DEVICE_DEBUG here to enable the D3D11 debug runtime.
26 // You should have a debugger like WinDbg attached to receive debug messages.
27 auto constexpr D3D11_CREATE_DEVICE_FLAGS = 0;
28
34 template<class T>
35 void Release(T *dxgi) {
36 dxgi->Release();
37 }
38
159
160 namespace video {
185 } // namespace video
186
187 class hwdevice_t;
188
192 struct cursor_t {
193 std::vector<std::uint8_t> img_data;
194
195 DXGI_OUTDUPL_POINTER_SHAPE_INFO shape_info;
196 int x;
197 int y;
198 bool visible;
199 };
200
205 public:
206 gpu_cursor_t():
207 cursor_view {0, 0, 0, 0, 0.0f, 1.0f} {};
208
219 void set_pos(LONG topleft_x, LONG topleft_y, LONG display_width, LONG display_height, DXGI_MODE_ROTATION display_rotation, bool visible) {
220 this->topleft_x = topleft_x;
221 this->topleft_y = topleft_y;
222 this->display_width = display_width;
223 this->display_height = display_height;
224 this->display_rotation = display_rotation;
225 this->visible = visible;
227 }
228
237 this->texture = std::move(texture);
238 this->texture_width = texture_width;
239 this->texture_height = texture_height;
241 }
242
247 switch (display_rotation) {
248 case DXGI_MODE_ROTATION_UNSPECIFIED:
249 case DXGI_MODE_ROTATION_IDENTITY:
250 cursor_view.TopLeftX = topleft_x;
251 cursor_view.TopLeftY = topleft_y;
254 break;
255
256 case DXGI_MODE_ROTATION_ROTATE90:
257 cursor_view.TopLeftX = topleft_y;
260 cursor_view.Height = texture_width;
261 break;
262
263 case DXGI_MODE_ROTATION_ROTATE180:
268 break;
269
270 case DXGI_MODE_ROTATION_ROTATE270:
272 cursor_view.TopLeftY = topleft_x;
274 cursor_view.Height = texture_width;
275 break;
276 }
277 }
278
282
285
288 DXGI_MODE_ROTATION display_rotation;
289
291
292 D3D11_VIEWPORT cursor_view;
293
294 bool visible;
295 };
296
300 class display_base_t: public display_t {
301 public:
309 int init(const ::video::config_t &config, const std::string &display_name);
310
311 capture_e capture(const push_captured_image_cb_t &push_captured_image_cb, const pull_free_image_cb_t &pull_free_image_cb, bool *cursor) override;
312
318 DXGI_RATIONAL display_refresh_rate;
320
321 DXGI_MODE_ROTATION display_rotation = DXGI_MODE_ROTATION_UNSPECIFIED;
324
327
328 DXGI_FORMAT capture_format;
329 D3D_FEATURE_LEVEL feature_level;
330
331 std::unique_ptr<high_precision_timer> timer = create_high_precision_timer();
332
344
348 typedef UINT D3DKMT_HANDLE;
349
357
361 typedef struct _D3DKMT_WDDM_2_7_CAPS {
362 union {
363 struct
364 {
365 UINT HwSchSupported : 1;
366 UINT HwSchEnabled : 1;
367 UINT HwSchEnabledByDefault : 1;
368 UINT IndependentVidPnVSyncControl : 1;
369 UINT Reserved : 28;
370 };
371
372 UINT Value;
373 };
375
385
386 const UINT KMTQAITYPE_WDDM_2_7_CAPS = 70;
387
394
411
417 virtual bool is_hdr() override;
424 virtual bool get_hdr_metadata(SS_HDR_METADATA &metadata) override;
425
432 const char *dxgi_format_to_string(DXGI_FORMAT format);
439 const char *colorspace_to_string(DXGI_COLOR_SPACE_TYPE type);
445 virtual std::vector<DXGI_FORMAT> get_supported_capture_formats() = 0;
446
447 protected:
454 return (capture_format == DXGI_FORMAT_R16G16B16A16_FLOAT) ? 8 : 4;
455 }
456
466 virtual capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, bool cursor_visible) = 0;
480 virtual int complete_img(img_t *img, bool dummy) = 0;
481 };
482
487 public:
493 std::shared_ptr<img_t> alloc_img() override;
500 int dummy_img(img_t *img) override;
508 int complete_img(img_t *img, bool dummy) override;
514 std::vector<DXGI_FORMAT> get_supported_capture_formats() override;
515
522 std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_device(pix_fmt_e pix_fmt) override;
523
524 D3D11_MAPPED_SUBRESOURCE img_info;
526 };
527
531 class display_vram_t: public display_base_t, public std::enable_shared_from_this<display_vram_t> {
532 public:
538 std::shared_ptr<img_t> alloc_img() override;
545 int dummy_img(img_t *img_base) override;
553 int complete_img(img_t *img_base, bool dummy) override;
559 std::vector<DXGI_FORMAT> get_supported_capture_formats() override;
560
561 bool is_codec_supported(std::string_view name, const ::video::config_t &config) override;
562
569 std::unique_ptr<avcodec_encode_device_t> make_avcodec_encode_device(pix_fmt_e pix_fmt) override;
570
577 std::unique_ptr<nvenc_encode_device_t> make_nvenc_encode_device(pix_fmt_e pix_fmt) override;
578
579 std::atomic<uint32_t> next_image_id;
580 };
581
586 public:
588 bool has_frame {};
589 std::chrono::steady_clock::time_point last_protected_content_warning_time {};
590
598 int init(display_base_t *display, const ::video::config_t &config);
607 capture_e next_frame(DXGI_OUTDUPL_FRAME_INFO &frame_info, std::chrono::milliseconds timeout, resource_t::pointer *res_p);
621
623 };
624
629 public:
637 int init(const ::video::config_t &config, const std::string &display_name);
647 capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override;
653 capture_e release_snapshot() override;
654
657 };
658
663 public:
671 int init(const ::video::config_t &config, const std::string &display_name);
681 capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override;
687 capture_e release_snapshot() override;
688
691
695
698
701
703 std::chrono::steady_clock::time_point old_surface_timestamp;
704 std::variant<std::monostate, texture2d_t, std::shared_ptr<platf::img_t>> last_frame_variant;
705 };
706
711 winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice uwp_device {nullptr};
712 winrt::Windows::Graphics::Capture::GraphicsCaptureItem item {nullptr};
713 winrt::Windows::Graphics::Capture::Direct3D11CaptureFramePool frame_pool {nullptr};
714 winrt::Windows::Graphics::Capture::GraphicsCaptureSession capture_session {nullptr};
715 winrt::Windows::Graphics::Capture::Direct3D11CaptureFrame produced_frame {nullptr};
716 winrt::Windows::Graphics::Capture::Direct3D11CaptureFrame consumed_frame {nullptr};
717 SRWLOCK frame_lock = SRWLOCK_INIT;
718 CONDITION_VARIABLE frame_present_cv;
719
720 void on_frame_arrived(winrt::Windows::Graphics::Capture::Direct3D11CaptureFramePool const &sender, winrt::Windows::Foundation::IInspectable const &);
721
722 public:
725
733 int init(display_base_t *display, const ::video::config_t &config);
742 capture_e next_frame(std::chrono::milliseconds timeout, ID3D11Texture2D **out, uint64_t &out_time);
755 int set_cursor_visible(bool cursor_visible);
756 };
757
762 wgc_capture_t dup;
763
764 public:
772 int init(const ::video::config_t &config, const std::string &display_name);
782 capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override;
788 capture_e release_snapshot() override;
789 };
790
795 wgc_capture_t dup;
796
797 public:
805 int init(const ::video::config_t &config, const std::string &display_name);
815 capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr<platf::img_t> &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override;
821 capture_e release_snapshot() override;
822 };
823} // namespace platf::dxgi
Abstract display capture backend used by the streaming pipeline.
Definition common.h:658
std::function< bool(std::shared_ptr< img_t > &&img, bool frame_captured)> push_captured_image_cb_t
Callback for when a new image is ready. When display has a new image ready or a timeout occurs,...
Definition common.h:667
std::function< bool(std::shared_ptr< img_t > &img_out)> pull_free_image_cb_t
Get free image from pool. Calls must be synchronized. Blocks until there is free image in the pool or...
Definition common.h:676
Shared D3D11/DXGI state used by Windows display capture backends.
Definition display.h:300
DXGI_MODE_ROTATION display_rotation
Display rotation.
Definition display.h:321
device_t device
D3D11 device used for desktop duplication capture.
Definition display.h:316
NTSTATUS(WINAPI *) PD3DKMTCloseAdapter(D3DKMT_CLOSEADAPTER *)
Function pointer for closing a D3DKMT adapter handle.
Definition display.h:410
output_t output
DXGI output duplicated for capture.
Definition display.h:315
const char * colorspace_to_string(DXGI_COLOR_SPACE_TYPE type)
Convert a DXGI colorspace enum to a diagnostic string.
Definition display_base.cpp:973
const UINT KMTQAITYPE_WDDM_2_7_CAPS
Protocol or platform constant for kmtqaitype wddm 2 7 caps.
Definition display.h:386
D3D_FEATURE_LEVEL feature_level
Feature level.
Definition display.h:329
enum platf::dxgi::display_base_t::_D3DKMT_SCHEDULINGPRIORITYCLASS D3DKMT_SCHEDULINGPRIORITYCLASS
Enumerates supported d3 DKMT SCHEDULINGPRIORITYCLASS options.
int client_frame_rate
Client frame rate.
Definition display.h:325
int display_refresh_rate_rounded
Display refresh rate rounded.
Definition display.h:319
virtual bool is_hdr() override
Report whether the active display mode is HDR.
Definition display_base.cpp:760
NTSTATUS(WINAPI *) PD3DKMTSetProcessSchedulingPriorityClass(HANDLE, D3DKMT_SCHEDULINGPRIORITYCLASS)
Function pointer for setting D3DKMT process scheduling priority.
Definition display.h:398
virtual std::vector< DXGI_FORMAT > get_supported_capture_formats()=0
Get supported capture formats.
std::unique_ptr< high_precision_timer > timer
Timer.
Definition display.h:331
const char * dxgi_format_to_string(DXGI_FORMAT format)
Convert a DXGI format enum to a diagnostic string.
Definition display_base.cpp:969
struct platf::dxgi::display_base_t::_D3DKMT_OPENADAPTERFROMLUID D3DKMT_OPENADAPTERFROMLUID
Win32 D3DKMT adapter-open request structure.
virtual int complete_img(img_t *img, bool dummy)=0
Finish cursor composition into a RAM-backed image.
virtual bool get_hdr_metadata(SS_HDR_METADATA &metadata) override
Read HDR metadata for the active display mode.
Definition display_base.cpp:775
capture_e capture(const push_captured_image_cb_t &push_captured_image_cb, const pull_free_image_cb_t &pull_free_image_cb, bool *cursor) override
Capture a frame.
Definition display_base.cpp:212
int init(const ::video::config_t &config, const std::string &display_name)
Initialize D3D11 desktop duplication for the selected output.
Definition display_base.cpp:450
struct platf::dxgi::display_base_t::_D3DKMT_QUERYADAPTERINFO D3DKMT_QUERYADAPTERINFO
Win32 D3DKMT adapter information query.
int width_before_rotation
Width before rotation.
Definition display.h:322
NTSTATUS(WINAPI *) PD3DKMTQueryAdapterInfo(D3DKMT_QUERYADAPTERINFO *)
Function pointer for querying D3DKMT adapter information.
Definition display.h:406
DXGI_FORMAT capture_format
Capture format.
Definition display.h:328
_D3DKMT_SCHEDULINGPRIORITYCLASS
Enumerates supported d3 DKMT SCHEDULINGPRIORITYCLASS options.
Definition display.h:336
@ D3DKMT_SCHEDULINGPRIORITYCLASS_NORMAL
Normal priority class.
Definition display.h:339
@ D3DKMT_SCHEDULINGPRIORITYCLASS_BELOW_NORMAL
Below normal priority class.
Definition display.h:338
@ D3DKMT_SCHEDULINGPRIORITYCLASS_HIGH
High priority class.
Definition display.h:341
@ D3DKMT_SCHEDULINGPRIORITYCLASS_IDLE
Idle priority class.
Definition display.h:337
@ D3DKMT_SCHEDULINGPRIORITYCLASS_REALTIME
Realtime priority class.
Definition display.h:342
@ D3DKMT_SCHEDULINGPRIORITYCLASS_ABOVE_NORMAL
Above normal priority class.
Definition display.h:340
adapter_t adapter
DXGI adapter containing the selected output.
Definition display.h:314
DXGI_RATIONAL client_frame_rate_strict
Client frame rate strict.
Definition display.h:326
int height_before_rotation
Height before rotation.
Definition display.h:323
struct platf::dxgi::display_base_t::_D3DKMT_CLOSEADAPTER D3DKMT_CLOSEADAPTER
Win32 D3DKMT adapter-close request structure.
struct platf::dxgi::display_base_t::_D3DKMT_WDDM_2_7_CAPS D3DKMT_WDDM_2_7_CAPS
Win32 D3DKMT WDDM 2.7 capability flags.
virtual capture_e release_snapshot()=0
Release resources associated with the last captured snapshot.
factory1_t factory
DXGI factory used to enumerate adapters and outputs.
Definition display.h:313
int get_pixel_pitch()
Get pixel pitch.
Definition display.h:453
device_ctx_t device_ctx
D3D11 device context used for copy and render operations.
Definition display.h:317
UINT D3DKMT_HANDLE
Kernel-mode D3DKMT adapter handle.
Definition display.h:348
DXGI_RATIONAL display_refresh_rate
Display refresh rate.
Definition display.h:318
virtual capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr< platf::img_t > &img_out, std::chrono::milliseconds timeout, bool cursor_visible)=0
Capture a display frame into the provided image object.
NTSTATUS(WINAPI *) PD3DKMTOpenAdapterFromLuid(D3DKMT_OPENADAPTERFROMLUID *)
Function pointer for opening a D3DKMT adapter by LUID.
Definition display.h:402
Definition display.h:628
int init(const ::video::config_t &config, const std::string &display_name)
Initialize shared D3D capture resources for a RAM frame.
Definition display_ram.cpp:413
capture_e release_snapshot() override
Release resources associated with the last captured snapshot.
Definition display_ram.cpp:355
duplication_t dup
Desktop Duplication session used to acquire frames.
Definition display.h:655
cursor_t cursor
Cursor.
Definition display.h:656
capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr< platf::img_t > &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override
Capture a display frame into the provided image object.
Definition display_ram.cpp:208
Definition display.h:662
capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr< platf::img_t > &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override
Capture a display frame into the provided image object.
Definition display_vram.cpp:1353
duplication_t dup
Desktop Duplication session used to acquire frames.
Definition display.h:689
std::variant< std::monostate, texture2d_t, std::shared_ptr< platf::img_t > > last_frame_variant
Last frame variant.
Definition display.h:704
blend_t blend_alpha
Blend alpha.
Definition display.h:692
capture_e release_snapshot() override
Release resources associated with the last captured snapshot.
Definition display_vram.cpp:1762
int init(const ::video::config_t &config, const std::string &display_name)
Initialize D3D cursor rendering resources for RAM capture.
Definition display_vram.cpp:1766
gpu_cursor_t cursor_xor
Cursor xor.
Definition display.h:700
std::chrono::steady_clock::time_point old_surface_timestamp
Old surface timestamp.
Definition display.h:703
texture2d_t old_surface_delayed_destruction
Old surface delayed destruction.
Definition display.h:702
ps_t cursor_ps
Cursor ps.
Definition display.h:696
blend_t blend_invert
Blend invert.
Definition display.h:693
vs_t cursor_vs
Cursor vs.
Definition display.h:697
sampler_state_t sampler_linear
Sampler linear.
Definition display.h:690
gpu_cursor_t cursor_alpha
Cursor alpha.
Definition display.h:699
blend_t blend_disable
Blend disable.
Definition display.h:694
Definition display.h:486
std::shared_ptr< img_t > alloc_img() override
Allocate an image buffer compatible with this display backend.
Definition display_ram.cpp:359
std::unique_ptr< avcodec_encode_device_t > make_avcodec_encode_device(pix_fmt_e pix_fmt) override
Create AVCodec encode device.
Definition display_ram.cpp:421
D3D11_MAPPED_SUBRESOURCE img_info
CPU mapping information for the captured texture.
Definition display.h:524
int complete_img(img_t *img, bool dummy) override
Finish cursor composition into a GPU-backed image.
Definition display_ram.cpp:369
texture2d_t texture
D3D11 texture backing the captured frame.
Definition display.h:525
int dummy_img(img_t *img) override
Populate a fallback image when real capture data is unavailable.
std::vector< DXGI_FORMAT > get_supported_capture_formats() override
Get supported capture formats.
Definition display_ram.cpp:409
Definition display.h:531
std::vector< DXGI_FORMAT > get_supported_capture_formats() override
Get supported capture formats.
Definition display_vram.cpp:2013
std::unique_ptr< nvenc_encode_device_t > make_nvenc_encode_device(pix_fmt_e pix_fmt) override
Create NVENC encode device.
Definition display_vram.cpp:2135
bool is_codec_supported(std::string_view name, const ::video::config_t &config) override
Check that a given codec is supported by the display device.
Definition display_vram.cpp:2043
int dummy_img(img_t *img_base) override
Populate a fallback image when real capture data is unavailable.
std::shared_ptr< img_t > alloc_img() override
Allocate an image buffer compatible with this display backend.
Definition display_vram.cpp:1913
std::atomic< uint32_t > next_image_id
Next image ID.
Definition display.h:579
int complete_img(img_t *img_base, bool dummy) override
Finalize a VRAM image after capture or dummy-frame generation.
Definition display_vram.cpp:1926
std::unique_ptr< avcodec_encode_device_t > make_avcodec_encode_device(pix_fmt_e pix_fmt) override
Create AVCodec encode device.
Definition display_vram.cpp:2127
Definition display.h:761
int init(const ::video::config_t &config, const std::string &display_name)
Initialize shared D3D capture resources for a GPU frame.
Definition display_wgc.cpp:256
capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr< platf::img_t > &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override
Capture a display frame into the provided image object.
Definition display_wgc.cpp:268
capture_e release_snapshot() override
Release resources associated with the last captured snapshot.
Definition display_wgc.cpp:353
Definition display.h:794
capture_e release_snapshot() override
Release resources associated with the last captured snapshot.
Definition display_vram.cpp:1901
capture_e snapshot(const pull_free_image_cb_t &pull_free_image_cb, std::shared_ptr< platf::img_t > &img_out, std::chrono::milliseconds timeout, bool cursor_visible) override
Capture a display frame into the provided image object.
Definition display_vram.cpp:1848
int init(const ::video::config_t &config, const std::string &display_name)
Initialize Windows Graphics Capture frame-pool resources.
Definition display_vram.cpp:1905
Definition display.h:585
dup_t dup
Desktop Duplication capture session.
Definition display.h:587
capture_e next_frame(DXGI_OUTDUPL_FRAME_INFO &frame_info, std::chrono::milliseconds timeout, resource_t::pointer *res_p)
Acquire the next frame from the Windows capture backend.
Definition display_base.cpp:144
bool has_frame
Whether a frame is currently held by the duplication object.
Definition display.h:588
capture_e release_frame()
Release resources associated with frame.
Definition display_base.cpp:184
std::chrono::steady_clock::time_point last_protected_content_warning_time
Last protected content warning time.
Definition display.h:589
capture_e reset(dup_t::pointer dup_p=dup_t::pointer())
Reset the object to its initial empty state.
Definition display_base.cpp:176
GPU resources used to render a captured cursor shape.
Definition display.h:204
LONG topleft_y
Topleft y.
Definition display.h:284
LONG display_height
Display height.
Definition display.h:287
LONG texture_width
Texture width.
Definition display.h:280
shader_res_t input_res
Input res.
Definition display.h:290
LONG display_width
Display width.
Definition display.h:286
void set_pos(LONG topleft_x, LONG topleft_y, LONG display_width, LONG display_height, DXGI_MODE_ROTATION display_rotation, bool visible)
Update the cursor position and display geometry used for rendering.
Definition display.h:219
void set_texture(LONG texture_width, LONG texture_height, texture2d_t &&texture)
Replace the cursor texture and update its render viewport.
Definition display.h:236
LONG texture_height
Texture height.
Definition display.h:281
DXGI_MODE_ROTATION display_rotation
Display rotation.
Definition display.h:288
void update_viewport()
Recalculate the D3D viewport for the cursor texture.
Definition display.h:246
D3D11_VIEWPORT cursor_view
Cursor view.
Definition display.h:292
bool visible
Whether the cursor is visible.
Definition display.h:294
LONG topleft_x
Topleft x.
Definition display.h:283
texture2d_t texture
D3D11 texture backing the captured frame.
Definition display.h:279
Definition display.h:710
capture_e next_frame(std::chrono::milliseconds timeout, ID3D11Texture2D **out, uint64_t &out_time)
Acquire the next frame from the Windows capture backend.
Definition display_wgc.cpp:206
capture_e release_frame()
Release resources associated with frame.
Definition display_wgc.cpp:237
int set_cursor_visible(bool cursor_visible)
Enable or disable cursor composition in Windows.Graphics.Capture frames.
Definition display_wgc.cpp:245
int init(display_base_t *display, const ::video::config_t &config)
Initialize D3D cursor rendering resources for GPU capture.
Definition display_wgc.cpp:103
Unique pointer wrapper with customizable pointer and deleter types.
Definition utility.h:820
element_type * pointer
Pointer type stored by the unique pointer wrapper.
Definition utility.h:829
Declarations for common platform specific utilities.
std::shared_ptr< display_t > display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
Get the display_t instance for the given hwdevice_type. If display_name is empty, use the first monit...
Definition misc.cpp:1254
pix_fmt_e
Enumerates supported pix fmt options.
Definition common.h:316
std::unique_ptr< high_precision_timer > create_high_precision_timer()
Create platform-specific timer capable of high-precision sleep.
Definition misc.cpp:1394
capture_e
Enumerates supported capture options.
Definition common.h:647
@ timeout
Timeout.
const char * format_str[]
Names for DXGI_FORMAT values used in diagnostic logging.
Definition display_base.cpp:831
auto constexpr D3D11_CREATE_DEVICE_FLAGS
Protocol or platform constant for d3 d11 create device flags.
Definition display.h:27
long NTSTATUS
Windows NT status code returned by native APIs.
Definition display_base.cpp:25
Cursor position and visibility for the current capture frame.
Definition display.h:192
bool visible
Whether the cursor is visible.
Definition display.h:198
std::vector< std::uint8_t > img_data
Raw pointer-shape bytes from DXGI output duplication.
Definition display.h:193
DXGI_OUTDUPL_POINTER_SHAPE_INFO shape_info
Shape info.
Definition display.h:195
int x
X.
Definition display.h:196
int y
Y.
Definition display.h:197
Win32 D3DKMT adapter-close request structure.
Definition display.h:391
D3DKMT_HANDLE hAdapter
D3DKMT adapter handle used for low-level display queries.
Definition display.h:392
Win32 D3DKMT adapter-open request structure.
Definition display.h:353
D3DKMT_HANDLE hAdapter
D3DKMT adapter handle used for low-level display queries.
Definition display.h:355
LUID AdapterLuid
Adapter luid.
Definition display.h:354
Win32 D3DKMT adapter information query.
Definition display.h:379
D3DKMT_HANDLE hAdapter
D3DKMT adapter handle used for low-level display queries.
Definition display.h:380
VOID * pPrivateDriverData
P private driver data.
Definition display.h:382
UINT PrivateDriverDataSize
Private driver data size.
Definition display.h:383
Win32 D3DKMT WDDM 2.7 capability flags.
Definition display.h:361
Captured frame buffer shared between capture and encode stages.
Definition display_ram.cpp:18
Declarations for utility functions.
Declarations for video.