Commit graph

390 commits

Author SHA1 Message Date
columbarius
a33034acce screencast: pipewire remove uneeded PW_STREAM_FLAG_MAP_BUFFERS flag 2021-07-02 12:12:17 +02:00
columbarius
6a3832277f screencast: pipewire move buffer information from pwr_on_event to pwr_handle_stream_add_buffer 2021-07-02 12:12:17 +02:00
columbarius
03146fa1d7 screencast: pipewire add {add,remove}_buffer handler 2021-07-02 12:12:17 +02:00
columbarius
9653abc330 screencast: announce supported buffer type 2021-07-02 12:12:17 +02:00
columbarius
ac5c248340 screencast: update pipewire params on buffer change 2021-07-02 09:45:46 +02:00
columbarius
f2d08cc5b5 screencast: create pwr_update_stream_param
This will let us notify pipewire that our buffer has changed and trigger a renegotiation cycle which will take care of reallocating the buffers
2021-07-02 09:45:46 +02:00
columbarius
50cb55ed1d screencast: add logging to pwr_handle_stream_param_changed in pipewire_sreencast.c 2021-07-02 09:45:46 +02:00
columbarius
ab8e3bea00 pipewire: stop announcing a range as the video size
We can only serve a video with a size as send from the compositor,
so no need to announce any range.
2021-07-02 08:58:13 +02:00
columbarius
dee06d015d pipewire: add the striped format inside of build_format 2021-07-02 08:58:13 +02:00
columbarius
773186d2ed pipewire: move enumformat creation into seperate function 2021-07-02 08:58:13 +02:00
GermainZ
668509e317 Fix potential memory corruption when reading bools
As per `man sd_bus_message_read`, boolean items should be read into an
int rather than a bool as the latter can cause memory corruption.
2021-07-01 13:49:31 +02:00
Simon Ser
e23e109e41 Handle POLLHUP
This makes xdpw exit when either the D-Bus daemon, the Wayland
compositor or Pipewire is shut down. This avoids having dangling
non-functional xdpw instances, e.g. when restarting the compositor.

To test, start Sway nested in Sway, run xdpw with
WAYLAND_DISPLAY=wayland-2, and exit the nested Sway.
2021-07-01 11:58:26 +02:00
columbarius
96d2789d8f screencast: don't rely on the structure of xdpw_screencast_instance to convert formats 2021-06-29 15:08:02 +02:00
columbarius
bb24b226e4 screencast: respect the maximal framerate negotiated by pipewire 2021-06-23 09:32:08 +02:00
columbarius
976fa8374d screencast: limit screencast framerate by output framerate 2021-06-23 09:32:08 +02:00
columbarius
6438edb7b9 config: handle missing HOME env variable gracefully
Fixes: https://github.com/emersion/xdg-desktop-portal-wlr/issues/149
2021-06-17 09:37:16 +02:00
Jan Beich
71730982da ci: drop FreeBSD workaround after 22af25749e
inih exposes required CFLAGS/LDFLAGS via pkg-config, so manually
adding /usr/local to search path is no longer necessary.
2021-06-01 18:24:28 +02:00
Simon Ser
65cb6d5630 build: bump version to 0.4.0
Forgot to do it. Again.
2021-06-01 17:34:08 +02:00
Simon Ser
28a82d0568 readme: update IRC channel 2021-05-26 08:35:38 +02:00
Tobias Jakobi
0d23a5ea15 screencast: move xdpw_pwr_stream_destroy() up
- keep the order of functions in-sync with the header
2021-05-24 10:03:40 +02:00
Tobias Jakobi
f60bdcef71 screencast: improve cleanup on error in xdpw_screencast_init()
- currently the cleanup can segfault due to uninitialized
  list objects
- introduce xdpw_pwr_context_destroy() and fixup goto logic
2021-05-24 10:03:40 +02:00
Tobias Jakobi
d2fa4aa5e7 screencast: protect against NULL stream in xdpw_pwr_stream_destroy()
- this allows repeated calls of xdpw_pwr_stream_destroy() on a
  single screencast instance
2021-05-24 10:03:40 +02:00
Tobias Jakobi
dbe71a66c7 screencast: bring function names in line with the wlroots guidelines
- no functional changes
2021-05-24 10:03:40 +02:00
columbarius
b20b9d76d7 config: fix format specifier for max_fps 2021-05-22 12:26:50 +02:00
columbarius
bbd4f9d2b1 doc: add note about the list character of env XDG_CURRENT_DESKTOP 2021-05-21 19:35:58 +02:00
columbarius
feede20314 config: parse XDG_CURRENT_DESKTOP as a list 2021-05-20 22:45:10 +02:00
columbarius
c60b2b6ca8 config: fix memory leak config_home_fallback 2021-05-06 11:52:16 +02:00
Simon Ser
efcbcb60aa contrib/systemd: add ConditionEnvironment
This makes it clear xdpw requires WAYLAND_DISPLAY to be set before
being started.

Inspired by the mako service [1].

[1]: https://github.com/emersion/mako/blob/master/contrib/systemd/mako.service
2021-05-03 18:17:29 -04:00
Simon Ser
884a2e808e readme: add dbus-update-activation-environment command
Add a dbus-update-activation-environment invocation that users can
add to their config file. This should work for most users, assuming
Sway, systemd, and D-Bus activation.

The --systemd flag also imports the variables to the systemd user
session.
2021-05-03 18:07:10 -04:00
Simon Ser
835a928bd4 readme: update "Manual startup" section
Add -r flag to xdpw to make sure any currently running process gets
replaced.

Remove the /usr/lib/xdg-desktop-portal invocation since xdpw can now be
replaced.

Adapt the wording to the latest xdpw changes.
2021-05-03 18:07:10 -04:00
Tobias Langendorf
5d4dd833a4 screenshot: implement PickColor method
closes #129
2021-05-03 23:56:06 +02:00
columbarius
47635b94eb screencast: add prompt to dmenu style default choosers 2021-05-03 15:58:40 +02:00
Tobias Langendorf
83086e9af8 screenshot: implement interactive option 2021-05-03 15:51:05 +02:00
columbarius
620946b320 config: add missing keys to print_config 2021-05-03 15:19:20 +02:00
columbarius
f1472350f0 doc: remove quotes from samples
inih doesn't strip them and sh will try to find the binary including the whitespaces
2021-05-03 15:19:20 +02:00
columbarius
22af25749e config: use inih instead if iniparser 2021-05-03 15:19:20 +02:00
Simon Ser
7f6b4090e0 Add -r flag to slurp
This prevents the user from selecting a custom region, and forces
them to select a full output.
2021-05-03 11:57:11 +02:00
Simon Ser
bb13697c01 Add wlroots to portal manifest UseIn list
XDG_CURRENT_DESKTOP can contain a list [1]. Allow users to
set a list such as XDG_CURRENT_DESKTOP=asdf:wlroots. That way, users
can use xdpw in their non-Sway compositor without specifying
XDG_CURRENT_DESKTOP=sway and without having to edit the portal
definition.

[1]: 9a2582d035/src/portal-impl.c (L189)
2021-04-23 16:51:07 +02:00
Simon Ser
5d3cf9a8fa Remove -o and -f options
These can be specified in the configuration file now.
2021-04-21 12:12:40 -04:00
columbarius
f978a6eb77 Revert "screencast: workaround corrupted output_list"
This reverts commit 94f1f5d0a8.
2021-04-19 15:42:50 +02:00
columbarius
e89c58c731 wlr_screencopy: make sure xdg_output_manager is supported 2021-04-19 15:42:50 +02:00
Stefano Ragni
ebb50839a5 wlr_screencast: fix return value on cmd failure 2021-04-18 19:56:54 +02:00
Simon Ser
9f7e59c80a Bump to v0.3.0 2021-04-18 17:17:13 +02:00
Simon Ser
af7cdec82d build: use has_headers in find_library()
This allows to make sure the library's header files are available.
2021-04-18 15:02:44 +02:00
Simon Ser
47f9e1ccea build: remove dirs from iniparser find_library() call
The docs say:

> By default the library is searched for in the system library directory (e.g.
> /usr/lib).

So it should already do the right thing.
2021-04-18 15:02:44 +02:00
Simon Ser
d1328e2f4b build: remove intermediate static library
We don't really need to build an intermediate static library, and
it's causing pain wrt. include directories and dependencies.
2021-04-18 15:02:44 +02:00
Simon Ser
f8f188a73e ci: add /usr/local to search paths on FreeBSD
Because of an upstream Meson bug [1], the /usr/local prefix used
by ports is not included in default Meson search paths. Do it
explicitly for now.

[1]: https://github.com/mesonbuild/meson/issues/4468
2021-04-18 15:02:44 +02:00
columbarius
5e4edae701 wlr_screencast: remove wl_display_dispatch
wl_display_dispatch is unnecessary and can cause hangs, if no new requests are queued
2021-04-17 16:25:54 +02:00
Simon Ser
4af11c7a4f readme: don't show PR status in CI badge 2021-04-17 11:58:29 +02:00
columbarius
ca46a98b86 wlr_screencast: add xdg_output_listener after output registration if possible 2021-04-17 11:33:48 +02:00