mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
xvimagepool: cleanups
This commit is contained in:
parent
86a10fbb9f
commit
2e00a6d169
1 changed files with 6 additions and 8 deletions
|
@ -513,17 +513,18 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
||||||
if (!gst_video_info_from_caps (&info, caps))
|
if (!gst_video_info_from_caps (&info, caps))
|
||||||
goto wrong_caps;
|
goto wrong_caps;
|
||||||
|
|
||||||
priv->info = info;
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (pool, "%dx%d, caps %" GST_PTR_FORMAT, info.width, info.height,
|
GST_LOG_OBJECT (pool, "%dx%d, caps %" GST_PTR_FORMAT, info.width, info.height,
|
||||||
caps);
|
caps);
|
||||||
|
|
||||||
/* keep track of the width and height and caps */
|
priv->im_format =
|
||||||
|
gst_xvimagesink_get_format_from_caps (xvpool->sink, (GstCaps *) caps);
|
||||||
|
if (priv->im_format == -1)
|
||||||
|
goto unknown_format;
|
||||||
|
|
||||||
if (priv->caps)
|
if (priv->caps)
|
||||||
gst_caps_unref (priv->caps);
|
gst_caps_unref (priv->caps);
|
||||||
priv->caps = gst_caps_copy (caps);
|
priv->caps = gst_caps_copy (caps);
|
||||||
priv->im_format =
|
priv->info = info;
|
||||||
gst_xvimagesink_get_format_from_caps (xvpool->sink, (GstCaps *) caps);
|
|
||||||
|
|
||||||
/* enable metadata based on config of the pool */
|
/* enable metadata based on config of the pool */
|
||||||
priv->add_metavideo =
|
priv->add_metavideo =
|
||||||
|
@ -553,9 +554,6 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
||||||
GST_VIDEO_INFO_HEIGHT (&info) + priv->align.padding_top +
|
GST_VIDEO_INFO_HEIGHT (&info) + priv->align.padding_top +
|
||||||
priv->align.padding_bottom;
|
priv->align.padding_bottom;
|
||||||
|
|
||||||
if (priv->im_format == -1)
|
|
||||||
goto unknown_format;
|
|
||||||
|
|
||||||
return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
|
return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config);
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
Loading…
Reference in a new issue