2021-08-12 19:11:40 +00:00
|
|
|
#ifndef SUNSHINE_VAAPI_H
|
|
|
|
#define SUNSHINE_VAAPI_H
|
2021-06-04 19:12:06 +00:00
|
|
|
|
2021-08-12 19:11:40 +00:00
|
|
|
#include "misc.h"
|
2021-06-04 19:12:06 +00:00
|
|
|
#include "sunshine/platform/common.h"
|
2021-08-12 19:11:40 +00:00
|
|
|
|
|
|
|
namespace egl {
|
|
|
|
struct surface_descriptor_t;
|
|
|
|
}
|
2021-08-05 19:24:52 +00:00
|
|
|
namespace va {
|
2021-08-26 20:06:59 +00:00
|
|
|
/**
|
|
|
|
* Width --> Width of the image
|
|
|
|
* Height --> Height of the image
|
|
|
|
* offset_x --> Horizontal offset of the image in the texture
|
|
|
|
* offset_y --> Vertical offset of the image in the texture
|
|
|
|
* file_t card --> The file descriptor of the render device used for encoding
|
|
|
|
*/
|
|
|
|
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, bool vram);
|
|
|
|
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, int offset_x, int offset_y, bool vram);
|
|
|
|
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, file_t &&card, int offset_x, int offset_y, bool vram);
|
2021-08-06 13:55:38 +00:00
|
|
|
|
2021-08-26 20:06:59 +00:00
|
|
|
// Ensure the render device pointed to by fd is capable of encoding h264 with the hevc_mode configured
|
2021-08-15 20:15:24 +00:00
|
|
|
bool validate(int fd);
|
|
|
|
|
2021-08-06 13:55:38 +00:00
|
|
|
int init();
|
2021-08-05 19:24:52 +00:00
|
|
|
} // namespace va
|
2021-06-04 19:12:06 +00:00
|
|
|
#endif
|