va: pool: Delete the GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
authorHe Junyan <junyan.he@intel.com>
Sat, 23 Apr 2022 15:52:34 +0000 (23:52 +0800)
committerHe Junyan <junyan.he@intel.com>
Tue, 26 Apr 2022 12:26:02 +0000 (20:26 +0800)
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2282>

subprojects/gst-plugins-bad/gst-libs/gst/va/gstvapool.c

index f14c8b6..31eae75 100644 (file)
@@ -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;