mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
video: Add new GST_VIDEO_FORMAT_DMA_DRM video format
This GST_VIDEO_FORMAT_DMA_DRM is introduced for DMABuf kind feature usage. It represent the DMA DRM kind memory. And like the ENCODED format, it should not be interpreted and mapped as normal video format. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4981>
This commit is contained in:
parent
e5be080042
commit
94c94d34dc
5 changed files with 29 additions and 2 deletions
|
@ -10110,6 +10110,12 @@ for details about the layout and packing of these formats in memory.</doc>
|
|||
<member name="nv12_10le40_4l4" value="113" c:identifier="GST_VIDEO_FORMAT_NV12_10LE40_4L4" glib:nick="nv12-10le40-4l4">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.h">@GST_VIDEO_FORMAT_NV12_10LE40 with 4x4 pixels tiles (5 bytes per tile row) (Since: 1.24)</doc>
|
||||
</member>
|
||||
<member name="dma_drm" value="114" c:identifier="GST_VIDEO_FORMAT_DMA_DRM" glib:nick="dma-drm">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.h">DMA DRM special format. It's only used with
|
||||
memory:DMABuf #GstCapsFeatures, where an extra
|
||||
parameter (drm-format) is required to define the
|
||||
image format and its memory layout.</doc>
|
||||
</member>
|
||||
<function name="from_fourcc" c:identifier="gst_video_format_from_fourcc">
|
||||
<doc xml:space="preserve" filename="../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.c">Converts a FOURCC value into the corresponding #GstVideoFormat.
|
||||
If the FOURCC cannot be represented by #GstVideoFormat,
|
||||
|
|
|
@ -7355,6 +7355,7 @@ get_scale_format (GstVideoFormat format, gint plane)
|
|||
case GST_VIDEO_FORMAT_NV12_8L128:
|
||||
case GST_VIDEO_FORMAT_NV12_10BE_8L128:
|
||||
case GST_VIDEO_FORMAT_NV12_10LE40_4L4:
|
||||
case GST_VIDEO_FORMAT_DMA_DRM:
|
||||
res = format;
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
|
@ -7343,6 +7343,8 @@ static const VideoFormat formats[] = {
|
|||
MAKE_YUV_T_FORMAT (NV12_10LE40_4L4, "raw video",
|
||||
GST_MAKE_FOURCC ('M', 'H', '2', '1'), DPTH10_10_10, PSTR0, PLANE011,
|
||||
OFFS001, SUB420, PACK_NV12_10LE40_TILED, TILE_10bit_4x4 (LINEAR)),
|
||||
{0x00000000, {GST_VIDEO_FORMAT_DMA_DRM, "DMA_DRM", "DMA DRM video",
|
||||
GST_VIDEO_FORMAT_FLAG_COMPLEX, DPTH0, PSTR0, PLANE_NA, OFFS0}},
|
||||
};
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
@ -7818,7 +7820,8 @@ generate_raw_video_formats (gpointer data)
|
|||
|
||||
all->formats[i] = gst_video_format_from_string (g_value_get_string (v));
|
||||
g_assert (all->formats[i] != GST_VIDEO_FORMAT_UNKNOWN
|
||||
&& all->formats[i] != GST_VIDEO_FORMAT_ENCODED);
|
||||
&& all->formats[i] != GST_VIDEO_FORMAT_ENCODED
|
||||
&& all->formats[i] != GST_VIDEO_FORMAT_DMA_DRM);
|
||||
}
|
||||
|
||||
g_value_unset (&list);
|
||||
|
@ -7905,7 +7908,8 @@ gst_video_make_raw_caps_with_features (const GstVideoFormat formats[],
|
|||
GValue v = G_VALUE_INIT;
|
||||
|
||||
g_return_val_if_fail (formats[i] != GST_VIDEO_FORMAT_UNKNOWN
|
||||
&& formats[i] != GST_VIDEO_FORMAT_ENCODED, NULL);
|
||||
&& formats[i] != GST_VIDEO_FORMAT_ENCODED
|
||||
&& formats[i] != GST_VIDEO_FORMAT_DMA_DRM, NULL);
|
||||
|
||||
g_value_init (&v, G_TYPE_STRING);
|
||||
g_value_set_static_string (&v, gst_video_format_to_string (formats[i]));
|
||||
|
|
|
@ -146,6 +146,10 @@ G_BEGIN_DECLS
|
|||
* @GST_VIDEO_FORMAT_NV12_8L128 : NV12 with 8x128 tiles in linear order (Since: 1.22)
|
||||
* @GST_VIDEO_FORMAT_NV12_10BE_8L128 : NV12 10bit big endian with 8x128 tiles in linear order (Since: 1.22)
|
||||
* @GST_VIDEO_FORMAT_NV12_10LE40_4L4: @GST_VIDEO_FORMAT_NV12_10LE40 with 4x4 pixels tiles (5 bytes per tile row) (Since: 1.24)
|
||||
* @GST_VIDEO_FORMAT_DMA_DRM: DMA DRM special format. It's only used with
|
||||
* memory:DMABuf #GstCapsFeatures, where an extra
|
||||
* parameter (drm-format) is required to define the
|
||||
* image format and its memory layout.
|
||||
*
|
||||
* Enum value describing the most common video formats.
|
||||
*
|
||||
|
@ -411,6 +415,17 @@ typedef enum {
|
|||
* Since: 1.24
|
||||
*/
|
||||
GST_VIDEO_FORMAT_NV12_10LE40_4L4,
|
||||
/**
|
||||
* GST_VIDEO_FORMAT_DMA_DRM:
|
||||
*
|
||||
* @GST_VIDEO_FORMAT_DMA_DRM represent the DMA DRM special format. It's
|
||||
* only used with memory:DMABuf #GstCapsFeatures, where an extra
|
||||
* parameter (drm-format) is required to define the image format and
|
||||
* its memory layout.
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
GST_VIDEO_FORMAT_DMA_DRM,
|
||||
} GstVideoFormat;
|
||||
|
||||
#define GST_VIDEO_MAX_PLANES 4
|
||||
|
|
|
@ -1268,6 +1268,7 @@ fill_planes (GstVideoInfo * info, gsize plane_size[GST_VIDEO_MAX_PLANES])
|
|||
break;
|
||||
}
|
||||
case GST_VIDEO_FORMAT_ENCODED:
|
||||
case GST_VIDEO_FORMAT_DMA_DRM:
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_UNKNOWN:
|
||||
GST_ERROR ("invalid format");
|
||||
|
|
Loading…
Reference in a new issue