mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
va: pool: Check the force_videometa for all memory types.
force_videometa should mean that the buffer must use video meta to map correctly. When the stride or the offset of the alloc_info is different from the src caps, the downstream must use video meta. So this flag should not link with the RAW caps only. All kinds of caps(memory:VAMemory, memory:DMABuf) should have this flag. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1711>
This commit is contained in:
parent
7a8ac90010
commit
1794a44577
1 changed files with 8 additions and 10 deletions
|
@ -169,16 +169,14 @@ gst_va_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
|||
gst_video_alignment_reset (&vpool->video_align);
|
||||
}
|
||||
|
||||
if (gst_caps_is_raw (caps)) {
|
||||
for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&caps_info); i++) {
|
||||
if (GST_VIDEO_INFO_PLANE_STRIDE (&orig_info, i) !=
|
||||
GST_VIDEO_INFO_PLANE_STRIDE (&alloc_info, i) ||
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&orig_info, i) !=
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&alloc_info, i)) {
|
||||
GST_INFO_OBJECT (vpool, "Video meta is required in buffer.");
|
||||
vpool->force_videometa = TRUE;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < GST_VIDEO_INFO_N_PLANES (&caps_info); i++) {
|
||||
if (GST_VIDEO_INFO_PLANE_STRIDE (&orig_info, i) !=
|
||||
GST_VIDEO_INFO_PLANE_STRIDE (&alloc_info, i) ||
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&orig_info, i) !=
|
||||
GST_VIDEO_INFO_PLANE_OFFSET (&alloc_info, i)) {
|
||||
GST_INFO_OBJECT (vpool, "Video meta is required in buffer.");
|
||||
vpool->force_videometa = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue