gl/display: add get_handle_type

https://bugzilla.gnome.org/show_bug.cgi?id=729551
This commit is contained in:
Matthew Waters 2014-05-06 17:27:15 +10:00 committed by Tim-Philipp Müller
parent c5a11aa448
commit f6ed9a685b
2 changed files with 16 additions and 10 deletions

View file

@ -84,7 +84,6 @@ gst_gl_display_init (GstGLDisplay * display)
{
display->priv = GST_GL_DISPLAY_GET_PRIVATE (display);
display->gl_api = GST_GL_API_ANY;
display->type = GST_GL_DISPLAY_TYPE_ANY;
GST_TRACE ("init %p", display);
@ -99,13 +98,6 @@ gst_gl_display_init (GstGLDisplay * display)
static void
gst_gl_display_finalize (GObject * object)
{
GstGLDisplay *display = GST_GL_DISPLAY (object);
if (display->context) {
gst_object_unref (display->context);
display->context = NULL;
}
GST_TRACE ("finalize %p", object);
G_OBJECT_CLASS (gst_gl_display_parent_class)->finalize (object);
@ -183,6 +175,20 @@ gst_gl_display_default_get_handle (GstGLDisplay * display)
return 0;
}
/**
* gst_gl_display_get_handle_type:
* @display: a #GstGLDisplay
*
* Returns: the #GstGLDisplayType of @display
*/
GstGLDisplayType
gst_gl_display_get_handle_type (GstGLDisplay * display)
{
g_return_val_if_fail (GST_IS_GL_DISPLAY (display), GST_GL_DISPLAY_TYPE_NONE);
return display->type;
}
/**
* gst_context_set_gl_display:
* @context: a #GstContext

View file

@ -85,8 +85,8 @@ GstGLDisplay *gst_gl_display_new (void);
#define gst_gl_display_unlock(display) GST_OBJECT_UNLOCK (display)
GstGLAPI gst_gl_display_get_gl_api (GstGLDisplay * display);
gpointer gst_gl_display_get_gl_vtable (GstGLDisplay * display);
guintptr gst_gl_display_get_handle (GstGLDisplay * display);
guintptr gst_gl_display_get_handle (GstGLDisplay * display);
GstGLDisplayType gst_gl_display_get_handle_type (GstGLDisplay * display);
#define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"
void gst_context_set_gl_display (GstContext * context, GstGLDisplay * display);