lib/slideshow-source: Read slides in alphanumerical order
readdir(3) has no guarantees w.r.t order in which the files are read,
in fact, it's close to a random one. Because of that, when passed a
slideshow directory with filenames structure as suggested in
slideshow_source_set_format
function (i.e. 01.jpg, 02.jpg ....)
the images were not taken sequentially, but arbitrarily.
It was tested by running uvc-gadget with -s
option and asserted the
video is played in the expected order, starting from frame 001.jpg
See:
- readdir(3) https://man7.org/linux/man-pages/man3/readdir.3.html
- scandir(3) https://man7.org/linux/man-pages/man3/scandir.3.html
It has to be noted that this change is not backwards compatible, as it clearly changes the way in which slides are played.