]> git.sesse.net Git - nageru/blob - futatabi/vaapi_jpeg_decoder.h
Log a warning when we kill a client that is not keeping up.
[nageru] / futatabi / vaapi_jpeg_decoder.h
1 #ifndef _VAAPI_JPEG_DECODER_H
2 #define _VAAPI_JPEG_DECODER_H 1
3
4 #include <X11/Xlib.h>
5 #include <memory>
6 #include <string>
7 #include <va/va.h>
8
9 struct Frame;
10
11 struct VADisplayWithCleanup {
12         ~VADisplayWithCleanup();
13
14         VADisplay va_dpy;
15         Display *x11_display = nullptr;
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 std::string get_usable_va_display();
20
21 void init_jpeg_vaapi();
22 std::shared_ptr<Frame> decode_jpeg_vaapi(const std::string &jpeg);
23
24 extern bool vaapi_jpeg_decoding_usable;
25
26 #endif  // !defined(_VAAPI_JPEG_DECODER_H)