mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2301>
This commit is contained in:
parent
f35bd6c8bb
commit
e834627396
1 changed files with 3 additions and 7 deletions
|
@ -52,9 +52,7 @@ G_DEFINE_TYPE_WITH_CODE (GstVaPool, gst_va_pool, GST_TYPE_BUFFER_POOL,
|
||||||
static const gchar **
|
static const gchar **
|
||||||
gst_va_pool_get_options (GstBufferPool * pool)
|
gst_va_pool_get_options (GstBufferPool * pool)
|
||||||
{
|
{
|
||||||
static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META,
|
static const gchar *options[] = { GST_BUFFER_POOL_OPTION_VIDEO_META, NULL };
|
||||||
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT, NULL
|
|
||||||
};
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,12 +120,10 @@ gst_va_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
||||||
GST_BUFFER_POOL_OPTION_VIDEO_META);
|
GST_BUFFER_POOL_OPTION_VIDEO_META);
|
||||||
|
|
||||||
/* parse extra alignment info */
|
/* parse extra alignment info */
|
||||||
has_alignment = gst_buffer_pool_config_has_option (config,
|
has_alignment = gst_buffer_pool_config_get_va_alignment (config,
|
||||||
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT);
|
&video_align);
|
||||||
|
|
||||||
if (has_alignment) {
|
if (has_alignment) {
|
||||||
gst_buffer_pool_config_get_video_alignment (config, &video_align);
|
|
||||||
|
|
||||||
width += video_align.padding_left + video_align.padding_right;
|
width += video_align.padding_left + video_align.padding_right;
|
||||||
height += video_align.padding_bottom + video_align.padding_top;
|
height += video_align.padding_bottom + video_align.padding_top;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue