From fac57fcb8d00a51f72f534a5a566abaab4084538 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Sat, 23 Apr 2022 23:52:34 +0800 Subject: [PATCH] va: pool: Delete the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT. The va pool is used for GPU side surface/image, its alignment should not be changed arbitrarily by others. So we decide not to expose the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT flag anymore. Instead, user can call gst_buffer_pool_config_set_va_alignment() to set its surface/image alignment. Part-of: --- .../gst-plugins-bad/gst-libs/gst/va/gstvapool.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvapool.c b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvapool.c index f14c8b675a..31eae759a5 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvapool.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvapool.c @@ -57,9 +57,7 @@ G_DEFINE_TYPE_WITH_CODE (GstVaPool, gst_va_pool, GST_TYPE_BUFFER_POOL, static const gchar ** gst_va_pool_get_options (GstBufferPool * pool) { - static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META, - GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, NULL - }; + static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META, NULL }; return options; } @@ -136,12 +134,10 @@ gst_va_pool_set_config (GstBufferPool * pool, GstStructure * config) GST_BUFFER_POOL_OPTION_VIDEO_META); /* parse extra alignment info */ - has_alignment = gst_buffer_pool_config_has_option (config, - GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT); + has_alignment = gst_buffer_pool_config_get_va_alignment (config, + &video_align); if (has_alignment) { - gst_buffer_pool_config_get_video_alignment (config, &video_align); - width += video_align.padding_left + video_align.padding_right; height += video_align.padding_bottom + video_align.padding_top;