Exemple #1
0
DialogCamera::DialogCamera(QWidget *parent) :
  QDialog(parent),
  ui(new Ui::DialogCamera)
{
  ui->setupUi(this);
  connect(ui->cameraButton, SIGNAL(clicked()), this, SLOT(cameraOpen()));
  connect(ui->videoButton, SIGNAL(clicked()), this, SLOT(videoOpen()));
}
MmeGrabber::MmeGrabber() 
{
	/* fprintf(stderr, "vic: Called MmeGrabber constructor\n"); */
	mmeMaster = this;

	/*XXX defer videoOpen until start? */
	if (videoGetNumDevs() <= 0 || 
	    videoOpen(&handle_, 0, VIDEO_IN) != DV_ERR_OK) {
		valid_ = 0;
		fprintf(stderr,"vic : Failed to open video device\n");
		return;
	}

	port_=1;
	standard_=VIDEO_STANDARD_NTSC;

	valid_ = 1;
	running_ = 0;
	wantgrab_ = 0;
	buffers_ = 1;
    
	fps(5);
	init();
}