surfaceproxy: add helper to retrieve the VA surface ID.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Jan 2012 15:59:57 +0000 (16:59 +0100)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 5 Jan 2012 16:35:43 +0000 (17:35 +0100)
docs/reference/libs/libs-sections.txt
gst-libs/gst/vaapi/gstvaapisurfaceproxy.c
gst-libs/gst/vaapi/gstvaapisurfaceproxy.h

index cfd3189c1f7c5b1cb9c0af015ebabf7fc1ebc530..46da57a15f869eed33390c8d1b267c3fec4edbc7 100644 (file)
@@ -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
index 80201c5fd45693766c1eeca904f9ac37c107d5fd..fc21208228b4f5066ba7c968bc914aa0cb43d949 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "config.h"
 #include "gstvaapisurfaceproxy.h"
+#include "gstvaapiobject_priv.h"
 
 #define DEBUG 1
 #include "gstvaapidebug.h"
@@ -247,6 +248,23 @@ gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy)
     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:
  * @proxy: a #GstVaapiSurfaceProxy
index b24caf5e613933f25f7d9a7b4df04854f11b3448..8eab401bd62ede487e979c79aa94eb984d64d8b1 100644 (file)
@@ -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,