mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
kmsgrab: Support multi-plane formats
This commit is contained in:
@@ -351,18 +351,22 @@ public:
|
||||
display.get(),
|
||||
std::move(fds),
|
||||
{
|
||||
prime.objects[prime.layers[0].object_index[0]].fd,
|
||||
(int)prime.width,
|
||||
(int)prime.height,
|
||||
(int)prime.layers[0].offset[0],
|
||||
(int)prime.layers[0].pitch[0],
|
||||
{prime.objects[prime.layers[0].object_index[0]].fd, -1, -1, -1},
|
||||
0,
|
||||
0,
|
||||
{prime.layers[0].pitch[0], 0, 0, 0},
|
||||
{prime.layers[0].offset[0], 0, 0, 0}
|
||||
},
|
||||
{
|
||||
prime.objects[prime.layers[0].object_index[1]].fd,
|
||||
(int)prime.width / 2,
|
||||
(int)prime.height / 2,
|
||||
(int)prime.layers[0].offset[1],
|
||||
(int)prime.layers[0].pitch[1],
|
||||
{prime.objects[prime.layers[0].object_index[1]].fd, -1, -1, -1},
|
||||
0,
|
||||
0,
|
||||
{prime.layers[0].pitch[1], 0, 0, 0},
|
||||
{prime.layers[0].offset[1], 0, 0, 0}
|
||||
});
|
||||
|
||||
if(!nv12_opt) {
|
||||
@@ -634,4 +638,4 @@ std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, file_t &
|
||||
|
||||
return egl;
|
||||
}
|
||||
} // namespace va
|
||||
} // namespace va
|
||||
|
||||
Reference in New Issue
Block a user