summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-12-04 14:36:35 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2015-01-27 18:11:44 +0100
commit93418ed5ee1fef86ae5dc78322f8c12c936db85d (patch)
tree13c9f6d948f08ad17c204dfc44ac5cb86ef2af2e /gst-libs/gst/vaapi/gstvaapidisplay_priv.h
parent2101685b7d5f02d05665e85c0ed6d0788a3d25f5 (diff)
downloadgst-vaapi-93418ed5ee1fef86ae5dc78322f8c12c936db85d.tar.gz
texture: add generic helper to create textures.
Add new generic helper functions gst_vaapi_texture_new_wrapped() and gst_vaapi_texture_new() to create a texture without having the caller to uselessly check for the display type himself. i.e. internally, there is now a GstVaapiDisplayClass hook to create textures, and the actual backend implementation fills it in. This is a simplification in view to supporting EGL.
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidisplay_priv.h')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay_priv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_priv.h b/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
index b1e11605..d1bc700a 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapidisplay_priv.h
@@ -27,6 +27,7 @@
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapidisplaycache.h>
+#include <gst/vaapi/gstvaapitexture.h>
#include "gstvaapiminiobject.h"
G_BEGIN_DECLS
@@ -66,6 +67,9 @@ typedef void (*GstVaapiDisplayGetSizeFunc) (GstVaapiDisplay * display,
guint * pwidth, guint * pheight);
typedef void (*GstVaapiDisplayGetSizeMFunc) (GstVaapiDisplay * display,
guint * pwidth, guint * pheight);
+typedef GstVaapiTexture *(*GstVaapiDisplayCreateTextureFunc) (
+ GstVaapiDisplay * display, GstVaapiID id, guint target, guint format,
+ guint width, guint height);
/**
* GST_VAAPI_DISPLAY_VADISPLAY:
@@ -187,6 +191,7 @@ struct _GstVaapiDisplay
* @get_display: virtual function to retrieve the #GstVaapiDisplayInfo
* @get_size: virtual function to retrieve the display dimensions, in pixels
* @get_size_mm: virtual function to retrieve the display dimensions, in millimeters
+ * @create_texture: (optional) virtual function to create a texture
*
* Base class for VA displays.
*/
@@ -210,6 +215,8 @@ struct _GstVaapiDisplayClass
GstVaapiDisplayGetInfoFunc get_display;
GstVaapiDisplayGetSizeFunc get_size;
GstVaapiDisplayGetSizeMFunc get_size_mm;
+
+ GstVaapiDisplayCreateTextureFunc create_texture;
};
/* Initialization types */