diff options
author | David Schleef <ds@schleef.org> | 2007-12-21 00:03:11 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2007-12-21 00:03:11 +0000 |
commit | bb4e1d10e99c206fdf0ca22a43ef20efa24236ef (patch) | |
tree | 5d99e25822404edf4c91fd1e96ee33be00cee66b /sys/glsink/glvideo.h | |
parent | 1bc2202132e729b40e002eb98520ee7b2a788149 (diff) | |
download | gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.tar.gz gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.tar.bz2 gst-plugins-bad-bb4e1d10e99c206fdf0ca22a43ef20efa24236ef.zip |
sys/glsink/: Switch to using framebuffer_objects instead of GLXPixmaps, because that's what my driver supports. Remo...
Original commit message from CVS:
* sys/glsink/Makefile.am:
* sys/glsink/glextensions.c:
* sys/glsink/glextensions.h:
* sys/glsink/glimagesink.c:
* sys/glsink/glimagesink.h:
* sys/glsink/glvideo.c:
* sys/glsink/glvideo.h:
* sys/glsink/gstglbuffer.c:
* sys/glsink/gstglbuffer.h:
* sys/glsink/gstgldownload.c:
* sys/glsink/gstglfilter.c:
* sys/glsink/gstglupload.c:
* sys/glsink/gstopengl.c:
Switch to using framebuffer_objects instead of GLXPixmaps,
because that's what my driver supports. Remove GLDrawable,
since GstGLDisplay now has a default drawable and context.
Diffstat (limited to 'sys/glsink/glvideo.h')
-rw-r--r-- | sys/glsink/glvideo.h | 62 |
1 files changed, 38 insertions, 24 deletions
diff --git a/sys/glsink/glvideo.h b/sys/glsink/glvideo.h index e1bdfe92..aef064e3 100644 --- a/sys/glsink/glvideo.h +++ b/sys/glsink/glvideo.h @@ -6,9 +6,6 @@ #include <GL/gl.h> #include <gst/gst.h> -typedef struct _GstGLDisplay GstGLDisplay; -typedef struct _GstGLDrawable GstGLDrawable; - typedef enum { GST_GL_IMAGE_TYPE_RGBx, GST_GL_IMAGE_TYPE_BGRx, @@ -19,54 +16,71 @@ typedef enum { GST_GL_IMAGE_TYPE_AYUV, } GstGLImageType; +typedef struct _GstGLDisplay GstGLDisplay; +typedef struct _GstGLDisplayClass GstGLDisplayClass; + +#define GST_TYPE_GL_DISPLAY \ + (gst_gl_display_get_type()) +#define GST_GL_DISPLAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY,GstGLDisplay)) +#define GST_GL_DISPLAY_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLDisplayClass)) +#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)) + struct _GstGLDisplay { + GObject object; + Display *display; + GC gc; XVisualInfo *visinfo; GLXContext context; GMutex *lock; Screen *screen; - int scrnum; + int screen_num; + Visual *visual; Window root; + guint32 white; + guint32 black; + int depth; int max_texture_size; gboolean have_ycbcr_texture; gboolean have_texture_rectangle; gboolean have_color_matrix; -}; - -struct _GstGLDrawable { - GstGLDisplay *display; Window window; - - gboolean destroy_on_free; + Window assigned_window; int win_width; int win_height; + +}; + +struct _GstGLDisplayClass { + GObjectClass object_class; }; +GType gst_gl_display_get_type (void); + -GstGLDisplay *gst_gl_display_new (const char *display_name); +GstGLDisplay *gst_gl_display_new (void); +gboolean gst_gl_display_connect (GstGLDisplay *display, + const char *display_name); gboolean gst_gl_display_can_handle_type (GstGLDisplay *display, GstGLImageType type); -void gst_gl_display_free (GstGLDisplay *display); void gst_gl_display_lock (GstGLDisplay *display); void gst_gl_display_unlock (GstGLDisplay *display); - -/* drawable */ - -GstGLDrawable * gst_gl_drawable_new_window (GstGLDisplay *display); -GstGLDrawable * gst_gl_drawable_new_root_window (GstGLDisplay *display); -GstGLDrawable * gst_gl_drawable_new_from_window (GstGLDisplay *display, Window window); -void gst_gl_drawable_free (GstGLDrawable *drawable); -void gst_gl_drawable_lock (GstGLDrawable *drawable); -void gst_gl_drawable_unlock (GstGLDrawable *drawable); -void gst_gl_drawable_update_attributes (GstGLDrawable *drawable); -void gst_gl_drawable_clear (GstGLDrawable *drawable); -void gst_gl_drawable_draw_image (GstGLDrawable *drawable, GstGLImageType type, void *data, int width, int height); +void gst_gl_display_set_window (GstGLDisplay *display, Window window); +void gst_gl_display_update_attributes (GstGLDisplay *display); +void gst_gl_display_clear (GstGLDisplay *display); +void gst_gl_display_draw_image (GstGLDisplay * display, GstGLImageType type, + void *data, int width, int height); #endif |