#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#if _WIN32 || _WIN64
#include <windows.h>
static void sleep_ms(int time) {
Sleep(time);
}
#else
#include <unistd.h>
static void sleep_ms(int time) {
usleep(time * 1000);
}
#endif
const char* dir_path = (const char*)user_data;
char img_path[256];
FILE* fd;
sprintf(img_path,
"%s/eye_image_%" PRId64
".gif", dir_path, frame->
device_time_stamp);
printf("Received image %s\n", img_path);
fd = fopen(img_path, "wb");
fclose(fd);
}
eyetracker,
eye_image_as_gif_callback, (void*)dir_path);
sleep_ms(2000);
eyetracker,
eye_image_as_gif_callback);
}
Definition: tobii_research_streams.h:745
size_t image_size
Definition: tobii_research_streams.h:765
void * image_data
Definition: tobii_research_streams.h:769
int64_t device_time_stamp
Definition: tobii_research_streams.h:749
struct TobiiResearchEyeTracker TobiiResearchEyeTracker
Definition: tobii_research.h:315
Functionality for an eye tracker.
Functionality for eye tracker streams.
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_subscribe_to_eye_image_as_gif(TobiiResearchEyeTracker *eyetracker, tobii_research_eye_image_as_gif_callback callback, void *user_data)
Subscribes to eye image for the eye tracker with the image delivered in gif format.
TOBII_RESEARCH_API TobiiResearchStatus TOBII_RESEARCH_CALL tobii_research_unsubscribe_from_eye_image_as_gif(TobiiResearchEyeTracker *eyetracker, tobii_research_eye_image_as_gif_callback callback)
Unsubscribes from eye image for the eye tracker.