]> git.sesse.net Git - nageru/blobdiff - shared/va_display.h
Move VADisplayWithCleanup into its own header file, in shared/.
[nageru] / shared / va_display.h
diff --git a/shared/va_display.h b/shared/va_display.h
new file mode 100644 (file)
index 0000000..395ecbb
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef _VA_DISPLAY_H
+#define _VA_DISPLAY _H1
+
+#include <va/va.h>
+#include <X11/Xlib.h>
+
+#include <memory>
+#include <string.h>
+
+struct VADisplayWithCleanup {
+       ~VADisplayWithCleanup();
+
+       VADisplay va_dpy;
+       Display *x11_display = nullptr;
+       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.
+
+#endif  // !defined(_VA_DISPLAY_H)