<commit_before>/*
 *  V4L2 video capture
 *  Author: Dstray
 *  Video capture part for the RPRobot
 */

#ifndef __CAPTURE_H__
#define __CAPTURE_H__ 1

#include "../common/exception.h"
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <linux/videodev2.h>
#include <libv4lconvert.h>

enum io_method {
    IO_METHOD_READ,
    IO_METHOD_MMAP,
    IO_METHOD_USERPTR
};

extern int open_device(const char* dev_name);
extern void init_device(int fd, const char* dev_name,
    enum io_method io, int n_bufs);
extern void start_capturing(int fd, enum io_method io);<commit_msg>on ubuntu<commit_after>/*
 *  V4L2 video capture
 *  Author: Dstray
 *  Video capture part for the RPRobot
 */

#ifndef __CAPTURE_H__
#define __CAPTURE_H__ 1

#include "../common/exception.h"
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <linux/videodev2.h>
//#include <libv4lconvert.h>

enum io_method {
    IO_METHOD_READ,
    IO_METHOD_MMAP,
    IO_METHOD_USERPTR
};

extern int open_device(const char* dev_name);
extern void init_device(int fd, const char* dev_name,
    enum io_method io, int n_bufs);
extern void start_capturing(int fd, enum io_method io);
{'fraction_non_alphanumeric': 0.11437908496732026, 'fraction_numerical': 0.008169934640522876, 'mean_word_length': 4.518018018018018, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4373483', 'n_tokens_mistral': 489, 'n_tokens_neox': 478, 'n_words': 120}