Re: [yavta PATCH 5/9] Allow passing file descriptors to yavta

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

 



Hi Laurent,

Laurent Pinchart wrote:
Just thinking out loud, we need to

- initialize the device structure,
- open the device or use an externally provided fd,
- optionally query the device capabilities,
- optionally override the queue type.

Initializing the device structure must be performed unconditionally, I would
create a video_init() function for that.

This is now performed in the beginning of main(). video_open() no longer initialises anything.

Opening the device or using an externally provided fd are exclusive
operations, I would create two functions (that wouldn't do much).

Currently this is a few lines in main().

Querying the device capabilities is also optional, I would create one function
for that.

Patch 4/9.

Finally, overriding the queue type is of course optional and should be
implemented in its own function. We should probably return an error if the
user tries to set a queue type not reported by QUERYCAP (assuming QUERYCAP has
been called).

The same check already done in the driver, and an error is returned if it's wrong. I'm leaning towards thinking this isn't necessary in yavta.

Ideally I'd also like to make the --no-query argument non-mandatory when
operating on subdev nodes. It has been introduced because QUERYCAP isn't
supported by subdev nodes, and it would be nice if we could detect somehow
that the device node corresponds to a subdev and automatically skip QUERYCAP
in that case.

It's already non-mandatory. We don't try to rocognise sub-device nodes, but failing querycap is a non-error already without this patchset.

--
Regards,

Sakari Ailus
sakari.ailus@xxxxxx
--
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