GstGlColorConvert

## GstGlColorConvert GstGlColorConvert — convert between video color spaces and formats |

## Functions

GstGLColorConvert * | gst_gl_color_convert_new ()
gboolean | gst_gl_color_convert_set_caps ()
GstCaps * | gst_gl_color_convert_transform_caps ()
GstCaps * | gst_gl_color_convert_fixate_caps ()
gboolean | gst_gl_color_convert_decide_allocation ()
GstBuffer * | gst_gl_color_convert_perform ()

## Types and Values

#define | GST_GL_COLOR_CONVERT_FORMATS
#define | GST_GL_COLOR_CONVERT_VIDEO_CAPS
| GstGLColorConvert
| GstGLColorConvertClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstGLColorConvert

## Includes

    #include <gst/codecparsers/gstmpeg4parser.h>

## Description

GstGLColorConvert is an object that converts between color spaces and/or formats using OpenGL Shaders.

A GstGLColorConvert can be created with `gst_gl_color_convert_new()`, the configuration negotiated with `gst_gl_color_convert_transform_caps()` and the conversion performed with `gst_gl_color_convert_perform()`.

The glcolorconvertelement provides a GStreamer element that uses GstGLColorConvert to convert between video formats and color spaces.

## Functions

### gst_gl_color_convert_new ()

    GstGLColorConvert *
    gst_gl_color_convert_new (GstGLContext *context);

#### Parameters

context | a GstGLContext |

#### Returns

a new GstGLColorConvert object

Since: 1.4

### gst_gl_color_convert_set_caps ()

    gboolean
    gst_gl_color_convert_set_caps (GstGLColorConvert *convert,
                                   GstCaps *in_caps,
                                   GstCaps *out_caps);

Initializes `convert` with the information required for conversion.

#### Parameters

convert | a GstGLColorConvert |
in_caps | input GstCaps |
out_caps | output GstCaps |

Since: 1.6

### gst_gl_color_convert_transform_caps ()

    GstCaps *
    gst_gl_color_convert_transform_caps (GstGLContext *context,
                                         GstPadDirection direction,
                                         GstCaps *caps,
                                         GstCaps *filter);

Provides an implementation of `GstBaseTransformClass::`transform_caps()``

#### Parameters

context | a GstGLContext to use for transforming `caps` |
direction | a GstPadDirection |
caps | the GstCaps to transform. | [transfer none]
filter | a set of filter GstCaps. | [transfer none]

#### Returns

the converted GstCaps.

[transfer full]

Since: 1.6

### gst_gl_color_convert_fixate_caps ()

    GstCaps *
    gst_gl_color_convert_fixate_caps (GstGLContext *context,
                                      GstPadDirection direction,
                                      GstCaps *caps,
                                      GstCaps *other);

Provides an implementation of `GstBaseTransformClass::`fixate_caps()``

#### Parameters

context | a GstGLContext to use for transforming `caps` |
direction | a GstPadDirection |
caps | the GstCaps of `direction` . | [transfer none]
other | the GstCaps to fixate. | [transfer full]

#### Returns

the fixated GstCaps.

[transfer full]

Since: 1.8

### gst_gl_color_convert_decide_allocation ()

    gboolean
    gst_gl_color_convert_decide_allocation
                                   (GstGLColorConvert *convert,
                                    GstQuery *query);

Provides an implementation of `GstBaseTransfromClass::`decide_allocation()``

#### Parameters

convert | a GstGLColorConvert |
query | a completed ALLOCATION GstQuery |

#### Returns

whether the allocation parameters were successfully chosen

Since: 1.8

### gst_gl_color_convert_perform ()

    GstBuffer *
    gst_gl_color_convert_perform (GstGLColorConvert *convert,
                                  GstBuffer *inbuf);

Converts the data contained by `inbuf` using the formats specified by the GstCaps passed to `gst_gl_color_convert_set_caps()`

#### Parameters

convert | a GstGLColorConvert |
inbuf | the GstGLMemory filled GstBuffer to convert. | [transfer none]

#### Returns

a converted GstBuffer or `NULL`.

[transfer full]

Since: 1.4

## Types and Values

### GST_GL_COLOR_CONVERT_FORMATS

    #define             GST_GL_COLOR_CONVERT_FORMATS

The currently supported formats that can be converted

### GST_GL_COLOR_CONVERT_VIDEO_CAPS

    #define             GST_GL_COLOR_CONVERT_VIDEO_CAPS

The currently supported GstCaps that can be converted

### GstGLColorConvert

    typedef struct _GstGLColorConvert GstGLColorConvert;

Opaque GstGLColorConvert object

### GstGLColorConvertClass

    typedef struct {
    } GstGLColorConvertClass;

The GstGLColorConvertClass struct only contains private data

## See Also

GstGLUpload, GstGLMemory, GstGLBaseMemory