mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
[889/906] display: add display type enum
This commit is contained in:
parent
08d71feaa4
commit
f4036318da
2 changed files with 24 additions and 3 deletions
|
@ -77,7 +77,8 @@ gst_gl_display_init (GstGLDisplay * display)
|
|||
{
|
||||
display->priv = GST_GL_DISPLAY_GET_PRIVATE (display);
|
||||
|
||||
display->gl_api = GST_GL_API_NONE;
|
||||
display->gl_api = GST_GL_API_ANY;
|
||||
display->type = GST_GL_DISPLAY_TYPE_ANY;
|
||||
|
||||
GST_TRACE ("init %p", display);
|
||||
|
||||
|
@ -99,6 +100,11 @@ gst_gl_display_finalize (GObject * object)
|
|||
G_OBJECT_CLASS (gst_gl_display_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_gl_display_new:
|
||||
*
|
||||
* Returns: (transfer full): a new #GstGLDisplay
|
||||
*/
|
||||
GstGLDisplay *
|
||||
gst_gl_display_new (void)
|
||||
{
|
||||
|
@ -109,9 +115,8 @@ GstGLAPI
|
|||
gst_gl_display_get_gl_api (GstGLDisplay * display)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_GL_DISPLAY (display), GST_GL_API_NONE);
|
||||
g_return_val_if_fail (GST_GL_IS_CONTEXT (display->context), GST_GL_API_NONE);
|
||||
|
||||
return gst_gl_context_get_gl_api (display->context);
|
||||
return display->gl_api;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,6 +38,20 @@ GType gst_gl_display_get_type (void);
|
|||
#define GST_IS_GL_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY))
|
||||
#define GST_IS_GL_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY))
|
||||
#define GST_GL_DISPLAY_CAST(obj) ((GstGLDisplay*)(obj))
|
||||
#define GST_GL_DISPLAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_DISPLAY, GstGLDisplayClass))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_GL_DISPLAY_TYPE_NONE = 0,
|
||||
GST_GL_DISPLAY_TYPE_X11 = (1 << 0),
|
||||
GST_GL_DISPLAY_TYPE_WAYLAND = (1 << 1),
|
||||
GST_GL_DISPLAY_TYPE_COCOA = (1 << 2),
|
||||
GST_GL_DISPLAY_TYPE_WIN32 = (1 << 3),
|
||||
GST_GL_DISPLAY_TYPE_ANDROID = (1 << 4),
|
||||
GST_GL_DISPLAY_TYPE_DISPMANX = (1 << 5),
|
||||
|
||||
GST_GL_DISPLAY_TYPE_ANY = G_MAXUINT32
|
||||
} GstGLDisplayType;
|
||||
|
||||
/**
|
||||
* GstGLDisplay:
|
||||
|
@ -50,6 +64,8 @@ struct _GstGLDisplay
|
|||
/* <private> */
|
||||
GstObject object;
|
||||
|
||||
GstGLDisplayType type;
|
||||
|
||||
GstGLContext *context;
|
||||
GstGLAPI gl_api;
|
||||
|
||||
|
|
Loading…
Reference in a new issue