Skip to content

Commit

Permalink
vcap/pipewire: Ensure target_id is PW_ID_ANY when not screencapturing
Browse files Browse the repository at this point in the history
The target_id param is deprecated and should always be set to PW_ID_ANY.
This is however not yet possible to do with screen capture.
  • Loading branch information
mpiatka committed Oct 16, 2023
1 parent b43b963 commit 6b3a7f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/video_capture/pipewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct screen_cast_session {
}

int fd = -1;
uint32_t node = -1;
uint32_t node = PW_ID_ANY;

struct pw_thread_loop *loop = nullptr;
struct pw_context *context = nullptr;
Expand Down Expand Up @@ -549,6 +549,11 @@ static int vidcap_screen_pw_init(struct vidcap_params *params, void **state)
}

session.pw.fd = portalResult.pipewire_fd;
/* TODO: The node target_id param when calling stream_connect should be
* always set to PW_ID_ANY as using object ids is now deprecated.
* However, the dbus ScreenCast portal doesn't yet expose the object
* serial which shoud be used instead.
*/
session.pw.node = portalResult.pipewire_node;

LOG(LOG_LEVEL_DEBUG) << MOD_NAME "init ok\n";
Expand Down

0 comments on commit 6b3a7f6

Please sign in to comment.