Skip to contentSkip to conversation

bttv driver problem last kernels

DISCUSSION Linos 2 participants 3 messages Jun 6, 2008 Media (V4L/DVB)

lore
Share & tools
lore

Linos

author
#0 lore raw

Hello all,
i am using a bttv multicapture board and i have been having increasing problems in last kernels, i am using
two programs to capture my video input for security reasons (helix producer and mp4live from mpeg4ip project) since the first versions of v4l2 in 2.4 patched kernel versions i can attach the two programs at the same time at the same video input, only loss framerate but i am using a low framerate to transmit by internet anyway, before 2.6.22 all have worked very well (i have not tested 2.6.21, the last kernel working ok i have tested is 2.6.20) but after that bttv driver is getting worse and worse, from 2.6.22 to 2.6.24 i get this if i try to launch the second process in the same video input:

first mp4live works ok when i launch producer: Error: Could not set image size to 352x288 for color format I420 (15) (VIDIOCMCAPTURE: buffer 0) first producer works ok when i launch mp4live: 12:59:59.333-mp4live: Failed to allocate video capture buffer for /dev/video0

and in 2.6.25 worse yet it has a deadlock, i have applied the patch listed here http://lkml.org/lkml/2008/5/17/139 but still doesnt works for capturing anything, before the patch it hangs the process after the patch it gives me other error about buffers different from the above in the first process attached to the video input so it is unusable.

Obviously my problem here it is that if i want to upgrade hardware i can have problems with sata, chipsets, audio or any other new hardware no supported in older kernels (apart from missing features). Should the situation with bttv drivers be better in future kernels or it is letting die for better support for new chips?

Regards,
Miguel Angel.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#1 lore raw
Quoted 7 lines · Linos

Hello all,
i am using a bttv multicapture board and i have been having increasing problems in last kernels, i am using two programs to capture my
video input for security reasons (helix producer and mp4live from mpeg4ip project) since the first versions of v4l2 in 2.4 patched kernel versions i can attach the two programs at the same time at the same video input, only loss framerate

You are relying on undocumented behaviour when two v4l1 applications are reading from bttv at the same time. Furthermore the v4l2 standards says

"1.1.4. Shared Data Streams

V4L2 drivers should not support multiple applications reading or writing the same data stream on a device by copying buffers, time multiplexing or similar means. This is better handled by a proxy application in user space. When the driver supports stream sharing anyway it must be implemented transparently. The V4L2 API does not specify how conflicts are solved."

You should change your setup to use only one application accessing the device.

Daniel

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

author
#2 lore raw
Quoted 18 lines · Daniel Glöckner
Quoted 4 lines · Linos

Hello all,
i am using a bttv multicapture board and i have been having
increasing problems in last kernels, i am using two programs to capture my
video input for security reasons (helix producer and mp4live from mpeg4ip project) since the first versions of v4l2 in 2.4 patched kernel versions i can attach the two programs at the same time at the same video input, only loss framerate

You are relying on undocumented behaviour when two v4l1 applications are reading from bttv at the same time. Furthermore the v4l2 standards says

"1.1.4. Shared Data Streams

V4L2 drivers should not support multiple applications reading or writing the same data stream on a device by copying buffers, time multiplexing or similar means. This is better handled by a proxy application in user space. When the driver supports stream sharing anyway it must be implemented transparently. The V4L2 API does not specify how conflicts are solved."

Quoted 5 lines

You should change your setup to use only one application accessing the device.

Daniel

I have two options here:

1) maintain 2.6.20 kernel version
2) search for an application proxy that lets me use the same input for two programs

i have a windows client connecting the two streams in different options, i cant disable any of them and i cant double the number of capture inputs in the system, anyway i have not read the v4l2 standard so you have reason that i should not be doing that but i have been doing from 2.4.17 (with patches) to 2.6.20.

Regards,
Miguel Angel.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list