]> git.sesse.net Git - nageru/blobdiff - image_input.h
Name the ImageInput update threads, too.
[nageru] / image_input.h
index 659404ea7c5954a191aeda2faf72e3ef774544e7..437d9c2db72ace8b45de8698d2f61c2147ce3786 100644 (file)
@@ -1,16 +1,17 @@
 #ifndef _IMAGE_INPUT_H
 #define _IMAGE_INPUT_H 1
 
+#include <epoxy/gl.h>
+#include <movit/flat_input.h>
+#include <stdbool.h>
+#include <time.h>
+#include <cstdint>
 #include <map>
 #include <memory>
 #include <mutex>
 #include <string>
 #include <thread>
 
-#include <time.h>
-
-#include <movit/flat_input.h>
-
 // An output that takes its input from a static image, loaded with ffmpeg.
 // comes from a single 2D array with chunky pixels. The image is refreshed
 // from disk about every second.
@@ -28,12 +29,12 @@ private:
                timespec last_modified;
        };
 
-       std::string filename;
+       std::string filename, pathname;
        std::shared_ptr<const Image> current_image;
 
-       static std::shared_ptr<const Image> load_image(const std::string &filename);
-       static std::shared_ptr<const Image> load_image_raw(const std::string &filename);
-       static void update_thread_func(const std::string &filename, const timespec &first_modified);
+       static std::shared_ptr<const Image> load_image(const std::string &filename, const std::string &pathname);
+       static std::shared_ptr<const Image> load_image_raw(const std::string &pathname);
+       static void update_thread_func(const std::string &filename, const std::string &pathname, const timespec &first_modified);
        static std::mutex all_images_lock;
        static std::map<std::string, std::shared_ptr<const Image>> all_images;
        static std::map<std::string, std::thread> update_threads;