Skip to content

Commit

Permalink
Replace xdpw_format_pw_from_wl_shm with xdpw_format_pw_from_wl_shm in…
Browse files Browse the repository at this point in the history
… screencast_common.c
  • Loading branch information
columbarius committed Sep 3, 2020
1 parent f36f8fd commit 0a77273
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/screencast/screencast_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,11 @@ void randname(char *buf) {
}
}

enum spa_video_format xdpw_format_pw_from_wl_shm(
enum spa_video_format xdpw_format_pw(
struct xdpw_screencast_instance *cast) {
switch (cast->simple_frame.format) {
case WL_SHM_FORMAT_ARGB8888:
return SPA_VIDEO_FORMAT_BGRA;
case WL_SHM_FORMAT_XRGB8888:
return SPA_VIDEO_FORMAT_BGRx;
case WL_SHM_FORMAT_RGBA8888:
return SPA_VIDEO_FORMAT_ABGR;
case WL_SHM_FORMAT_RGBX8888:
return SPA_VIDEO_FORMAT_xBGR;
case WL_SHM_FORMAT_ABGR8888:
return SPA_VIDEO_FORMAT_RGBA;
case WL_SHM_FORMAT_XBGR8888:
return SPA_VIDEO_FORMAT_RGBx;
case WL_SHM_FORMAT_BGRA8888:
return SPA_VIDEO_FORMAT_ARGB;
case WL_SHM_FORMAT_BGRX8888:
return SPA_VIDEO_FORMAT_xRGB;
case WL_SHM_FORMAT_NV12:
return SPA_VIDEO_FORMAT_NV12;
switch (cast->type) {
case XDPW_INSTANCE_SCP_SHM:
return xdpw_format_pw_from_wl_shm(&cast->simple_frame.scp_shm);
default:
abort();
}
Expand Down

0 comments on commit 0a77273

Please sign in to comment.