mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
15dbe49f81
Original commit message from CVS: * 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: Rewrite a bunch of code to use textures as the intermediate instead of renderbuffers. upload, download, filtering all work.
49 lines
1,018 B
C
49 lines
1,018 B
C
|
|
#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,
|
|
GST_GL_BUFFER_TEXTURE
|
|
} GstGLBufferType;
|
|
|
|
struct _GstGLBuffer {
|
|
GstBuffer buffer;
|
|
|
|
GstGLDisplay *display;
|
|
|
|
GstGLBufferType type;
|
|
|
|
XID pixmap;
|
|
GC gc;
|
|
|
|
GLuint rbo;
|
|
GLuint texture;
|
|
|
|
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
|
|
|