diff --git a/docs/reference/libs/libs-sections.txt b/docs/reference/libs/libs-sections.txt
index 63a2eddb51..d759354382 100644
--- a/docs/reference/libs/libs-sections.txt
+++ b/docs/reference/libs/libs-sections.txt
@@ -19,6 +19,7 @@ GST_VAAPI_SURFACE_POOL_GET_CLASS
GstVaapiVideoPool
GstVaapiVideoPool
GstVaapiVideoPoolClass
+gst_vaapi_video_pool_get_display
gst_vaapi_video_pool_get_caps
gst_vaapi_video_pool_get_object
gst_vaapi_video_pool_put_object
diff --git a/gst-libs/gst/vaapi/gstvaapivideopool.c b/gst-libs/gst/vaapi/gstvaapivideopool.c
index 985742ef8a..fca27345ba 100644
--- a/gst-libs/gst/vaapi/gstvaapivideopool.c
+++ b/gst-libs/gst/vaapi/gstvaapivideopool.c
@@ -146,7 +146,7 @@ gst_vaapi_video_pool_get_property(
switch (prop_id) {
case PROP_DISPLAY:
- g_value_set_object(value, pool->priv->display);
+ g_value_set_object(value, gst_vaapi_video_pool_get_display(pool));
break;
case PROP_CAPS:
g_value_set_pointer(value, gst_vaapi_video_pool_get_caps(pool));
@@ -230,6 +230,23 @@ gst_vaapi_video_pool_init(GstVaapiVideoPool *pool)
g_queue_init(&priv->free_objects);
}
+/**
+ * gst_vaapi_video_pool_get_display:
+ * @pool: a #GstVaapiVideoPool
+ *
+ * Retrieves the #GstVaapiDisplay the @pool is bound to. The @pool
+ * owns the returned object and it shall not be unref'ed.
+ *
+ * Return value: the #GstVaapiDisplay the @pool is bound to
+ */
+GstVaapiDisplay *
+gst_vaapi_video_pool_get_display(GstVaapiVideoPool *pool)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_VIDEO_POOL(pool), NULL);
+
+ return pool->priv->display;
+}
+
/**
* gst_vaapi_video_pool_get_caps:
* @pool: a #GstVaapiVideoPool
diff --git a/gst-libs/gst/vaapi/gstvaapivideopool.h b/gst-libs/gst/vaapi/gstvaapivideopool.h
index 7552ef7189..a7b44242af 100644
--- a/gst-libs/gst/vaapi/gstvaapivideopool.h
+++ b/gst-libs/gst/vaapi/gstvaapivideopool.h
@@ -88,6 +88,9 @@ struct _GstVaapiVideoPoolClass {
GType
gst_vaapi_video_pool_get_type(void);
+GstVaapiDisplay *
+gst_vaapi_video_pool_get_display(GstVaapiVideoPool *pool);
+
GstCaps *
gst_vaapi_video_pool_get_caps(GstVaapiVideoPool *pool);