## GstGLUpload

GstGLUpload — an object that uploads to GL textures

## Functions

GstGLUpload * | gst_gl_upload_new ()
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 ()
void | gst_gl_upload_release_buffer ()

## 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_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]

#### Returns

The GstCaps set by `gst_gl_upload_set_caps()`.

[transfer none]

### 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 (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);

Uploads `buffer` to the texture given by `tex_id` . `tex_id` is valid until `gst_gl_upload_release_buffer()` is called.

#### Parameters

upload | a GstGLUpload |
buffer | a GstBuffer |
outbuf_ptr | resulting buffer. | [allow-none]

#### Returns

whether the upload was successful

### gst_gl_upload_release_buffer ()

    void
    gst_gl_upload_release_buffer (GstGLUpload *upload);

Releases any buffers currently referenced by `upload`

#### Parameters

upload | a GstGLUpload |

## Types and Values

### GstGLUpload

    typedef struct _GstGLUpload GstGLUpload;

Opaque GstGLUpload object

## See Also

GstGLDownload, GstGLMemory