]> git.sesse.net Git - nageru/blobdiff - shared/va_display.h
IWYU-fix nageru/*.cpp.
[nageru] / shared / va_display.h
index 395ecbb5f1f007412e2605440bb1a59c88502d83..9ac925a702739f84be8c06b425c22c016f14628a 100644 (file)
@@ -1,11 +1,12 @@
 #ifndef _VA_DISPLAY_H
-#define _VA_DISPLAY _H1
+#define _VA_DISPLAY_H 1
 
 #include <va/va.h>
 #include <X11/Xlib.h>
 
 #include <memory>
-#include <string.h>
+#include <string>
+#include <vector>
 
 struct VADisplayWithCleanup {
        ~VADisplayWithCleanup();
@@ -15,6 +16,17 @@ struct VADisplayWithCleanup {
        bool can_use_zerocopy = true;  // For H.264 encoding in Nageru.
        int drm_fd = -1;
 };
-std::unique_ptr<VADisplayWithCleanup> va_open_display(const std::string &va_display);  // Can return nullptr on failure.
+
+struct ConfigRequest {
+        std::string name;  // For error texts only.
+        uint32_t rt_format, fourcc;
+
+        // Output.
+        VAConfigID *config_id;
+        VAImageFormat *image_format;
+};
+std::unique_ptr<VADisplayWithCleanup> try_open_va(
+        const std::string &va_display, const std::vector<VAProfile> &desired_profiles, VAEntrypoint entrypoint,
+        const std::vector<ConfigRequest> &desired_configs, VAProfile *chosen_profile, std::string *error);  // Can return nullptr on failure.
 
 #endif  // !defined(_VA_DISPLAY_H)