diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-01-05 16:59:57 +0100 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-01-05 17:35:43 +0100 |
commit | 4e72aa587c883a859a3b0ed6ecd13b8063f8d9e9 (patch) | |
tree | 56e52d02fb338f23b9f92de8c6dcf6a9253f42a5 | |
parent | 40f44ab60eeceb0416858afd205bdfa9e6276d58 (diff) |
surfaceproxy: add helper to retrieve the VA surface ID.
-rw-r--r-- | docs/reference/libs/libs-sections.txt | 1 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapisurfaceproxy.c | 18 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapisurfaceproxy.h | 3 |
3 files changed, 22 insertions, 0 deletions
diff --git a/docs/reference/libs/libs-sections.txt b/docs/reference/libs/libs-sections.txt index cfd3189c..46da57a1 100644 --- a/docs/reference/libs/libs-sections.txt +++ b/docs/reference/libs/libs-sections.txt @@ -496,6 +496,7 @@ gst_vaapi_surface_proxy_new gst_vaapi_surface_proxy_get_context gst_vaapi_surface_proxy_set_context gst_vaapi_surface_proxy_get_surface +gst_vaapi_surface_proxy_get_surface_id gst_vaapi_surface_proxy_set_surface gst_vaapi_surface_proxy_get_timestamp gst_vaapi_surface_proxy_set_timestamp diff --git a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.c b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.c index 80201c5f..fc212082 100644 --- a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.c +++ b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.c @@ -26,6 +26,7 @@ #include "config.h" #include "gstvaapisurfaceproxy.h" +#include "gstvaapiobject_priv.h" #define DEBUG 1 #include "gstvaapidebug.h" @@ -248,6 +249,23 @@ gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy) } /** + * 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: * @proxy: a #GstVaapiSurfaceProxy * @surface: the new #GstVaapiSurface to be stored in @proxy diff --git a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h index b24caf5e..8eab401b 100644 --- a/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h +++ b/gst-libs/gst/vaapi/gstvaapisurfaceproxy.h @@ -115,6 +115,9 @@ gst_vaapi_surface_proxy_set_context( GstVaapiSurface * gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy); +GstVaapiID +gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy); + void gst_vaapi_surface_proxy_set_surface( GstVaapiSurfaceProxy *proxy, |