Expose video pool display.

This commit is contained in:
gb 2010-05-11 12:06:59 +00:00 committed by Gwenole Beauchesne
parent bceab0254c
commit 6f5e593abd
3 changed files with 22 additions and 1 deletions

View file

@ -19,6 +19,7 @@ GST_VAAPI_SURFACE_POOL_GET_CLASS
<TITLE>GstVaapiVideoPool</TITLE>
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

View file

@ -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

View file

@ -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);