-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move xdpw_format_pw_from_wl_shm to screencast_scp_shm.c
- Loading branch information
1 parent
0a77273
commit 4a9e576
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "screencast_scp_shm.h" | ||
|
||
enum spa_video_format xdpw_format_pw_from_wl_shm( | ||
struct xdpw_frame_scp_shm *frame) { | ||
switch (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; | ||
default: | ||
abort(); | ||
} | ||
} | ||
|
||
|