<feed xmlns='http://www.w3.org/2005/Atom'>
<title>uvc-gadget.git/lib, branch v0.2.0</title>
<subtitle>UVC gadget userspace sample application</subtitle>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/'/>
<entry>
<title>slideshow-source: add slideshow source class</title>
<updated>2022-12-06T14:42:12+00:00</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@ideasonboard.com</email>
</author>
<published>2022-11-23T07:33:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=becfda202621418f2304649249d4437481b691c1'/>
<id>becfda202621418f2304649249d4437481b691c1</id>
<content type='text'>
The slideshow_source class is an implementation of the video_source
class that streams a set of images as video.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The slideshow_source class is an implementation of the video_source
class that streams a set of images as video.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/jpg-source: Constrain fps</title>
<updated>2022-11-30T13:48:26+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-30T13:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=d2427718c9e91870ceddc032bcfce51def667596'/>
<id>d2427718c9e91870ceddc032bcfce51def667596</id>
<content type='text'>
As written the fps output by the jpg-source is unconstrained; it will
simply fill buffers as quickly as the USB subsysem can handle them.
This is not particularly realistic and also means that the frame rates
configured (and thus expected) by the host are not being adhered to.
Use the new timer infrastructure to slow down the buffer fill operation
such that the frame rates seen match those configured by the host.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As written the fps output by the jpg-source is unconstrained; it will
simply fill buffers as quickly as the USB subsysem can handle them.
This is not particularly realistic and also means that the frame rates
configured (and thus expected) by the host are not being adhered to.
Use the new timer infrastructure to slow down the buffer fill operation
such that the frame rates seen match those configured by the host.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/timer: Add timer infrastructure</title>
<updated>2022-11-30T13:48:26+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-30T13:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=1c18c451f3a48507e876cfdb03c0a6f2187f62cb'/>
<id>1c18c451f3a48507e876cfdb03c0a6f2187f62cb</id>
<content type='text'>
Some sources simply fill the buffers passed by the USB subsystem and
return them as quickly as possible. Particularly with compressed
formats operating at superspeed this rapidly results in unrealistic
frame rates.

Add infrastructure that allows us to define a specific
framerate and introduce blocking calls that constrain those sources
to the framerates expected by the host.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some sources simply fill the buffers passed by the USB subsystem and
return them as quickly as possible. Particularly with compressed
formats operating at superspeed this rapidly results in unrealistic
frame rates.

Add infrastructure that allows us to define a specific
framerate and introduce blocking calls that constrain those sources
to the framerates expected by the host.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: uvc: Respond to control requests with dummy values</title>
<updated>2022-11-22T16:08:30+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-22T15:34:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=0df9d3ad860ecd78f1bf8ad6bd5ceccaf40a9e07'/>
<id>0df9d3ad860ecd78f1bf8ad6bd5ceccaf40a9e07</id>
<content type='text'>
Without a response, the host will assume there has been an error and
throw a bunch of errors. The noise of those errors makes it difficult
to see what's going on properly, so return a dummy response that
silences the errors until the functionality is properly implemented.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without a response, the host will assume there has been an error and
throw a bunch of errors. The noise of those errors makes it difficult
to see what's going on properly, so return a dummy response that
silences the errors until the functionality is properly implemented.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: uvc: Add control names in output prints</title>
<updated>2022-11-22T16:08:30+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-22T15:34:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=70d68062373502d159771b53b3e6d94c0557a0da'/>
<id>70d68062373502d159771b53b3e6d94c0557a0da</id>
<content type='text'>
It's easier to see what's going on at a glance when the output is
human-readable, so replace the control codes with their names.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's easier to see what's going on at a glance when the output is
human-readable, so replace the control codes with their names.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: uvc: Drop maxsize</title>
<updated>2022-11-22T16:08:24+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-22T15:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=bca24b4b5b2c18b844e8da80ac19819944f80a93'/>
<id>bca24b4b5b2c18b844e8da80ac19819944f80a93</id>
<content type='text'>
The maxsize field of struct uvc_device is probably unecessary even if
it weren't currently fixed at 0. It's used to set dwMaxVideoFrameSize
in addition to the sizeimage member of a struct v4l2_pix_fmt (multiplied
in the latter instance by 1.5x). The documentary definitions for those
two values are such that they should be identical though, so simply
set dwMaxVideoFrameSize to width*height*2 (to maintain commonality
with other UVC Video devices) and use that to set the sizeimage.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The maxsize field of struct uvc_device is probably unecessary even if
it weren't currently fixed at 0. It's used to set dwMaxVideoFrameSize
in addition to the sizeimage member of a struct v4l2_pix_fmt (multiplied
in the latter instance by 1.5x). The documentary definitions for those
two values are such that they should be identical though, so simply
set dwMaxVideoFrameSize to width*height*2 (to maintain commonality
with other UVC Video devices) and use that to set the sizeimage.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: events: Use list_for_each_entry() instead of the _safe() version</title>
<updated>2022-11-22T16:07:58+00:00</updated>
<author>
<name>Daniel Scally</name>
<email>dan.scally@ideasonboard.com</email>
</author>
<published>2022-11-22T15:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=d47c0701f2250889970afa6b5af025ea0a02b3be'/>
<id>d47c0701f2250889970afa6b5af025ea0a02b3be</id>
<content type='text'>
For the UVC_EVENT_STREAMOFF event, the callback frees _other_ events
because it's closing down the pipe. The use of the _safe() version
of the list iterator results in a use-after-free of those events
because they're fetched before the callback that frees them. The
_safe() version is unecessary here; no other callback's behaviour
requires it.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the UVC_EVENT_STREAMOFF event, the callback frees _other_ events
because it's closing down the pipe. The use of the _safe() version
of the list iterator results in a use-after-free of those events
because they're fetched before the callback that frees them. The
_safe() version is unecessary here; no other callback's behaviour
requires it.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jpg-source: add jpg source class</title>
<updated>2022-11-22T16:05:21+00:00</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@ideasonboard.com</email>
</author>
<published>2022-11-22T15:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=bb83c7135540d3391f4d0b46911c8aedbcd84313'/>
<id>bb83c7135540d3391f4d0b46911c8aedbcd84313</id>
<content type='text'>
The jpg_source class is an implementation of the video_source class that
streams a still jpg image as video.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The jpg_source class is an implementation of the video_source class that
streams a still jpg image as video.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test-source: add test source class</title>
<updated>2022-11-22T16:02:25+00:00</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@ideasonboard.com</email>
</author>
<published>2022-11-22T10:54:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=7dc71fd6fef7a242d108d5c8cb7683aa9fd4511f'/>
<id>7dc71fd6fef7a242d108d5c8cb7683aa9fd4511f</id>
<content type='text'>
The test_source class is an implementation of the video_source class
that generates a test pattern in userspace to provide video. We have
some operations which are implemented as no-ops. To quiet the
compiler warnings this causes, flag their arguments as unused.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test_source class is an implementation of the video_source class
that generates a test pattern in userspace to provide video. We have
some operations which are implemented as no-ops. To quiet the
compiler warnings this causes, flag their arguments as unused.

Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>v4l2: write size value when dequeueing buffer</title>
<updated>2022-11-22T16:02:25+00:00</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@ideasonboard.com</email>
</author>
<published>2022-11-22T10:54:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ideasonboard.org/uvc-gadget.git/commit/?id=34477392ceff6d4d5473679f33a6a73cbe7326de'/>
<id>34477392ceff6d4d5473679f33a6a73cbe7326de</id>
<content type='text'>
When we dequeue a buffer from a V4L2 device, it would be good to know
the size of the buffer. Save it to our struct video_buffer when
dequeueing.

Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we dequeue a buffer from a V4L2 device, it would be good to know
the size of the buffer. Save it to our struct video_buffer when
dequeueing.

Reviewed-by: Daniel Scally &lt;dan.scally@ideasonboard.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Signed-off-by: Paul Elder &lt;paul.elder@ideasonboard.com&gt;
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
