docs: Update documentation for Wayland POC and Qt6
This commit is contained in:
parent
7dbc11afe1
commit
1ff025ce77
13
README.md
13
README.md
@ -7,7 +7,18 @@ Uses [libXdamage](https://www.freedesktop.org/wiki/Software/XDamage/) to detect
|
||||
|
||||
## Compilation
|
||||
|
||||
To compile run `cmake . && make`, qt5 (core / network ; qt5-base on arch) / x11 (damage / render / xlib ; libx11 / libxdamage / libxrender on arch) libraries are required.
|
||||
To compile run `cmake . && make`, qt6 (core / gui / multimedia / multimediawidgets ; qt6-base, qt6-multimedia on arch) / x11 (damage / render / xlib ; libx11 / libxdamage / libxrender on arch) libraries are required.
|
||||
|
||||
## Wayland Proof of Concept
|
||||
|
||||
This project now includes a proof-of-concept Wayland grabber, `wayland_poc`. This executable is used to test and develop screen capturing on Wayland.
|
||||
|
||||
To build and run the Wayland POC:
|
||||
1. Make sure you have the required dependencies installed (Qt6, PipeWire).
|
||||
2. Build the project: `cmake . && make`
|
||||
3. Run the executable: `./wayland_poc`
|
||||
|
||||
This will open a window and, after you grant permission in the system's dialog, it will display a capture of your screen.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -123,4 +123,15 @@ This document summarizes the key challenges, debugging steps, and solutions enco
|
||||
|
||||
* **User Clarification:** The user has clarified that the Proof of Concept (POC) only needs to run in the current environment, and an implementation relying on KDE-specific tools is acceptable.
|
||||
* **New Strategy:** Based on this clarification, the focus for Wayland screen sharing will shift from the generic `xdg-desktop-portal` D-Bus interface to leveraging KDE-specific Wayland protocols, specifically `zkde_screencast_unstable_v1`, as observed in Spectacle's source code.
|
||||
* **Implication:** This means the `wayland_poc.cpp` will be adapted to use the `zkde_screencast_unstable_v1` protocol directly, rather than going through `xdg-desktop-portal`. This approach is expected to be more direct and potentially simpler for the current environment.
|
||||
* **Implication:** This means the `wayland_poc.cpp` will be adapted to use the `zkde_screencast_unstable_v1` protocol directly, rather than going through `xdg-desktop-portal`. This approach is expected to be more direct and potentially simpler for the current environment.
|
||||
|
||||
## 11. Migrating to Qt6 and Modern Screen Capture
|
||||
|
||||
* **Problem:** The KDE-specific Wayland protocol approach, while promising, still faced compilation issues related to missing headers (`QNativeInterface`, `QWaylandScreen`) in the user's Qt 5 environment.
|
||||
* **Decision:** To resolve these issues and modernize the project, the decision was made to migrate the `wayland_poc` to Qt6.
|
||||
* **Initial Qt6 Migration Issues:**
|
||||
* The initial attempt to use `QNativeInterface` and `QWaylandScreen` failed because the user's installed Qt6 version (6.4.4) was too old. These features were introduced in later versions (6.5 and 6.7).
|
||||
* **Revised Qt6 Strategy:**
|
||||
* Instead of relying on low-level native interfaces, the `wayland_poc` was rewritten to use the high-level `QScreenCapture` API from the Qt Multimedia module. This is the recommended approach for screen capture in modern Qt6.
|
||||
* This required adding the `Multimedia` and `MultimediaWidgets` components to the `CMakeLists.txt` file.
|
||||
* **Successful Build:** After these changes, the `wayland_poc` executable was successfully built and run, demonstrating a working Wayland screen capture on the user's system.
|
||||
Loading…
x
Reference in New Issue
Block a user