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

## Functions

GstGLUpload * | gst_gl_upload_new ()
void | gst_gl_upload_set_format ()
GstVideoInfo * | gst_gl_upload_get_format ()
gboolean | gst_gl_upload_perform_with_data ()
gboolean | gst_gl_upload_perform_with_gl_texture_upload_meta ()
gboolean | 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_set_format ()

    void
    gst_gl_upload_set_format (GstGLUpload *upload,
                              GstVideoInfo *in_info);

Initializes `upload` with the information required for upload.

#### Parameters

upload | a GstGLUpload |
in_info | input GstVideoInfo |

### gst_gl_upload_get_format ()

    GstVideoInfo *
    gst_gl_upload_get_format (GstGLUpload *upload);

#### Parameters

upload | a GstGLUpload |

#### Returns

The GstVideoInfo set by `gst_gl_upload_set_format()`.

[transfer none]

### gst_gl_upload_perform_with_data ()

    gboolean
    gst_gl_upload_perform_with_data (GstGLUpload *upload,
                                     GLuint *texture_id,
                                     gpointer data[GST_VIDEO_MAX_PLANES]);

Uploads `data` into `texture_id` . data size and format is specified by the GstVideoInfos passed to `gst_gl_upload_set_format()`

#### Parameters

upload | a GstGLUpload |
texture_id | the texture id to upload into. | [out]
data | where the downloaded data should go |

#### Returns

whether the upload was successful

### gst_gl_upload_perform_with_gl_texture_upload_meta ()

    gboolean
    gst_gl_upload_perform_with_gl_texture_upload_meta
                                   (GstGLUpload *upload,
                                    GstVideoGLTextureUploadMeta *meta,
                                    guint texture_id[4]);

Uploads `meta` into `texture_id` .

#### Parameters

upload | a GstGLUpload |
meta | a GstVideoGLTextureUploadMeta |
texture_id | resulting GL textures to place the data into. |

#### Returns

whether the upload was successful

### gst_gl_upload_perform_with_buffer ()

    gboolean
    gst_gl_upload_perform_with_buffer (GstGLUpload *upload,
                                       GstBuffer *buffer,
                                       guint *tex_id);

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 |
tex_id | resulting texture |

#### Returns

whether the upload was successful

### gst_gl_upload_release_buffer ()

    void
    gst_gl_upload_release_buffer (GstGLUpload *upload);

## Types and Values

### GstGLUpload

    typedef struct _GstGLUpload GstGLUpload;

Opaque GstGLUpload object

## See Also

GstGLDownload, GstGLMemory