nvFBCToSysSetUp with NVFBC_TOSYS_SETUP_PARAMS.bWithDiffMap=NVFBC_TRUE doesn't produce accurate DiffM...
I am trying to grab the entire frame buffer of my Linux PC via the nvFBCToSysGrabFrame() function at a very low frame rate (1 FPS, with NVFBC_TOSYS_GRAB_FLAGS_NOWAIT dwFlag). When asking for the map of differences with previous frame (see nvFBCToSysSetUp() and NVFBC_TOSYS_SETUP_PARAMS.bWithDiffMap field), I get a DiffMap that doesn't reflect the changed areas of my screen(s). Does anyone experience the same issue ? My platform: HP Z440 Workstation with NVIDIA Quadro K2200, dual-screen 4K (2x 3840x2160pixels), OS is RHEL7 (64 bit), NVIDIA driver 384.81 (and CUDA 9.0.1.176 but I don't think it's relevant here). Code extract: [...] // set up the capture session NVFBC_TOSYS_SETUP_PARAMS setupParams; memset(&setupParams, 0, sizeof(setupParams)); setupParams.dwVersion = NVFBC_TOSYS_SETUP_PARAMS_VER; setupParams.eBufferFormat = NVFBC_BUFFER_FORMAT_RGB; setupParams.ppBuffer = (void**)&pBuffer; setupParams.bWithDiffMap = NVFBC_TRUE; setupParams.ppDiffMap = (void**)&pDiffMap; setupParams.dwDiffMapScalingFactor = 16; NVFBCSTATUS fbcStatus = NvFbcApi.nvFBCToSysSetUp(m_handle, &setupParams); [...] // set-up the grabbing parameters NVFBC_TOSYS_GRAB_FRAME_PARAMS grabParams; NVFBC_FRAME_GRAB_INFO frameInfo; memset(&grabParams, 0, sizeof(grabParams)); grabParams.dwVersion = NVFBC_TOSYS_GRAB_FRAME_PARAMS_VER; grabParams.dwFlags = NVFBC_TOSYS_GRAB_FLAGS_NOWAIT; grabParams.pFrameGrabInfo = &frameInfo; // NB: Time-out is pointless when NOWAIT flag is specified grabParams.dwTimeoutMs = 0; do { memset(&frameInfo, 0, sizeof(frameInfo)); // grab frame, no wait fbcStatus = NvFbcApi.nvFBCToSysGrabFrame(m_handle, &grabParams); [...] }
I am trying to grab the entire frame buffer of my Linux PC via the nvFBCToSysGrabFrame() function at a very low frame rate (1 FPS, with NVFBC_TOSYS_GRAB_FLAGS_NOWAIT dwFlag).
When asking for the map of differences with previous frame (see nvFBCToSysSetUp() and NVFBC_TOSYS_SETUP_PARAMS.bWithDiffMap field), I get a DiffMap that doesn't reflect the changed areas of my screen(s). Does anyone experience the same issue ?

My platform:

HP Z440 Workstation with NVIDIA Quadro K2200, dual-screen 4K (2x 3840x2160pixels), OS is RHEL7 (64 bit), NVIDIA driver 384.81 (and CUDA 9.0.1.176 but I don't think it's relevant here).

Code extract:

[...]

// set up the capture session
NVFBC_TOSYS_SETUP_PARAMS setupParams;
memset(&setupParams, 0, sizeof(setupParams));
setupParams.dwVersion = NVFBC_TOSYS_SETUP_PARAMS_VER;
setupParams.eBufferFormat = NVFBC_BUFFER_FORMAT_RGB;
setupParams.ppBuffer = (void**)&pBuffer;
setupParams.bWithDiffMap = NVFBC_TRUE;
setupParams.ppDiffMap = (void**)&pDiffMap;
setupParams.dwDiffMapScalingFactor = 16;
NVFBCSTATUS fbcStatus = NvFbcApi.nvFBCToSysSetUp(m_handle, &setupParams);

[...]

// set-up the grabbing parameters
NVFBC_TOSYS_GRAB_FRAME_PARAMS grabParams;
NVFBC_FRAME_GRAB_INFO frameInfo;
memset(&grabParams, 0, sizeof(grabParams));
grabParams.dwVersion = NVFBC_TOSYS_GRAB_FRAME_PARAMS_VER;
grabParams.dwFlags = NVFBC_TOSYS_GRAB_FLAGS_NOWAIT;
grabParams.pFrameGrabInfo = &frameInfo;
// NB: Time-out is pointless when NOWAIT flag is specified
grabParams.dwTimeoutMs = 0;

do {
memset(&frameInfo, 0, sizeof(frameInfo));
// grab frame, no wait
fbcStatus = NvFbcApi.nvFBCToSysGrabFrame(m_handle, &grabParams);

[...]

}

#1
Posted 01/10/2018 01:48 PM   
Scroll To Top

Add Reply