This commit is contained in:
Ivan
2022-06-24 09:54:00 +03:00
parent f97644b75c
commit bc01769799
4 changed files with 3 additions and 3 deletions

View File

@@ -160,7 +160,7 @@ int main(int argc, char* argv[])
// Fill in the buffer. It is likely that you would do something much smarter than this.
// memset((void*)NDI_video_frame.p_data, (idx & 1) ? 255 : 0, NDI_video_frame.xres*NDI_video_frame.yres * 4 * sizeof(uint8_t));
// Why used void* the guy in GitHub?
memcpy((void*)NDI_video_frame.p_data, imLeft.ptr(0, 0), NDI_video_frame.xres * NDI_video_frame.yres * 3);
memcpy((void*)NDI_video_frame.p_data, imLeft.ptr(0, 0), (double)NDI_video_frame.xres * (double)NDI_video_frame.yres * (double)3);
std::cout << std::endl << "From the video_frame.p_data array first elements of the rows: " << std::endl;
for (int i = 0; i < 100; i++){