How to stop video capture?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I can capture frames just fine, but can't seem to close the device and reopen it.

In my setup_video() function I do the following (plus the other ioctls I need):

	cam = open("/dev/video", O_RDONLY );
	if (cam<0) {
		printf("ERROR: THERE IS NO CAMERA CONECTED\n");
		return 1;
	}

Then later on, in my read_video() thread, I do the following:

	if (stop_video == YES) {
		close(cam);
		gtk_widget_destroy(darea);
		gtk_widget_destroy(window);
		return;
	}

But when I go back to reopen the camera, I get the "ERROR: THERE IS NO CAMERA CONECTED" message. So for some reason, I am unable to close /dev/video !?!?!?

I'm using an Osprey 100 video card under Slackware 9 with BTTV driver 0.7.106.

Thanks,

DT




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux