LIB := libbmusb.a
SODEV := libbmusb.so
SONAME := libbmusb.so.6
-SOLIB := libbmusb.so.6.0.2
+SOLIB := libbmusb.so.6.0.4
all: $(LIB) $(SOLIB) main bmusb-v4l2proxy
-// Intensity Shuttle USB3 capture driver, v0.7.6
+// Intensity Shuttle USB3 capture driver, v0.7.8
// Can download 8-bit and 10-bit UYVY/v210-ish frames from HDMI, quite stable
// (can do captures for hours at a time with no drops), except during startup
// 576p60/720p60/1080i60 works, 1080p60 does not work (firmware limitation)
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
+#include <errno.h>
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include <bmusb/bmusb.h>
}
#endif
- write(video_fd, origptr, video_frame.len);
+ size_t len = video_frame.len;
+ while (len > 0) {
+ ssize_t ret = write(video_fd, origptr, len);
+ if (ret == -1) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ perror("write");
+ break; // Hope for better luck next frame.
+ }
+ }
+ origptr += ret;
+ len -= ret;
+ }
}
usb->get_video_frame_allocator()->release_frame(video_frame);