summaryrefslogtreecommitdiff
path: root/lib/jpg-source.c
AgeCommit message (Collapse)Author
2023-01-16lib: Add video_source_type enumerationDaniel Scally
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>
2022-11-30lib/jpg-source: Constrain fpsDaniel Scally
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 <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
2022-11-22jpg-source: add jpg source classPaul Elder
The jpg_source class is an implementation of the video_source class that streams a still jpg image as video. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>