Commit Graph

24 Commits

Author SHA1 Message Date
columbarius 9d78b21695 screencast: add outputchooser with config option
Supports "dmenu" chooser type, which is called with a dmenu type list
piped to stdin, "simple" type, which recieves nothing on stdin and
default, which tries the hardcoded choosers.
Choosers are required to return the name of the choosen output as given
by the xdg-output protocol.

Thanks to piater for closing overlooked pipes.
Thanks to ericonr for suggestions regarding fork and pipes.
2021-04-02 15:07:38 +02:00
David96 4c2d8fc808 Add exec_before and exec_after
Adds an option to execute some program before and after screencast (e.g.
for disabling notifications during a cast)
2021-03-16 23:44:08 +01:00
Zsolt Donca ab8ff54f4c Control how many frames are captured per second
The goal is to control the rate of capture while in screencast, as it
can represent a performance issue and can cause input lag and the
feeling of having a laggy mouse.

This commit addresses the issue reported in #66.

The code measures the time elapsed to make a single screen capture, and
calculates how much to wait for the next capture to achieve the targeted
frame rate. To delay the capturing of the next frame, the code
introduces timers into the event loop based on the event loop in
https://github.com/emersion/mako

Added a command-line argument and an entry in the config file as well
for the max FPS. The default value is 0, meaning no rate control.

Added code to measure the average FPS every 5 seconds and print it with
DEBUG level.
2021-03-08 16:59:17 +01:00
columbarius 07154bb1e3
Add support for config file
Closes: https://github.com/emersion/xdg-desktop-portal-wlr/issues/60
2021-03-03 10:29:56 +01:00
Jan Beich a3e203584a screencast: prefix macros to avoid conflict with system definitions
In file included from ../src/screencast/wlr_screencast.c:18:
../include/pipewire_screencast.h:7:9: error: 'ALIGN' macro redefined [-Werror,-Wmacro-redefined]
 #define ALIGN 16
         ^
/usr/include/machine/param.h:79:9: note: previous definition is here
 #define ALIGN(p)                _ALIGN(p)
         ^
2021-01-09 12:21:13 +01:00
Jan Beich 4dbeaf3a06 build: add basu as sd-bus provider
Based on https://github.com/emersion/mako/commit/805663cc76e0
2021-01-09 12:21:13 +01:00
Jan Beich 7b7d927cae build: introduce sd-bus-provider option
Based on https://github.com/emersion/mako/commit/67f2ed1862a9
2021-01-09 12:21:13 +01:00
columbarius dafb25fdb1
Update to wlr-screencopy-unstable-v1 version 3 2020-10-19 23:40:30 +02:00
Simon Ser a7ea407e2f Remove --pixelformat flag
This hack is not needed anymore.
2020-05-05 10:00:10 -04:00
Simon Ser 26b6bf69aa Advertise format with alpha channel stripped 2020-05-05 10:00:10 -04:00
danshick 55f873dac4
Screencast session support (#22)
* Initial session support WIP
Remove libdrm dependency

Remove display from context, add dbus properties

Use random names for shm and pw_stream, init the stream only for new cast instances

Separate cast initialized flag from refcount, cleanup names and comments

* Refactor and stability improvements

Properly report xdp screencast implementation version
2020-04-16 10:21:55 +02:00
Dan Shick ccc8a31568 Remove pipewire workarounds after upstream fix 2020-04-01 13:38:38 -04:00
Dan Shick bba347be4c Add pipewire 0.3 support. Workaround pipewire bugs. 2020-03-16 22:43:45 +01:00
Dan Shick 45699637d1 Fix CI with libpipewire02, libdrm. Remove png.h unused import. Cleanup style. 2020-03-13 21:01:32 +01:00
Dan Shick c0da39f022 Add proper event loop. Remove last threads. Update CI with pipewire. 2020-03-13 21:01:32 +01:00
Dan Shick eb229b708e Remove thread for pipewire and all locking. Add support for elogind in meson. 2020-03-13 21:01:32 +01:00
Dan Shick b0c50ff911 Add proper logging 2020-03-13 21:01:32 +01:00
Dan Shick 080d519a0d Add xdg_output protocol for output selection 2020-03-13 21:01:32 +01:00
Dan Shick 7b699f3344 Use variable framerate, add CLI option to override pixelformat metadata 2020-03-13 21:01:32 +01:00
Dan Shick 2a31d2d922 Add thread for wlr screensharing 2020-03-13 21:01:32 +01:00
Simon Ser a9e904a0c8
Add session boilerplate 2019-12-09 12:55:12 +01:00
James Edwards-Jones df2ee009e1 Use sd_bus_message_append shorthand for screenshot 2019-07-24 18:28:26 +03:00
emersion 2f2fe91ff4
Add D-Bus boilerplate for Screenshot 2018-12-13 18:03:44 +01:00
emersion 7618fdc67d
First commit 2018-12-12 22:29:57 +01:00