Git Product home page Git Product logo

desktop-duplication-cpp's Issues

Desktop Duplication Custom Output

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

Setup Visual Studio Project

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.

Capture windowed apps

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?

Black output

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.

image

Do you have an idea what can be causing this issue ?

Capture the desired window

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.