aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-29 06:45:55 +0200
committerdec05eba <dec05eba@protonmail.com>2021-07-29 06:45:55 +0200
commit04d229caf3a8529ad2762791e8443e119dfb58a7 (patch)
tree40bc4ee6973b518c2e0c398ff4088797b820d2e4 /include
parent1f71584a77494a41338a96f2d8e65df9a7a280b0 (diff)
Use direct capture when possible
Diffstat (limited to 'include')
-rw-r--r--include/NvFBCLibrary.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/NvFBCLibrary.hpp b/include/NvFBCLibrary.hpp
index a0bf045..3c5310a 100644
--- a/include/NvFBCLibrary.hpp
+++ b/include/NvFBCLibrary.hpp
@@ -122,7 +122,7 @@ public:
memset(&create_capture_params, 0, sizeof(create_capture_params));
create_capture_params.dwVersion = NVFBC_CREATE_CAPTURE_SESSION_PARAMS_VER;
create_capture_params.eCaptureType = NVFBC_CAPTURE_SHARED_CUDA;
- create_capture_params.bWithCursor = NVFBC_TRUE; // This will need to be disabled when using bAllowDirectCapture
+ create_capture_params.bWithCursor = NVFBC_FALSE;
if(capture_region) {
create_capture_params.captureBox = { x, y, width, height };
*display_width = width;
@@ -130,10 +130,11 @@ public:
}
create_capture_params.eTrackingType = tracking_type;
//create_capture_params.dwSamplingRateMs = 1000 / fps;
+ create_capture_params.bAllowDirectCapture = NVFBC_TRUE;
+ create_capture_params.bPushModel = NVFBC_TRUE;
if(tracking_type == NVFBC_TRACKING_OUTPUT)
create_capture_params.dwOutputId = output_id;
- // TODO: Use create_capture_params.bAllowDirectCapture and create_capture_params.bPushModel
status = nv_fbc_function_list.nvFBCCreateCaptureSession(nv_fbc_handle, &create_capture_params);
if(status != NVFBC_SUCCESS) {
fprintf(stderr, "Error: %s\n", nv_fbc_function_list.nvFBCGetLastErrorStr(nv_fbc_handle));