Commit graph

7 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto 549c0f5850 linux-pipewire: Move portal signal subcription to portal.c
The D-Bus signal subscription is a very boring aspect of the
portals infrastructure that shouldn't really matter when reading
the code of pipewire.c.

Move it out to its natural place, portal.c.
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto f740033c93 linux-pipewire: Shuffle screencast D-Bus proxy around
Move the screencast D-Bus proxy, and related functions, to where
they fit in now: screencast-portal.c.
2022-06-24 10:29:10 -03:00
Georges Basile Stavracas Neto 5ffc8ef663 linux-pipewire: Shuffle some code around
This is the start of what will be a rather incisive surgery on
pipewire.c. Move a couple of functions to portal.c, since they're
not really related to the PipeWire code.
2022-06-24 10:26:51 -03:00
Georges Basile Stavracas Neto 3d7663f417 linux-pipewire: Explicitly enumerate portal capture types
This is very much like previous commit, but there's a catch: there
already was an enumeration in place, which is replaced in this
commit. The obs_pw_capture_type enum was introduced before splitting
the portal code into a separate file, and the enum itself is specific
to the screencast portal, so the appropriate place to enumerate it
is in portal.h.

For completude, PORTAL_CAPTURE_TYPE_VIRTUAL was added to the enum,
even though we never used, and probably never will.

The values are still the same, since both the old and this new enum
were extracted from the screencast portal [1].

https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.ScreenCast.xml#L290-300
2022-04-09 16:45:02 -07:00
Georges Basile Stavracas Neto e7815dff66 linux-pipewire: Explicitly enumerate cursor modes
The ScreenCast portal defines 3 cursor modes [1]:

 * Hidden: no visible cursor (value: 1)
 * Embedded: cursor is drawn in the frames (value: 2)
 * Metadata: cursor is sent as stream metadata (value: 4)

The values are power-of-two due to be used as flags.

Explicitly listing these values in an enum improves legibility
of the code, so do that instead of hardcoding 1, 2, and 4.

[1] https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.ScreenCast.xml#L302-L316
2022-04-09 16:45:02 -07:00
Georges Basile Stavracas Neto 1267081e5c linux-pipewire: Move fetching cursor mode to portal.c
The portal.c file was introduced after the PipeWire code landed, and
handles acquiring a D-Bus connection to the portal interface, and also
has helpers to get properties from portals. The available cursor modes
property fits nicely in portal.c.

Move fetching the cursor mode to portal.c.
2022-04-09 16:45:02 -07:00
Georges Basile Stavracas Neto a147315f33 project: Migrate PipeWire capture into linux-pipewire
The capture ids are preserved, so that it's compatible with the
previous code. No code changes were necessary whatsoever.
2022-03-20 20:53:39 -03:00
Renamed from plugins/linux-capture/portal.h (Browse further)