Re: videobuf2: V4L2_BUF_TYPE_VIDEO_CAPTURE and V4L2_BUF_TYPE_VIDEO_OUTPUT at the same time?

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

 



Hi Ricardo,

Memory-to-memory devices can do this. In that case querycap will return the M2M
or M2M_MPLANE capability. The mem2mem_testdev driver is a good example.

Other devices shouldn't combine the two.

On 09/10/2013 04:10 PM, Ricardo Ribalda Delgado wrote:
> Hello!
> 
> I am writing the driver for a device that can work as an input and as
> output at the same time. It is used for debugging of the video
> pipeline.
> 
> Is it possible to have a vb2 queue that supports capture and out at
> the same time?
> 
> After a fast look on the code it seems that the code flow is different
> depending of the type. if (V4L2_TYPE_IS_OUTPUT()....)  :(

A vb2_queue is for one direction only, so for a bidirectional device you need
two vb2_queue structs. It's recommended to use the v4l2-mem2mem.h framework
for that, as is also used by the mem2mem_testdev driver.

> 
> Also it seems that struct video device has only space for one
> vb2_queue, so I cant create a video device with two vbuf2 queues.

You can, but not by using the vb2_queue pointer in videodev. It might
actually be nice to add better core support for m2m devices. If
someone needs a project, then that would be nice.

Regards,

	Hans

> So is there any way to have a video device with videobuf2 that
> supports caputer and output?
> 
> Thanks!
> 
--
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