<commit_before>#include <cv.h>
#include <stdio.h>
#include <highgui.h>

int getopt(char c, int defval);

int gargc;
char **gargv;

int main(int argc,char *argv[])
{
  gargc = argc;
  gargv = argv;

  int c;
  IplImage* color_img;
  CvCapture* cv_cap = cvCaptureFromCAM(0);

  cvNamedWindow("Video",0); // create window
  color_img = cvQueryFrame(cv_cap); // get frame
  int frameH    = (int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FRAME_HEIGHT);
  int frameW    = (int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FRAME_WIDTH);
  int fps       = (int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FPS);
  //  int numFrames = (int) cvGetCaptureProperty(capture,  CV_CAP_PROP_FRAME_COUNT);

  //int fps     = 25;  // or 30
  //int frameW  = getopt('w', 800); // 744 for firewire cameras
  //int frameH  = getopt('h', 600); // 480 for firewire cameras

  CvVideoWriter *vid_write = cvCreateVideoWriter("out.avi",CV_FOURCC('D','I','V','X'),
						 fps,cvSize(frameW,frameH),1);

  for(;;) {
    color_img = cvQueryFrame(cv_cap); // get frame<commit_msg>works - with svn version of opencv<commit_after>#include <cv.h>
#include <stdio.h>
#include <highgui.h>

int getopt(char c, int defval);

int gargc;
char **gargv;

int main(int argc,char *argv[])
{
  gargc = argc;
  gargv = argv;

  int c;
  IplImage* color_img;

  CvCapture* cv_cap = cvCaptureFromCAM(getopt('c', 0));

  cvNamedWindow("Video",0); // create window
  color_img = cvQueryFrame(cv_cap); // get frame
  int frameH    = getopt('h',(int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FRAME_HEIGHT));
  int frameW    = getopt('w',(int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FRAME_WIDTH));
  int fps       = getopt('r',(int) cvGetCaptureProperty(cv_cap, CV_CAP_PROP_FPS));
  //  int numFrames = (int) cvGetCaptureProperty(capture,  CV_CAP_PROP_FRAME_COUNT);

  //int fps     = 25;  // or 30
  //int frameW  = getopt('w', 800); // 744 for firewire cameras
  //int frameH  = getopt('h', 600); // 480 for firewire cameras

  //printf("framerate=%d\n",fps); fflush(stdout);

  CvVideoWriter *vid_write = cvCreateVideoWriter("out.avi",
						 CV_FOURCC('M','J','P','G'),
						 //CV_FOURCC('F','L','V','1'),
						 fps,cvSize(frameW,frameH),1);

  for(;;) {
    color_img = cvQueryFrame(cv_cap); // get frame
{'fraction_non_alphanumeric': 0.1583148558758315, 'fraction_numerical': 0.01729490022172949, 'mean_word_length': 4.081081081081081, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5057799', 'n_tokens_mistral': 925, 'n_tokens_neox': 856, 'n_words': 183}