gl/upload: add get_format method
authorMatthew Waters <ystreet00@gmail.com>
Wed, 7 May 2014 14:59:42 +0000 (00:59 +1000)
committerMatthew Waters <ystreet00@gmail.com>
Thu, 8 May 2014 04:03:57 +0000 (14:03 +1000)
Simply retreives the format set by init_format

docs/libs/gst-plugins-bad-libs-sections.txt
gst-libs/gst/gl/gstglupload.c
gst-libs/gst/gl/gstglupload.h

index 78c341f4cfbba69743e58c4d7db12d99329f8429..4b7c489309ca8f9a87a2e4c420b532bae7df3fb9 100644 (file)
@@ -1011,6 +1011,7 @@ GST_GL_SHADER_GET_CLASS
 GstGLUpload
 gst_gl_upload_new
 gst_gl_upload_init_format
+gst_gl_upload_get_format
 gst_gl_upload_add_video_gl_texture_upload_meta
 gst_gl_upload_perform_with_data
 gst_gl_upload_perform_with_memory
index 23c6916253a0427eb7dee49cdf490d67dbe2b190..37778cb180a6cc1499e8fd18224b6deeff03b011 100644 (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
index 5cb6333572dcacef3c418cbe931dbd644d642fe9..6a779ef06385f17e4de4f30f933407bb719ee5c2 100644 (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);