+flashlight-applet (0.3-1) fremantle; urgency=low
+
+ * Flashlight was unable to turn on again after closing camera
+ application.
+
+ -- Roman Moravcik <roman.moravcik@gmail.com> Fri, 8 Jan 2010 14:53:47 +0100
+
flashlight-applet (0.3-0) fremantle; urgency=low
* Fixed bug 4906: Instruction to start Flashlight Applet not clear.
{
struct v4l2_control ctrl;
enum v4l2_buf_type type;
- unsigned int i;
printf ("flashlight_set_intensity(%d)\n", intensity);
WORKAROUND: start/stop i/o streaming to block camera application
*/
if (intensity > 0) {
- for (i = 0; i < flashlight->n_buffers; ++i) {
- struct v4l2_buffer buf;
-
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- buf.index = i;
- if (ioctl (flashlight->fd, VIDIOC_QBUF, &buf) == -1) {
- printf ("flashlight_set_intensity: unable to exchange a buffer %d with driver (%s)\n", i, strerror (errno));
- return EGENERROR;
- }
- }
-
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl (flashlight->fd, VIDIOC_STREAMON, &type)) {
printf ("flashlight_set_intensity: unable to start i/o streaming (%s)\n", strerror (errno));
return EGENERROR;
}
- if (flashlight_close(flashlight))
+ if (flashlight_close (flashlight))
return EGENERROR;
}