mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
v4l2bufferpool: set video alignment of video meta
need apply video alignment info on video meta, downstream element can get buffer alignment from video meta Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1326>
This commit is contained in:
parent
214691b972
commit
a66124a79c
1 changed files with 6 additions and 2 deletions
|
@ -463,11 +463,15 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add metadata to raw video buffers */
|
/* add metadata to raw video buffers */
|
||||||
if (pool->add_videometa)
|
if (pool->add_videometa) {
|
||||||
gst_buffer_add_video_meta_full (newbuf, GST_VIDEO_FRAME_FLAG_NONE,
|
GstVideoMeta *videometa =
|
||||||
|
gst_buffer_add_video_meta_full (newbuf, GST_VIDEO_FRAME_FLAG_NONE,
|
||||||
GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
|
GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
|
||||||
GST_VIDEO_INFO_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info),
|
GST_VIDEO_INFO_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info),
|
||||||
info->offset, info->stride);
|
info->offset, info->stride);
|
||||||
|
if (videometa)
|
||||||
|
gst_video_meta_set_alignment (videometa, obj->align);
|
||||||
|
}
|
||||||
|
|
||||||
*buffer = newbuf;
|
*buffer = newbuf;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue