+
+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.