libobs: Add output duplicator support

This adds support for the windows 8+ output duplicator feature which
allows the efficient capturing of a specific monitor connected to the
currently used device.
This commit is contained in:
jp9000
2014-12-29 00:29:55 -08:00
parent a5447b5fd8
commit 44b8c24f34
7 changed files with 315 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
#include <windows.h>
#include <dxgi.h>
#include <dxgi1_2.h>
#include <d3d11.h>
#include <d3dcompiler.h>
@@ -449,6 +450,15 @@ struct gs_vertex_shader : gs_shader {
const char *shaderString);
};
struct gs_duplicator {
ComPtr<IDXGIOutputDuplication> duplicator;
gs_texture_2d *texture;
gs_device_t *device;
gs_duplicator(gs_device_t *device, int monitor_idx);
~gs_duplicator();
};
struct gs_pixel_shader : gs_shader {
ComPtr<ID3D11PixelShader> shader;
vector<ShaderSampler> samplers;