gl/upload: add get_format method

Simply retreives the format set by init_format
This commit is contained in:
Matthew Waters 2014-05-08 00:59:42 +10:00 committed by Tim-Philipp Müller
parent 6e5494d729
commit cda89d7ce0
2 changed files with 21 additions and 0 deletions

View file

@ -214,6 +214,26 @@ gst_gl_upload_init_format (GstGLUpload * upload, GstVideoInfo * in_info)
return ret;
}
/**
* gst_gl_upload_get_format:
* @upload: a #GstGLUpload
*
* Returns: (transfer none): The #GstVideoInfo set by gst_gl_upload_init_format()
*/
GstVideoInfo *
gst_gl_upload_get_format (GstGLUpload * upload)
{
GstVideoInfo *ret;
g_mutex_lock (&upload->lock);
ret = &upload->in_info;
g_mutex_unlock (&upload->lock);
return ret;
}
/**
* gst_gl_upload_perform_with_buffer:
* @upload: a #GstGLUpload

View file

@ -78,6 +78,7 @@ struct _GstGLUploadClass
GstGLUpload * gst_gl_upload_new (GstGLContext * context);
gboolean gst_gl_upload_init_format (GstGLUpload * upload, GstVideoInfo * in_info);
GstVideoInfo * gst_gl_upload_get_format (GstGLUpload * upload);
gboolean gst_gl_upload_add_video_gl_texture_upload_meta (GstGLUpload * upload, GstBuffer * buffer);