Discription
Vlog buddie can be used for "study with me" vlogs :)
It records video capture using purely Unix standards.
Video capture for vlogging
line 62
buffers = calloc(req.count, sizeof(*buffers));
you miss to check for possible NULL pointer .
while (1) {
int ret = poll(poll_fds, 1, 1000); // wait up to 1 second for events
// ( put -1 if it should wait forever )
if (ret < 0) {
perror("Failed to poll");
exit(1);
} else if (ret == 0) {
printf("Poll timeout\n");
continue;
}
if (poll_fds[0].revents & POLLIN) {
// Dequeue the video buffer for sending it to the output/display
struct v4l2_buffer buf = {0};
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) {
perror("Failed to dequeue buffer");
exit(1);
}
// Write the video data to the output device
write(out_fd, buffers[buf.index].start, buf.bytesused);
// Enqueue the video buffer again
if (ioctl(fd, VIDIOC_QBUF, &buf) < 0) {
perror("Failed to enqueue buffer");
exit(1);
}
}
}
in this peace of code there's no break point to continue the rest of code .
we see only exit .it will stop code from running need to double check this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.