columbarius
f77b751649
screencast: rename xdpw_frame into xdpw_screencopy_frame
2021-11-06 16:51:36 +01:00
columbarius
9bf7367320
screencast: remove pipewire on_event callback
...
Since we are driving the screencast there are no events on the pipewire loop
calling the on_event callback. We want to import and export (if possible) on
every frame of the wlroots loop, so this event is no longer needed.
2021-11-06 16:51:36 +01:00
columbarius
4b03a5acfd
screencast: pipewire add functions to dequeue and enqueue a buffer
2021-11-06 16:51:36 +01:00
columbarius
5f5a29ccfd
screencast: fix pipewire default id_node
...
The default node_id is SPA_ID_INVALID.
We are casting pipewire uint32_t node_id to int for printing since they are
currently staying in the range of low integer numbers. This makes
spotting an uninitialized node_id (casted to -1) much easier. Should be
corrected if that becomes an issue in the future.
2021-08-10 13:10:10 +02:00
columbarius
6cc3a01741
screencast: pipewire change to self allocation of shm buffers
2021-07-02 12:12:17 +02:00
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
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
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
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
Stefano Ragni
6c8f6ca78e
pipewire: Fix building EnumFormat spa object
...
Make sure that in SPA_POD_CHOICE_ENUM_Id(n_vals, ...) we always pass
exactly n_vals arguments. For this we build the object with separate
spa_pod_builder_add calls, since n_vals is known at runtime.
Fix #102
2021-03-16 15:43:47 -04:00
Simon Ser
c6d52b4412
Remove extraneous whitespace
2021-02-11 18:55:48 +01:00
Simon Ser
9f72a6d874
Fix freeze on skipped frame
...
When a frame is skipped, we weren't destroying the wlr frame. Since
this function kicks off the next frame capture, the stream was getting
stuck.
Closes: https://github.com/emersion/xdg-desktop-portal-wlr/issues/81
2021-02-11 18:55:48 +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
columbarius
24bc68f0f2
Remove SPA_PARAM_BUFFERS_dataType
...
Don't announce a SPA_PARAM_BUFFERS_dataType. This is reserved for consumer
2020-11-04 11:09:09 -05:00
columbarius
c2883a4e43
Add pipewire buffers_dataType parameter in pipwire_screencast.c
2020-09-19 10:22:44 +02:00
Simon Ser
26b6bf69aa
Advertise format with alpha channel stripped
2020-05-05 10:00:10 -04:00
Dan Shick
f6d14d9206
Check cast instance refcount before attaching
2020-04-21 14:45:55 +02: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
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
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