fix(linux): add frame processing latency and logging improvements (#2502)
This commit is contained in:
@@ -1685,7 +1685,9 @@ namespace platf {
|
||||
if (!fb->handles[0]) {
|
||||
BOOST_LOG(error) << "Couldn't get handle for DRM Framebuffer ["sv << plane->fb_id << "]: Probably not permitted"sv;
|
||||
BOOST_LOG((window_system != window_system_e::X11 || config::video.capture == "kms") ? fatal : error)
|
||||
<< "You must run [sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))] for KMS display capture to work!"sv;
|
||||
<< "You must run [sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))] for KMS display capture to work!\n"sv
|
||||
<< "If you installed from AppImage or Flatpak, please refer to the official documentation:\n"sv
|
||||
<< "https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/setup.html#install"sv;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ namespace va {
|
||||
return -1;
|
||||
}
|
||||
|
||||
BOOST_LOG(debug) << "vaapi vendor: "sv << vaQueryVendorString(display.get());
|
||||
BOOST_LOG(info) << "vaapi vendor: "sv << vaQueryVendorString(display.get());
|
||||
|
||||
*hw_device_buf = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI);
|
||||
auto ctx = (AVHWDeviceContext *) (*hw_device_buf)->data;
|
||||
|
||||
@@ -679,6 +679,7 @@ namespace platf {
|
||||
}
|
||||
else {
|
||||
auto img_cookie = xcb::shm_get_image_unchecked(xcb.get(), display->root, offset_x, offset_y, width, height, ~0, XCB_IMAGE_FORMAT_Z_PIXMAP, seg, 0);
|
||||
auto frame_timestamp = std::chrono::steady_clock::now();
|
||||
|
||||
xcb_img_t img_reply { xcb::shm_get_image_reply(xcb.get(), img_cookie, nullptr) };
|
||||
if (!img_reply) {
|
||||
@@ -691,6 +692,7 @@ namespace platf {
|
||||
}
|
||||
|
||||
std::copy_n((std::uint8_t *) data.data, frame_size(), img_out->data);
|
||||
img_out->frame_timestamp = frame_timestamp;
|
||||
|
||||
if (cursor) {
|
||||
blend_cursor(shm_xdisplay.get(), *img_out, offset_x, offset_y);
|
||||
|
||||
Reference in New Issue
Block a user