GstGLUpload

GstGLUpload — an object that uploads to GL textures

Synopsis

                    GstGLUpload;
GstGLUpload *       gst_gl_upload_new                   (GstGLContext *context);
void                gst_gl_upload_set_format            (GstGLUpload *upload,
                                                         GstVideoInfo *in_info);
GstVideoInfo *      gst_gl_upload_get_format            (GstGLUpload *upload);
gboolean            gst_gl_upload_perform_with_data     (GstGLUpload *upload,
                                                         GLuint *texture_id,
                                                         gpointer data[GST_VIDEO_MAX_PLANES]);
gboolean            gst_gl_upload_perform_with_gl_texture_upload_meta
                                                        (GstGLUpload *upload,
                                                         GstVideoGLTextureUploadMeta *meta,
                                                         guint texture_id[4]);
gboolean            gst_gl_upload_perform_with_buffer   (GstGLUpload *upload,
                                                         GstBuffer *buffer,
                                                         guint *tex_id);
void                gst_gl_upload_release_buffer        (GstGLUpload *upload);

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

Details

GstGLUpload

typedef struct _GstGLUpload GstGLUpload;

Opaque GstGLUpload object


gst_gl_upload_new ()

GstGLUpload *       gst_gl_upload_new                   (GstGLContext *context);

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.

upload :

a GstGLUpload

in_info :

input GstVideoInfo

gst_gl_upload_get_format ()

GstVideoInfo *      gst_gl_upload_get_format            (GstGLUpload *upload);

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

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.

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.

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

See Also

GstGLDownload, GstGLMemory