mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +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 */
|
||||
if (pool->add_videometa)
|
||||
if (pool->add_videometa) {
|
||||
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_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info),
|
||||
info->offset, info->stride);
|
||||
if (videometa)
|
||||
gst_video_meta_set_alignment (videometa, obj->align);
|
||||
}
|
||||
|
||||
*buffer = newbuf;
|
||||
|
||||
|
|
Loading…
Reference in a new issue