Skip to content

Commit 2f99d38

Browse files
bqueninclaude
andauthored
Add pipewire-capture debug logging support (#205)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5efd809 commit 2f99d38

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
# Linux only - window capture (X11 fallback)
4040
"python-xlib>=0.33; sys_platform == 'linux'",
4141
# Linux only - window capture (Wayland via PipeWire portal)
42-
"pipewire-capture>=0.2.5; sys_platform == 'linux'",
42+
"pipewire-capture>=0.2.6; sys_platform == 'linux'",
4343
# GPU acceleration (CUDA 12) - Windows and Linux
4444
"nvidia-cublas-cu12; sys_platform == 'win32' or sys_platform == 'linux'",
4545
"nvidia-cudnn-cu12; sys_platform == 'win32' or sys_platform == 'linux'",

src/interpreter/capture/linux_wayland.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import numpy as np
1313
from numpy.typing import NDArray
1414
from pipewire_capture import CaptureStream as PwCaptureStream
15-
from pipewire_capture import PortalCapture, is_available
15+
from pipewire_capture import PortalCapture, init_logging, is_available
1616

1717
from .. import log
1818

@@ -28,6 +28,16 @@ def is_wayland_available() -> bool:
2828
return is_available()
2929

3030

31+
def configure_logging(debug: bool) -> None:
32+
"""Configure pipewire-capture logging level.
33+
34+
Args:
35+
debug: If True, enable debug logging in pipewire-capture.
36+
"""
37+
if debug:
38+
init_logging("debug")
39+
40+
3141
def get_window_list() -> list[dict]:
3242
"""Return empty list - Wayland uses portal picker instead of window enumeration."""
3343
return []

src/interpreter/gui/app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ def run():
136136

137137
# Configure logging
138138
log.configure(level="DEBUG" if args.debug else "INFO")
139+
140+
# Configure pipewire-capture logging on Wayland (must be after log.configure)
141+
if platform.system() == "Linux" and os.environ.get("WAYLAND_DISPLAY"):
142+
from ..capture.linux_wayland import configure_logging as configure_wayland_logging
143+
144+
configure_wayland_logging(args.debug)
145+
139146
logger = log.get_logger()
140147
logger.info(f"interpreter v{__version__}")
141148

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)