Skip to content

Commit

Permalink
Copy DmaBuf to Memptr for screencopy dmabuf in pipewire_screencast.c
Browse files Browse the repository at this point in the history
  • Loading branch information
columbarius committed Nov 9, 2020
1 parent c0763ae commit 4250d8f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/screencast/pipewire_screencast.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ void pwr_copy_screencast(struct spa_buffer *spa_buf, struct xdpw_screencast_inst
writeFrameData(d[0].data, cast->xdpw_frames.screencopy_frame.data, cast->xdpw_frames.screencopy_frame.height,
cast->xdpw_frames.screencopy_frame.stride, cast->xdpw_frames.screencopy_frame.y_invert);
break;
case XDPW_INSTANCE_SCP_DMABUF:
if ((d[0].data) == NULL) {
logprint(TRACE, "pipewire: data pointer undefined");
return;
}

writeDmaBufFrameDataBO(d[0].data,
cast->xdpw_frames.screencopy_frame.bo,
cast->xdpw_frames.screencopy_frame.width,
cast->xdpw_frames.screencopy_frame.height,
cast->xdpw_frames.screencopy_frame.stride);
break;
default:
abort();
}
Expand Down

0 comments on commit 4250d8f

Please sign in to comment.