surfaceproxy: add helper to retrieve the VA surface ID.

This commit is contained in:
Gwenole Beauchesne 2012-01-05 16:59:57 +01:00
parent 40f44ab60e
commit 4e72aa587c
3 changed files with 22 additions and 0 deletions

View file

@ -496,6 +496,7 @@ gst_vaapi_surface_proxy_new
gst_vaapi_surface_proxy_get_context gst_vaapi_surface_proxy_get_context
gst_vaapi_surface_proxy_set_context gst_vaapi_surface_proxy_set_context
gst_vaapi_surface_proxy_get_surface gst_vaapi_surface_proxy_get_surface
gst_vaapi_surface_proxy_get_surface_id
gst_vaapi_surface_proxy_set_surface gst_vaapi_surface_proxy_set_surface
gst_vaapi_surface_proxy_get_timestamp gst_vaapi_surface_proxy_get_timestamp
gst_vaapi_surface_proxy_set_timestamp gst_vaapi_surface_proxy_set_timestamp

View file

@ -26,6 +26,7 @@
#include "config.h" #include "config.h"
#include "gstvaapisurfaceproxy.h" #include "gstvaapisurfaceproxy.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1 #define DEBUG 1
#include "gstvaapidebug.h" #include "gstvaapidebug.h"
@ -247,6 +248,23 @@ gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy)
return proxy->priv->surface; return proxy->priv->surface;
} }
/**
* gst_vaapi_surface_proxy_get_surface_id:
* @proxy: a #GstVaapiSurfaceProxy
*
* Returns the VA surface ID stored in the @proxy.
*
* Return value: the #GstVaapiID
*/
GstVaapiID
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy)
{
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), GST_VAAPI_ID_NONE);
g_return_val_if_fail(proxy->priv->surface != NULL, GST_VAAPI_ID_NONE);
return GST_VAAPI_OBJECT_ID(proxy->priv->surface);
}
/** /**
* gst_vaapi_surface_proxy_set_surface: * gst_vaapi_surface_proxy_set_surface:
* @proxy: a #GstVaapiSurfaceProxy * @proxy: a #GstVaapiSurfaceProxy

View file

@ -115,6 +115,9 @@ gst_vaapi_surface_proxy_set_context(
GstVaapiSurface * GstVaapiSurface *
gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy); gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy);
GstVaapiID
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
void void
gst_vaapi_surface_proxy_set_surface( gst_vaapi_surface_proxy_set_surface(
GstVaapiSurfaceProxy *proxy, GstVaapiSurfaceProxy *proxy,