Skip to content

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:

It has to be noted that this change is not backwards compatible, as it clearly changes the way in which slides are played.

Merge request reports

Loading