mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
eglimagememory: Add RGB/BGR DMABuf importation support
https://bugzilla.gnome.org/show_bug.cgi?id=743345
This commit is contained in:
parent
1cd9786598
commit
b17a732d5f
1 changed files with 6 additions and 0 deletions
|
@ -346,9 +346,11 @@ _drm_fourcc_from_info (GstVideoInfo * info, int plane)
|
||||||
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
|
||||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||||
const gint rgba_fourcc = DRM_FORMAT_ABGR8888;
|
const gint rgba_fourcc = DRM_FORMAT_ABGR8888;
|
||||||
|
const gint rgb_fourcc = DRM_FORMAT_BGR888;
|
||||||
const gint rg_fourcc = DRM_FORMAT_GR88;
|
const gint rg_fourcc = DRM_FORMAT_GR88;
|
||||||
#else
|
#else
|
||||||
const gint rgba_fourcc = DRM_FORMAT_RGBA8888;
|
const gint rgba_fourcc = DRM_FORMAT_RGBA8888;
|
||||||
|
const gint rgb_fourcc = DRM_FORMAT_RGB888;
|
||||||
const gint rg_fourcc = DRM_FORMAT_RG88;
|
const gint rg_fourcc = DRM_FORMAT_RG88;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -359,6 +361,10 @@ _drm_fourcc_from_info (GstVideoInfo * info, int plane)
|
||||||
case GST_VIDEO_FORMAT_RGB16:
|
case GST_VIDEO_FORMAT_RGB16:
|
||||||
return DRM_FORMAT_RGB565;
|
return DRM_FORMAT_RGB565;
|
||||||
|
|
||||||
|
case GST_VIDEO_FORMAT_RGB:
|
||||||
|
case GST_VIDEO_FORMAT_BGR:
|
||||||
|
return rgb_fourcc;
|
||||||
|
|
||||||
case GST_VIDEO_FORMAT_RGBA:
|
case GST_VIDEO_FORMAT_RGBA:
|
||||||
case GST_VIDEO_FORMAT_RGBx:
|
case GST_VIDEO_FORMAT_RGBx:
|
||||||
case GST_VIDEO_FORMAT_BGRA:
|
case GST_VIDEO_FORMAT_BGRA:
|
||||||
|
|
Loading…
Reference in a new issue