uvc-gadget.git, branch master UVC gadget userspace sample application uvc-gadget v0.3.0 2023-01-16T17:46:01+00:00 Kieran Bingham kieran.bingham@ideasonboard.com 2023-01-16T17:46:01+00:00 3f2a557dc7f036349644e4885c5d8a2450cce2dd This release brings in some new support and features for UVC Gadget to operate with libcamera based cameras. - libcamera sources are now supported - Support for encoded streams - Software based MJPEG encoding is managed by the libcamera source only. Please be aware, that as part of this release, the existing V4L2 source option '-c' is renamed to '-d'. The new libcamera source is now supported by the option '-c' and can be selected by camera index, or explictly choosing the camera based on it's libcamera id. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This release brings in some new support and features for UVC Gadget to
operate with libcamera based cameras.

 - libcamera sources are now supported
 - Support for encoded streams
 - Software based MJPEG encoding is managed by the libcamera source only.

Please be aware, that as part of this release, the existing V4L2 source
option '-c' is renamed to '-d'.

The new libcamera source is now supported by the option '-c' and can be
selected by camera index, or explictly choosing the camera based on it's
libcamera id.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
lib/mjpeg_encoder: Add an MJPEG encoder for YUV420 data 2023-01-16T15:22:38+00:00 Daniel Scally dan.scally@ideasonboard.com 2023-01-10T08:49:30+00:00 29be8034518c0babbf6334d3ef6fc9ffe30e6b70 MJPEG is an extremely useful format given its compression allows high framerates even over limited bandwith USB connections. Add an MJPEG encoder class that converts YUV420 data into MJPEG data. Where a libcamera-source does not support MJPEG natively, convert YUV420 into MJPEG if the user tries to set MJPEG format. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
MJPEG is an extremely useful format given its compression allows
high framerates even over limited bandwith USB connections. Add
an MJPEG encoder class that converts YUV420 data into MJPEG data.

Where a libcamera-source does not support MJPEG natively, convert
YUV420 into MJPEG if the user tries to set MJPEG format.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
lib/stream: Add and handle new VIDEO_SOURCE_ENCODED type 2023-01-16T13:10:16+00:00 Daniel Scally dan.scally@ideasonboard.com 2023-01-10T12:06:21+00:00 3a4e214882b362dc6dccd28d0862a258af75cf33 Add functions to handle a new entry into video_source_type, representing data with an encoding step between the source and sink. When running through this route, buffers are allocated and mmaped on both the source and the sink, then imported to the source to be filled before being queued to the sink. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Add functions to handle a new entry into video_source_type, representing
data with an encoding step between the source and sink. When running
through this route, buffers are allocated and mmaped on both the source
and the sink, then imported to the source to be filled before being queued
to the sink.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
lib/video-source: Add video_source_import_buffers 2023-01-16T13:10:16+00:00 Daniel Scally dan.scally@ideasonboard.com 2023-01-13T16:27:10+00:00 afd7ad5f9dbef7f31162b9a49b9f85c0a309a3a0 We need to be able to place encoded data into the sink device's bufs. To facilitate that add a video_source operation that allows the source to import buffers from the sink. Add a .import_buffers() callback so that the libcamera-source can access a sink's buffers. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
We need to be able to place encoded data into the sink device's bufs.
To facilitate that add a video_source operation that allows the source
to import buffers from the sink.

Add a .import_buffers() callback so that the libcamera-source can
access a sink's buffers.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
lib: Add video_source_type enumeration 2023-01-16T13:10:16+00:00 Daniel Scally dan.scally@ideasonboard.com 2023-01-10T11:58:04+00:00 4d9897c5aa5376f89e0d5ed1534536f680939e0d Add an enum to struct video_source that details the type of source we're dealing with. This will be used to make decisions about buffer allocation and handling in a more explicit way. Use the video_source_type associated with a video_source to decide on the appropriate allocation function and buffer handler at stream on time. This is a more explicit method than relying on the presence of the .alloc_buffers op and allows more flexibility. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Add an enum to struct video_source that details the type of source
we're dealing with. This will be used to make decisions about buffer
allocation and handling in a more explicit way.

Use the video_source_type associated with a video_source to decide on
the appropriate allocation function and buffer handler at stream on time.
This is a more explicit method than relying on the presence of the
.alloc_buffers op and allows more flexibility.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
main: Provide a libcamera source 2023-01-16T13:10:15+00:00 Kieran Bingham kieran.bingham@ideasonboard.com 2022-12-14T23:17:31+00:00 3f6aee6a13233e9ffcbb133ab9490aead7e2ced3 Allow callers to create a libcamera source when available. libcamera support is optional, so conditionally compile the new options depending on whether libcamera is available. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Allow callers to create a libcamera source when available. libcamera
support is optional, so conditionally compile the new options
depending on whether libcamera is available.

Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
libcamera: Add new libcamera source 2023-01-16T13:10:03+00:00 Daniel Scally dan.scally@ideasonboard.com 2023-01-16T07:58:12+00:00 006aa232ac92e3ccde06a3b1536d6e02e8496766 Provide the integration of a libcamera source within uvc-gadget. This adds C++ support to the project and adds libcamera as an optional external dependency. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Provide the integration of a libcamera source within uvc-gadget.
This adds C++ support to the project and adds libcamera as an
optional external dependency.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
main: Rename V4L2 option to 'd' 2023-01-16T07:52:59+00:00 Kieran Bingham kieran.bingham@ideasonboard.com 2022-12-14T23:01:16+00:00 66f0f93b78474109aa946ec5cd429d0d13d052f0 Use the option 'd' to specify a v4l2 capture device. This will free up the use of option 'c' for 'camera' identifiers based on libcamera. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Use the option 'd' to specify a v4l2 capture device. This will free up
the use of option 'c' for 'camera' identifiers based on libcamera.

Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
uvc-gadget v0.2.0 2023-01-12T11:39:48+00:00 Kieran Bingham kieran.bingham@ideasonboard.com 2023-01-12T11:39:48+00:00 193bec618c874e011a759b4f1ea590ac96ae694c This release extends UVC Gadget with the ability to provide a 'slideshow' source. This can assist in the testing of performance and capabilities of a UVC Gadget based device, by providing a known set of data frames and configurations to stream to the host. Further more this release contains: - lib/timer: Add timer infrastructure - lib/jpg-source: Constrain fps These allow sources with out a controlling device to be configured to deliver at the rate requested by the host. Finally, the Makefile 'helper' is fixed to correctly call the install target in ninja. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This release extends UVC Gadget with the ability to provide a
'slideshow' source.

This can assist in the testing of performance and capabilities of a UVC
Gadget based device, by providing a known set of data frames and
configurations to stream to the host.

Further more this release contains:
 - lib/timer: Add timer infrastructure
 - lib/jpg-source: Constrain fps

These allow sources with out a controlling device to be configured to
deliver at the rate requested by the host.

Finally, the Makefile 'helper' is fixed to correctly call the install
target in ninja.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
main: add support for slideshow_source 2022-12-06T14:42:12+00:00 Paul Elder paul.elder@ideasonboard.com 2022-11-23T07:33:02+00:00 6b6681eb10dc56ff3b796ba070246803c3b34c69 Add facilities in main() to allow selection and usage of slideshow_source. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Add facilities in main() to allow selection and usage of
slideshow_source.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>