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

Signed-off-by: Mateusz Urbańczyk <urbanczyk@google.com>
1 file changed
tree: ed211a6cfe0a704aaf3f579a2730f9e3bab30bd2
  1. include/
  2. lib/
  3. scripts/
  4. src/
  5. .gitignore
  6. Makefile
  7. meson.build
  8. README.md
README.md

uvcgadget - UVC gadget C library

uvcgadget is a pure C library that implements handling of UVC gadget functions.

Utilities

  • uvc-gadget - Sample test application

Build instructions:

To compile:

$ meson build
$ ninja -C build

Cross compiling instructions:

Cross compilation can be managed by meson. Please read the directions at https://mesonbuild.com/Cross-compilation.html for detailed guidance on using meson.

In brief summary:

$ meson build --cross <meson cross file>
$ ninja -C build