Question about videobuf2 with 0 buffers

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

 



Hello

  White testing a driver I have stepped into some strange behaviour
and I want to know if it is a feature or a bug.

   I am using yavta to test the system and I run this command:

yavta /dev/video0 -c -n 0

to start a capture with 0 buffers (Even if I dont know where this can be useful)

And I have found out that:

1) If the user does a streamon() and then  close() the descriptor,
streamoff is not called, this is because he has never been set as
owner of the queue. (on vb2_fop_release, queue_release is only called
if the owns the queue)

Is this expected? Shouldn't we leave the stream stopped?

I propose to set vdev->queue->owner to the current vdev on streamon if
it does not have an owner.

Or in vb2_fop_release set check for :
if (!vdev->queue->owner || file->private_data == vdev->queue->owner)
instead of
if (file->private_data == vdev->queue->owner)

Shall I post a patch?

2) the queue_setup handler of the driver is not called, this could be
expected, since it is commented on the code.
/*
* In case of REQBUFS(0) return immediately without calling
* driver's queue_setup() callback and allocating resources.
*/
But I find it strange, the driver could be doing some initialization there...


Thanks!



-- 
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux