![]() |
![]() |
![]() |
GStreamer Bad Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
GstGLFilter; GstGLFilterClass; void gst_gl_filter_draw_texture (GstGLFilter *filter
,GLuint texture
,guint width
,guint height
); void gst_gl_filter_render_to_target (GstGLFilter *filter
,gboolean resize
,GLuint input
,GLuint target
,GLCB func
,gpointer data
); void gst_gl_filter_render_to_target_with_shader (GstGLFilter *filter
,gboolean resize
,GLuint input
,GLuint target
,GstGLShader *shader
); gboolean gst_gl_filter_filter_texture (GstGLFilter *filter
,GstBuffer *inbuf
,GstBuffer *outbuf
);
GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseTransform +----GstGLBaseFilter +----GstGLFilter
typedef struct _GstGLFilter GstGLFilter;
GstGLFilter is a base class that provides the logic of getting the GL context from downstream and automatic upload/download for non-GstGLMemory GstBuffers.
typedef struct { GstGLBaseFilterClass parent_class; gboolean (*set_caps) (GstGLFilter* filter, GstCaps* incaps, GstCaps* outcaps); gboolean (*filter) (GstGLFilter *filter, GstBuffer *inbuf, GstBuffer *outbuf); gboolean (*filter_texture) (GstGLFilter *filter, guint in_tex, guint out_tex); gboolean (*init_fbo) (GstGLFilter *filter); GstCaps *(*transform_internal_caps) (GstGLFilter *filter, GstPadDirection direction, GstCaps * caps, GstCaps * filter_caps); /* useful to init and cleanup custom gl resources */ void (*display_init_cb) (GstGLFilter *filter); void (*display_reset_cb) (GstGLFilter *filter); } GstGLFilterClass;
GstGLBaseFilterClass |
|
mirror from GstBaseTransform | |
perform operations on the input and output buffers. In general,
you should avoid using this method if at all possible. One valid
use-case for using this is keeping previous buffers for future calculations.
Note: If filter exists, then filter_texture is not run |
|
given in_tex , transform it into out_tex . Not used
if filter exists |
|
perform initialization when the Framebuffer object is created | |
Perform sub-class specific modifications of the caps to be processed between upload on input and before download for output. | |
execute arbitrary gl code on start | |
execute arbitrary gl code at stop |
void gst_gl_filter_draw_texture (GstGLFilter *filter
,GLuint texture
,guint width
,guint height
);
Draws texture
into the OpenGL scene at the specified width
and height
.
|
a GstGLFilter |
|
the texture to draw |
|
width of texture
|
|
height of texture |
void gst_gl_filter_render_to_target (GstGLFilter *filter
,gboolean resize
,GLuint input
,GLuint target
,GLCB func
,gpointer data
);
Transforms input
into output
using func
on through FBO. resize
should
only ever be TRUE
whenever input
is the input texture of filter
.
|
a GstGLFilter |
|
whether to automatically resize the texture between the input size and the output size |
|
the input texture |
|
the output texture |
|
the function to transform input into output . called with data
|
|
the data associated with func
|
void gst_gl_filter_render_to_target_with_shader (GstGLFilter *filter
,gboolean resize
,GLuint input
,GLuint target
,GstGLShader *shader
);
Transforms input
into output
using shader
on FBO. resize
should
only ever be TRUE
whenever input
is the input texture of filter
.
See also: gst_gl_filter_render_to_target()
|
a GstGLFilter |
|
whether to automatically resize the texture between the input size and the output size |
|
the input texture |
|
the output texture |
|
the shader to use. |
gboolean gst_gl_filter_filter_texture (GstGLFilter *filter
,GstBuffer *inbuf
,GstBuffer *outbuf
);
Perform automatic upload if needed, call filter_texture vfunc and then an automatic download if needed.
|
a GstGLFilter |
|
an input buffer |
|
an output buffer |
Returns : |
whether the transformation succeeded |