54 Commits

Author SHA1 Message Date
ecc2b95670 feat: Implement Wayland screen sharing POC and related fixes 2025-08-14 06:15:31 +02:00
da11bcf541 docs: Update lessons_learned.md with recent Wayland adaptation progress 2025-08-14 05:19:32 +02:00
65b153eb50 docs: Update lessons learned with D-Bus and QDBus API fixes
This commit updates the lessons learned document to include details about
the D-Bus connection issues encountered when running the wayland_poc
executable on the host. It covers the fixes for method name mismatches
(PickSource to SelectSources), argument type mismatches (string to
QDBusObjectPath), and QDBusMessage API versioning.

This provides a more complete record of the debugging process for the
xdg-desktop-portal interaction.
2025-08-14 04:38:18 +02:00
e760af9f43 docs: Document lessons learned during Wayland grabber adaptation
This commit adds a comprehensive document summarizing the challenges,
debugging steps, and solutions encountered while attempting to adapt
the Hyperion Grabber for Wayland. It covers issues related to build
environments, PipeWire header compilation, and xdg-desktop-portal
interaction.

This document serves as a reference for future development and
troubleshooting efforts.
2025-08-14 04:28:05 +02:00
710918a622 feat: Refactor wayland_poc to use QDBus for xdg-desktop-portal interaction
This commit refactors the wayland_poc executable to use Qt's QDBus
module for interacting with xdg-desktop-portal. This approach bypasses
the problematic direct inclusion of PipeWire session manager headers
(e.g., session-manager.h) that were causing persistent compilation errors.

The wayland_poc now focuses solely on requesting screen capture permission
via D-Bus and retrieving the PipeWire node ID, without attempting to
create or manage PipeWire streams directly.

This change aims to provide a working foundation for the xdg-desktop-portal
interaction, which can then be integrated with the core PipeWire stream
capture logic (demonstrated by tutorial5.c).
2025-08-14 04:26:53 +02:00
c7a4c49e36 feat: Add Dockerfile for reproducible build environment
This commit introduces a Dockerfile to create a reproducible build
environment for the Hyperion Grabber project. This aims to address
persistent compilation issues related to header file discovery on
the host system.

The Dockerfile sets up an Arch Linux base image, installs necessary
dependencies (Qt5, PipeWire, GLib, CMake, etc.), copies the source
code, and attempts to build the project within the container.

This approach provides an isolated and consistent environment, which
should help in diagnosing and resolving build-time problems.
2025-08-14 03:24:06 +02:00
cdc253bbc7 feat: Add Wayland screen capture POC using PipeWire
This commit introduces a standalone proof-of-concept (POC) for screen
capture on Wayland using PipeWire and xdg-desktop-portal.

The POC demonstrates:
- Initializing PipeWire context and core.
- Requesting screen capture permission via xdg-desktop-portal, which
  triggers a user consent dialog.
- Receiving the PipeWire node ID for the selected screen/window.
- Connecting a PipeWire stream to the capture node.
- Processing a single video frame from the PipeWire stream.
- Converting the raw frame data into a QImage and saving it as a PNG file.

This POC serves as a foundational step towards adapting the Hyperion
grabber to work natively on Wayland, replacing the existing X11-specific
grabbing logic.

Further work will involve integrating this logic into the main grabber
application and handling continuous frame processing.
2025-08-14 03:02:54 +02:00
902f88bb24 Feat: Add image send logging
Added a qDebug() statement in hgx11::_sendImage() to log when an image
is created and an attempt is made to send it to the Hyperion server.
This will help determine if the image grabbing and sending pipeline is
active.
2025-08-14 02:49:34 +02:00
3923643708 Feat: Add connection success logging
Added a qDebug() statement in hgx11net::_connectHost() to log a
successful connection to the Hyperion server. This will help confirm
that the network connection is established before any commands are
attempted to be sent.
2025-08-14 02:48:26 +02:00
cd9a45c4f6 Feat: Add logging for outgoing JSON commands
Added a qDebug() statement in hgx11net::_sendCommand() to log the JSON
command string just before it is sent to the Hyperion server. This
will help in debugging why no results are appearing on the Hyperion
end, by confirming if commands are being sent and what their content is.
2025-08-14 02:47:38 +02:00
b6239241c9 Fix: Malformed JSON due to incorrect priority string construction
The JSON output sent to the Hyperion server was malformed, specifically
the "priority" field, leading to an "unterminated object" error.
This was caused by the _hyperionPriority_m variable (and
subsequently _priority_m in hgx11net) containing the literal
"priority:" string, which was then redundantly added during JSON
string construction.

This commit modifies:
- hgx11.cpp: To store only the numerical priority value in
  _hyperionPriority_m.
- hgx11net.cpp: To explicitly add the "priority:" key during JSON
  string construction in all relevant functions (clearLeds,
  setLedColor, _colorAdjustment, _thresholdAdjustment,
  _transformdAdjustment, _temperatureAdjustment, and _setImgSize).

This ensures that the generated JSON is correctly formatted.
2025-08-14 02:26:06 +02:00
53d90d0f91 Revert "feat: Add JSON logging to hgx11net.cpp"
This reverts commit 5a5f15fcca49faf7cadc2608ec8fe0543fe76a6d.
2025-08-14 02:08:00 +02:00
5a5f15fcca feat: Add JSON logging to hgx11net.cpp
Added qDebug() statements to log the JSON commands being sent to Hyperion for debugging purposes.
2025-08-14 02:07:10 +02:00
8ff291c4b4 feat: Add debug logging to hgx11damage.cpp
Added qDebug() statements to trace the execution flow and print out important values in the damage monitoring thread.
This will help to identify if X11 damage events are being received.
2025-08-14 01:25:50 +02:00
9eda38519e feat: Add debug logging to main.cpp
Added qDebug() statements to trace the execution flow and print out important values in the main function.
This will help to identify if the application is exiting prematurely.
2025-08-14 01:21:24 +02:00
06e4555269 feat: Add debug logging to hgx11grab.cpp
Added qDebug() statements to trace the execution flow and print out important values in the screen grabbing process.
This will help to identify the root cause of the screen grabbing issue.
2025-08-14 00:59:25 +02:00
kevin
961afd2d9a Adds the Hyperion priority option. 2020-11-22 11:38:49 -05:00
kevin
7714250646 Minor fixes / improvements. 2020-11-22 09:44:44 -05:00
kevin
5f4e7ec6c2 Fixes the spacing on the help text. 2019-07-02 07:06:48 -04:00
kevin
46581fcab9 Wrong key name. 2019-06-27 08:14:45 -04:00
kevin
44ec8d98cf Add option to change X11 scaling filter 2019-06-27 08:12:57 -04:00
kevin
ed7ba36704 Block until image data is sent to Hyperion.
This prevents the socket buffer to overflow if the connection is too slow.
2019-06-27 07:43:15 -04:00
kevin
7d9b6e8b6c Useless conditional. 2019-06-26 19:18:57 -04:00
kevin
e68da0a4cc Add a new method for determining user inactivity.
Fix some bugs.
2019-06-26 19:15:32 -04:00
kevinlekiller
d1f4f80278
Wrong folder 2019-06-24 16:13:58 -04:00
kevin
44399502f2 Remove temp file 2019-06-24 16:00:44 -04:00
kevin
621a8e2ce5 Set release flag on cmake 2019-06-24 15:59:34 -04:00
kevin
8df1ef57e5 Merge branch 'master' of github.com:kevinlekiller/Hyperion_Grabber_X11_QT 2019-06-24 15:58:28 -04:00
kevin
3f2c055515 Slightly optimize performance by caching some variables and frameskipping in the damage loop. 2019-06-24 15:57:32 -04:00
kevinlekiller
d6c269b1b3
Update README.md 2019-06-24 14:04:09 -04:00
kevinlekiller
fc96668609
This systemd system service clears the LED's
The systemd user service might not clear the LED's because systemd doesn't allow enough time for the grabber to gracefully shutdown, so this service ensures the LED's do turn off, unfortunately this doesn't occur on user logout, putting a ExecStop in the user script could also be a viable option.
2019-06-24 14:02:30 -04:00
kevinlekiller
6fdfd6b022
This assures the X server is started.
The systemd service would not start because the wrong target was used and the X server would start after the grabber started.
2019-06-24 13:58:40 -04:00
kevin
c0657c13e5 I misunderstood the description of QImage::Format_RGBA8888, I figured it converted the color order to RGB regardless of if the arch is little or big endian.
I've not tested on a big endian machine but using ARGB32 produces the right order of colors.
2019-06-24 11:22:22 -04:00
kevin
07ba3830a3 Reduce CPU usage by more than half by using QImage to do ABGR -> RGB conversion.
Now the main CPU hog is base64encoding the image data to send to Hyperion.
Don't sent signal as exit code.
2019-06-24 09:18:22 -04:00
kevinlekiller
e737d18121
Workaround for system --user issue 2019-06-23 15:30:03 -04:00
kevin
ef28856d8b Remove uneeded package from CMakeLists 2019-06-23 14:17:38 -04:00
kevinlekiller
298e609599
Update README.md 2019-06-23 14:15:54 -04:00
kevinlekiller
01d8a06e8e
Create hgx11.service
systemd unit file example
2019-06-23 14:06:34 -04:00
kevinlekiller
310e1ec7c9
Update README.md 2019-06-23 14:03:28 -04:00
kevinlekiller
ed7cba7853
Update README.md 2019-06-23 13:57:10 -04:00
kevinlekiller
52b83433e6
Update README.md 2019-06-23 13:55:49 -04:00
kevinlekiller
fab2ef9981
Update README.md 2019-06-23 13:44:48 -04:00
kevin
39235f1df3 More refactoring. 2019-06-23 13:30:01 -04:00
kevin
ad3fc52f43 Refactor 2019-06-23 13:17:00 -04:00
kevin
c4cc927df7 Only convert this variable once to int. 2019-06-23 12:49:06 -04:00
kevin
d39d4a687c Add functions / arguments to adjust LED's 2019-06-23 12:36:27 -04:00
kevin
02fc46794f Fix LED's not turning off when program ends 2019-06-23 09:10:24 -04:00
kevin
acafd14ec2 Properly reconnect to Hyperion server on disconnects. 2019-06-23 01:02:34 -04:00
kevin
5441d1aba6 After each image grab some resources need to be reset / freed.
Add a .gitignore for various Cmake files.
2019-06-23 00:13:55 -04:00
kevinlekiller
128197c9e3
Update LICENSE 2019-06-22 22:53:40 -04:00