desktop-duplication

Encoding a D3D Surface obtained through Desktop Duplication using Media Foundation

喜夏-厌秋 提交于 2020-01-28 06:20:58
问题 I want to encode Desktop Duplication API frames to send over the network after encoding them with Media Foundation. I'm stuck with a E_NOTIMPL error when I call IMFTransform::ProcessInput, leaving me a little in the dark. These are the steps I've done up until now, I'm detailing them because it took me days to gather everything from the scarce scattered info across the web, so if it's resolved it will hopefully help others. Everything below is met with an S_OK: I'm obtaining the surface

Encoding a D3D Surface obtained through Desktop Duplication using Media Foundation

China☆狼群 提交于 2020-01-28 06:16:07
问题 I want to encode Desktop Duplication API frames to send over the network after encoding them with Media Foundation. I'm stuck with a E_NOTIMPL error when I call IMFTransform::ProcessInput, leaving me a little in the dark. These are the steps I've done up until now, I'm detailing them because it took me days to gather everything from the scarce scattered info across the web, so if it's resolved it will hopefully help others. Everything below is met with an S_OK: I'm obtaining the surface

How to get an IMFTransform that is d3d_aware (To encode input from Windows Duplication API to H264)?

会有一股神秘感。 提交于 2020-01-14 05:34:33
问题 The next code should give inputInfo and outputInfo configuration to get a IMFTransform back, and this IMFTransform be used to encode ID3D11Texture2D(with format DXGI_FORMAT_B8G8R8A8_UNORM) to H264 I understand the format DXGI_FORMAT_B8G8R8A8_UNORM can be taken as a MFVideoFormat_NV12 on a IMFTranform that is D3D_AWARE . But i'm having problems to get a IMFTranform that is D3D_AWARE MFT_REGISTER_TYPE_INFO inputInfo = { MFMediaType_Video, MFVideoFormat_NV12 }; MFT_REGISTER_TYPE_INFO outputInfo

AcquireNextFrame not working (Desktop Duplication API & D3D11)

大兔子大兔子 提交于 2019-12-24 02:15:10
问题 I've put together this code that takes a screenshot of the desktop and maps it for raw pixel data access, but the output is all zeros. I have no idea what i've done wrong. After looking at many examples of the Desktop Duplication Api online I don't see any differences between them and mine. This is my method to initialize everything, and no errors are raised. BOOL init() { CHECKHR(D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, gFeatureLevels, gNumFeatureLevels, D3D11_SDK

DirectX Screen Capture - Desktop Duplication API - limited frame rate of AcquireNextFrame

狂风中的少年 提交于 2019-12-12 09:26:45
问题 I'm trying to use Windows Desktop Duplication API to capture the screen and save the raw output to a video. I'm using AcquireNextFrame with a very high timeout value (999ms). This way I should get every new frame from windows as soon as it at has one, which naturally should be at 60fps anyway. I end up getting sequences where everything looks good (frame 6-11), and then sequences where things look bad (frame 12-14). If I check AccumulatedFrames lFrameInfo.AccumulatedFrames the value is often

Get status of night light mode in Windows 10

▼魔方 西西 提交于 2019-12-07 11:27:01
问题 I am using the desktop duplication api to grab the screen content and as it turns out, the new night light mode ('Nachtmodus' in German) is not applied in the grabbed screen content. How do I read (if possible directly in c#) the night mode status (enabled, color shift amount)? or How can I tell Windows to give me the color shifted image using the desktop duplication api? Basically, I want to know the state of what is configured inside these red boxes: Background: I am working on an ambilight

DirectX Screen Capture - Desktop Duplication API - limited frame rate of AcquireNextFrame

南楼画角 提交于 2019-12-04 18:39:00
I'm trying to use Windows Desktop Duplication API to capture the screen and save the raw output to a video. I'm using AcquireNextFrame with a very high timeout value (999ms). This way I should get every new frame from windows as soon as it at has one, which naturally should be at 60fps anyway. I end up getting sequences where everything looks good (frame 6-11), and then sequences where things look bad (frame 12-14). If I check AccumulatedFrames lFrameInfo.AccumulatedFrames the value is often 2 or higher. From my understanding, this means windows is saying "hey hold up, I don't have a frame for