]> git.sesse.net Git - nageru/blob - shared/va_display.h
395ecbb5f1f007412e2605440bb1a59c88502d83
[nageru] / shared / va_display.h
1 #ifndef _VA_DISPLAY_H
2 #define _VA_DISPLAY _H1
3
4 #include <va/va.h>
5 #include <X11/Xlib.h>
6
7 #include <memory>
8 #include <string.h>
9
10 struct VADisplayWithCleanup {
11         ~VADisplayWithCleanup();
12
13         VADisplay va_dpy;
14         Display *x11_display = nullptr;
15         bool can_use_zerocopy = true;  // For H.264 encoding in Nageru.
16         int drm_fd = -1;
17 };
18 std::unique_ptr<VADisplayWithCleanup> va_open_display(const std::string &va_display);  // Can return nullptr on failure.
19
20 #endif  // !defined(_VA_DISPLAY_H)