## GstGLBaseFilter

GstGLBaseFilter — GstBaseTransform subclass for transforming OpenGL resources

## Functions

gboolean | gst_gl_base_filter_find_gl_context ()

## Properties

GstGLContext * | context | Read

## Types and Values

| GstGLBaseFilter
| GstGLBaseFilterClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstGLBaseFilter
                            ╰── GstGLFilter

## Includes

    #include <gst/gl/gl.h>

## Description

GstGLBaseFilter handles the nitty gritty details of retrieving an OpenGL context. It also provided some wrappers around GstBaseTransform's `start()`, `stop()` and `set_caps()` virtual methods that ensure an OpenGL context is available and current in the calling thread.

## Functions

### gst_gl_base_filter_find_gl_context ()

    gboolean
    gst_gl_base_filter_find_gl_context (GstGLBaseFilter *filter);

#### Parameters

filter | a GstGLBaseFilter |

#### Returns

Whether an OpenGL context could be retrieved or created successfully

Since: 1.16

## Types and Values

### GstGLBaseFilter

    typedef struct {
      GstGLDisplay      *display;
      GstGLContext      *context;

      GstCaps           *in_caps;
      GstCaps           *out_caps;
    } GstGLBaseFilter;

The parent instance type of a base GStreamer GL Filter.

#### Members

GstGLDisplay *`display`; | the currently configured GstGLDisplay |
GstGLContext *`context`; | the currently configured GstGLContext |
GstCaps *`in_caps`; | the currently configured input GstCaps |
GstCaps *`out_caps`; | the currently configured output GstCaps |

### GstGLBaseFilterClass

    typedef struct {
      GstBaseTransformClass parent_class;

      GstGLAPI supported_gl_api;

      gboolean (*gl_start)          (GstGLBaseFilter *filter);
      void     (*gl_stop)           (GstGLBaseFilter *filter);
      gboolean (*gl_set_caps)       (GstGLBaseFilter *filter, GstCaps * incaps, GstCaps * outcaps);
    } GstGLBaseFilterClass;

The base class for GStreamer GL Filter.

#### Members

GstGLAPI `supported_gl_api`; | the logical-OR of GstGLAPI's supported by this element |
`gl_start` () | called in the GL thread to setup the element GL state. |
`gl_stop` () | called in the GL thread to setup the element GL state. |
`gl_set_caps` () | called in the GL thread when caps are set on `filter` . |

## Property Details

### The `“context”` property

      “context”                  GstGLContext *

Get OpenGL context.

Flags: Read

## See Also

GstBaseTransform