## GstGLUpload GstGLUpload — an object that uploads to GL textures |

## Functions

GstGLUpload * | gst_gl_upload_new ()
void | gst_gl_upload_set_context ()
void | gst_gl_upload_get_caps ()
gboolean | gst_gl_upload_set_caps ()
void | gst_gl_upload_propose_allocation ()
GstCaps * | gst_gl_upload_transform_caps ()
GstGLUploadReturn | gst_gl_upload_perform_with_buffer ()
GstCaps * | gst_gl_upload_get_input_template_caps ()

## Types and Values

| GstGLUpload

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstGLUpload

## Description

GstGLUpload is an object that uploads data from system memory into GL textures.

A GstGLUpload can be created with `gst_gl_upload_new()`

## Functions

### gst_gl_upload_new ()

    GstGLUpload *
    gst_gl_upload_new (GstGLContext *context);

#### Parameters

context | a GstGLContext |

#### Returns

a new GstGLUpload object

### gst_gl_upload_set_context ()

    void
    gst_gl_upload_set_context (GstGLUpload *upload,
                               GstGLContext *context);

### gst_gl_upload_get_caps ()

    void
    gst_gl_upload_get_caps (GstGLUpload *upload,
                            GstCaps **in_caps,
                            GstCaps **out_caps);

#### Parameters

upload | a GstGLUpload |
in_caps | the input GstCaps. | [transfer full][allow-none][out]
out_caps | the output GstCaps. | [transfer full][allow-none][out]

### gst_gl_upload_set_caps ()

    gboolean
    gst_gl_upload_set_caps (GstGLUpload *upload,
                            GstCaps *in_caps,
                            GstCaps *out_caps);

Initializes `upload` with the information required for upload.

#### Parameters

upload | a GstGLUpload |
in_caps | input GstCaps |
out_caps | output GstCaps |

#### Returns

whether `in_caps` and `out_caps` could be set on `upload`

### gst_gl_upload_propose_allocation ()

    void
    gst_gl_upload_propose_allocation (GstGLUpload *upload,
                                      GstQuery *decide_query,
                                      GstQuery *query);

Adds the required allocation parameters to support uploading.

#### Parameters

upload | a GstGLUpload |
decide_query | a GstQuery from a decide allocation. | [allow-none]
query | the proposed allocation query |

### gst_gl_upload_transform_caps ()

    GstCaps *
    gst_gl_upload_transform_caps (GstGLUpload *upload,
                                  GstGLContext *context,
                                  GstPadDirection direction,
                                  GstCaps *caps,
                                  GstCaps *filter);

### gst_gl_upload_perform_with_buffer ()

    GstGLUploadReturn
    gst_gl_upload_perform_with_buffer (GstGLUpload *upload,
                                       GstBuffer *buffer,
                                       GstBuffer **outbuf_ptr);

Uploads `buffer` using the transformation specified by `gst_gl_upload_set_caps()` creating a new GstBuffer in `outbuf_ptr` .

#### Parameters

upload | a GstGLUpload |
buffer | input GstBuffer |
outbuf_ptr | resulting GstBuffer |

#### Returns

whether the upload was successful

### gst_gl_upload_get_input_template_caps ()

    GstCaps *
    gst_gl_upload_get_input_template_caps (void);

## Types and Values

### GstGLUpload

    typedef struct _GstGLUpload GstGLUpload;

Opaque GstGLUpload object

## See Also

GstGLDownload, GstGLMemory