summaryrefslogtreecommitdiffstats
path: root/sys/glsink/gstglbuffer.h
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2007-12-27 00:52:23 +0000
committerDavid Schleef <ds@schleef.org>2007-12-27 00:52:23 +0000
commit3b15f24af01272a011b9e8d9df500a7c62eb496d (patch)
tree91291cff718e109a715332794c0f575786555121 /sys/glsink/gstglbuffer.h
parent28eec0700150e32a4f257985a53c22ab22cf562f (diff)
downloadgst-plugins-bad-3b15f24af01272a011b9e8d9df500a7c62eb496d.tar.gz
gst-plugins-bad-3b15f24af01272a011b9e8d9df500a7c62eb496d.tar.bz2
gst-plugins-bad-3b15f24af01272a011b9e8d9df500a7c62eb496d.zip
sys/glsink/: Remove code that handles non-texture buffers. Add a
Original commit message from CVS: * sys/glsink/BUGS: * sys/glsink/Makefile.am: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Remove code that handles non-texture buffers. Add a GstGLBufferFormat type that corresponds to how to use the texture, not the original video format. Convert gstflfilter.c into a base class, add glfilterexample and glconvert elements. * sys/glsink/color_matrix.c: Minor ramblings about color conversion matrices.
Diffstat (limited to 'sys/glsink/gstglbuffer.h')
-rw-r--r--sys/glsink/gstglbuffer.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/glsink/gstglbuffer.h b/sys/glsink/gstglbuffer.h
index e24b70f0..1d29aebf 100644
--- a/sys/glsink/gstglbuffer.h
+++ b/sys/glsink/gstglbuffer.h
@@ -14,24 +14,25 @@ typedef struct _GstGLBuffer GstGLBuffer;
#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,
- GST_GL_BUFFER_TEXTURE
-} GstGLBufferType;
+ GST_GL_BUFFER_FORMAT_RGBA,
+ GST_GL_BUFFER_FORMAT_RGB,
+ GST_GL_BUFFER_FORMAT_YUYV,
+ GST_GL_BUFFER_FORMAT_PLANAR444,
+ GST_GL_BUFFER_FORMAT_PLANAR422,
+ GST_GL_BUFFER_FORMAT_PLANAR420
+} GstGLBufferFormat;
struct _GstGLBuffer {
GstBuffer buffer;
GstGLDisplay *display;
- GstGLBufferType type;
+ GstGLBufferFormat format;
+ gboolean is_yuv;
- XID pixmap;
- GC gc;
-
- GLuint rbo;
GLuint texture;
+ GLuint texture_u;
+ GLuint texture_v;
int width;
int height;
@@ -39,9 +40,10 @@ struct _GstGLBuffer {
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);
+GstGLBuffer * gst_gl_buffer_new (GstGLDisplay *display,
+ GstGLBufferFormat format, int width, int height);
+GstGLBuffer * gst_gl_buffer_new_from_data (GstGLDisplay *display,
+ GstVideoFormat format, int width, int height, void *data);
void gst_gl_buffer_download (GstGLBuffer *buffer, void *data);
#endif