From 4d9897c5aa5376f89e0d5ed1534536f680939e0d Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Tue, 10 Jan 2023 11:58:04 +0000 Subject: lib: Add video_source_type enumeration 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 Signed-off-by: Daniel Scally --- lib/slideshow-source.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/slideshow-source.c') diff --git a/lib/slideshow-source.c b/lib/slideshow-source.c index 42a42a9..6eeab72 100644 --- a/lib/slideshow-source.c +++ b/lib/slideshow-source.c @@ -367,6 +367,7 @@ struct video_source *slideshow_video_source_create(const char *img_dir) memset(src, 0, sizeof *src); src->src.ops = &slideshow_source_ops; + src->src.type = VIDEO_SOURCE_STATIC; strncpy(src->img_dir, img_dir, sizeof(src->img_dir)); -- cgit v1.2.3