arbmind / desktop-duplication-cpp Goto Github PK
View Code? Open in Web Editor NEWWindows Desktop Duplication Tool for live coding presentations in C++2a
License: MIT License
Windows Desktop Duplication Tool for live coding presentations in C++2a
License: MIT License
Hi @arBmind,
thanks a lot for this great tool. I am using it for sharing just a part of my screen in MS-Teams Meetings. To further customize the tool to my needs, I want to add a few changes. Unfortunately, I am not able to set up the Project in Visual Studio 2019 (Professional).
I have already installed the Windows 10 SDK and used the clang Toolset, but I receive the following Error-message:
'''
....\src\BaseRenderer.cpp(5,10): fatal error : 'PlainPixelShader.h' file not found
'''
Therefore, I suspect something is still wrong with my include directories. Since I am not very experienced with Direct-X development, I appreciate any tips. Thanks a lot for your help.
I compiled this repository in Visual Studio Professional 2017.
The only difference being, I switched all paths in desktop-duplication.vcxproj from Community to Professional.
It compiles just fine. Running the program gives me the following black display.
Do you have an idea what can be causing this issue ?
Hello, I really like your work, you have done a great job. I have a question, is it possible to take a screenshot not of the whole desktop but just one application? Take a screenshot of the desktop and cut out the layers with unnecessary applications? I will be grateful for any answer.
Great project,
I would like to capture windowed apps. All the sample I see talks about DXGI capturing the full desktop. So, is DXGI capable to do it? Any advice to do it?
Hello arBmind,
I try to recreate the project that you did, with the only difference, that I want to send the buffer on the network.
I would like to know if it was possible to customize the output of the frame. For example, I have my desktop which is in 1920x1080, I would like to be able to receive the buffer and dirty rect in 1280x720.
I saw that there was the SetDisplaySurface function that could be applied before running DuplicateOutput.
Here is my code:
HRESULT hr;
hr = gDevice->QueryInterface(IID_PPV_ARGS(&gDxgiDevice));
if (FAILED(hr))
return;
hr = gDxgiDevice->GetParent(__uuidof(IDXGIAdapter), reinterpret_cast<void**>(&gDxgiAdapter));
if (FAILED(hr))
return;
gDxgiDevice->Release();
UINT Output = 0;
IDXGIOutput *lDxgiOutput = nullptr;
hr = gDxgiAdapter->EnumOutputs(Output, &lDxgiOutput);
if (FAILED(hr))
return;
gDxgiAdapter->Release();
hr = lDxgiOutput->GetDesc(&gOutputDesc);
if (FAILED(hr))
return;
IDXGIOutput1 *lDxgiOutput1 = nullptr;
hr = lDxgiOutput->QueryInterface(IID_PPV_ARGS(&lDxgiOutput1));
if (FAILED(hr))
return;
lDxgiOutput->Release();
//Is it possible to customize the output here ? With SetDisplaySurface ?
hr = lDxgiOutput1->DuplicateOutput(gDevice, &gDeskDupl);
if (FAILED(hr))
return;
lDxgiOutput1->Release();
gDeskDupl->GetDesc(&gOutputDuplDesc);
Is it possible for you to help me?
Thanks a lot
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.