From: Andrew H. <ham...@mc...> - 2006-05-29 19:39:40
|
Hello once again. I thought I'd try out the v4l2 patch, but I had a few problems. At first I was getting: Unable to map buffer (22) and motion would fall back on v4l (I think). Eventually I got around this by changing this line from: vd->buffers[i] = mmap(0 /* start anywhere */ , vd->buf.length, PROT_READ, MAP_SHARED, vd->fd, vd->buf.m.offset); to: vd->buffers[i] = mmap(0 /* start anywhere */ , vd->buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vd->fd, vd->buf.m.offset); Then I started getting: motion: video.c:445: v4l2_next: Assertion `vd->buf.bytesused == vd->framesizeIn' failed. Aborted I then commented out: assert(vd->buf.bytesused == vd->framesizeIn); and motion seems to start up with v4l2. I don't have a camera hooked up to the computer at the moment but I can see a blue screen with motion timestamps on the motion web port I have listening. Here is what happens when I start it now: [0] Thread 1 is from motion.conf [1] Thread started Opening /dev/video0 as a V4L2 device...length: 155648 offset: 0 Buffer mapped at address 0xb6b51000. length: 155648 offset: 155648 Buffer mapped at address 0xb6b2b000. length: 155648 offset: 311296 Buffer mapped at address 0xb6b05000. length: 155648 offset: 466944 Buffer mapped at address 0xb6adf000. v4l2_init: allocating framebuffer of size: 155648 V4L2 init successful, returning 0xb6ab8008 v4l2_video_enable: beginning... v4l2_video_enable: succesful [0] motion-httpd/3.2.7 running, accepting connections [0] motion-httpd: waiting for data on port TCP 8080 [1] Started stream webcam server in port 8081 I have no idea if what I did is correct or sane, but I thought I would share it with the rest of you. Sincerely, Andrew Hamilton |