DarkDust
New Member
The image slideshow currently has limitations on how many images it can actually show. This depends on the size of the decompressed images in memory and typically only supports a few dozen images.
I started working on removing this restriction and opened a ticket about this on Mantis, referencing my work-in-progress, but it seems Mantis is either down or otherwise unavailable. After feedback from R1CH, I further improved the design and it now supports an arbitrary number of images, loaded on-demand in a worker thread so the video rendering thread isn't blocked by loading the images.
Additionally, I changed the behaviour of "randomization": the current implementation selects a random image from the whole file list with each step. This can lead to some images getting shown multiple times while others are not or seldom shown over a certain period of time. I changed this to a queue that gets shuffled and once the whole queue was played, gets shuffled again. This guarantees that each image is shown once per loop, but the order in which they appear is random. I hope this is more what people expect, at least it's what I would expect to happen.
Here's my current version: obs-slideshow2.c
Known issue: when loading a few hundred images, OBS blocks for a while. That is already kinda happening with the current slideshow as all images need to be read to determine the maximum resolution. I don't know how to improve on that.
The current version of my slideshow survived a 3h stream (slideshow over a DJ set) without problems or memory leaks and I would like to finalize it.
What do I need to improve/change before this can be merged into the project? Do you want to have an option to choose between the old and new whay randomization is done?
I started working on removing this restriction and opened a ticket about this on Mantis, referencing my work-in-progress, but it seems Mantis is either down or otherwise unavailable. After feedback from R1CH, I further improved the design and it now supports an arbitrary number of images, loaded on-demand in a worker thread so the video rendering thread isn't blocked by loading the images.
Additionally, I changed the behaviour of "randomization": the current implementation selects a random image from the whole file list with each step. This can lead to some images getting shown multiple times while others are not or seldom shown over a certain period of time. I changed this to a queue that gets shuffled and once the whole queue was played, gets shuffled again. This guarantees that each image is shown once per loop, but the order in which they appear is random. I hope this is more what people expect, at least it's what I would expect to happen.
Here's my current version: obs-slideshow2.c
Known issue: when loading a few hundred images, OBS blocks for a while. That is already kinda happening with the current slideshow as all images need to be read to determine the maximum resolution. I don't know how to improve on that.
The current version of my slideshow survived a 3h stream (slideshow over a DJ set) without problems or memory leaks and I would like to finalize it.
What do I need to improve/change before this can be merged into the project? Do you want to have an option to choose between the old and new whay randomization is done?