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/gstglbuffer.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/gstglbuffer.h')
-rw-r--r-- | sys/glsink/gstglbuffer.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sys/glsink/gstglbuffer.h b/sys/glsink/gstglbuffer.h new file mode 100644 index 00000000..969f2161 --- /dev/null +++ b/sys/glsink/gstglbuffer.h @@ -0,0 +1,47 @@ + +#ifndef _GST_GL_BUFFER_H_ +#define _GST_GL_BUFFER_H_ + +#include <gst/gst.h> +#include <gst/video/video.h> +#include <xcb/xcb.h> +#include <glvideo.h> + +typedef struct _GstGLBuffer GstGLBuffer; + +#define GST_TYPE_GL_BUFFER (gst_gl_buffer_get_type()) + +#define GST_IS_GL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_BUFFER)) +#define GST_GL_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_BUFFER, GstGLBuffer)) + +typedef enum { + GST_GL_BUFFER_UNKNOWN, + GST_GL_BUFFER_XIMAGE, + GST_GL_BUFFER_RBO +} GstGLBufferType; + +struct _GstGLBuffer { + GstBuffer buffer; + + GstGLDisplay *display; + + GstGLBufferType type; + + XID pixmap; + GC gc; + + GLuint rbo; + + int width; + int height; +}; + +GType gst_gl_buffer_get_type (void); + +GstGLBuffer * gst_gl_buffer_new (GstGLDisplay *display, GstVideoFormat format, + int width, int height); +void gst_gl_buffer_upload (GstGLBuffer *buffer, void *data); +void gst_gl_buffer_download (GstGLBuffer *buffer, void *data); + +#endif + |