summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-11-03 16:14:37 +1100
committerMatthew Waters <matthew@centricular.com>2016-11-03 16:16:12 +1100
commit23e147f619d77d47af87650a0c915b14071e3b61 (patch)
tree1e0e90c7f70c8ffd63161be85f93d09f75283dbf
parent61a3c55d5520e71ac9f7e2ada393814ede0a642e (diff)
gl/gi: some annotation updates for called functions
With scope, closure, destroy annotations
-rw-r--r--gst-libs/gst/gl/gstglbasememory.c4
-rw-r--r--gst-libs/gst/gl/gstglcontext.c6
-rw-r--r--gst-libs/gst/gl/gstgldisplay.c13
-rw-r--r--gst-libs/gst/gl/gstglfilter.c4
-rw-r--r--gst-libs/gst/gl/gstglframebuffer.c2
-rw-r--r--gst-libs/gst/gl/gstglmemory.c3
-rw-r--r--gst-libs/gst/gl/gstglupload.c2
-rw-r--r--gst-libs/gst/gl/gstglwindow.c8
8 files changed, 20 insertions, 22 deletions
diff --git a/gst-libs/gst/gl/gstglbasememory.c b/gst-libs/gst/gl/gstglbasememory.c
index 2d4c8c314..4c663f8dc 100644
--- a/gst-libs/gst/gl/gstglbasememory.c
+++ b/gst-libs/gst/gl/gstglbasememory.c
@@ -636,8 +636,8 @@ gst_gl_allocation_params_init (GstGLAllocationParams * params,
* gst_gl_allocation_params_copy:
* @src: the #GstGLAllocationParams to initialize
*
- * Returns: a copy of the #GstGLAllocationParams specified by @src or %NULL on
- * failure
+ * Returns: (transfer full): a copy of the #GstGLAllocationParams specified by
+ * @src or %NULL on failure
*
* Since: 1.8
*/
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index b340494d4..85051ba08 100644
--- a/gst-libs/gst/gl/gstglcontext.c
+++ b/gst-libs/gst/gl/gstglcontext.c
@@ -916,7 +916,7 @@ gst_gl_context_set_window (GstGLContext * context, GstGLWindow * window)
* gst_gl_context_get_window:
* @context: a #GstGLContext
*
- * Returns: the currently set window
+ * Returns: (transfer full) (nullable): the currently set window
*
* Since: 1.4
*/
@@ -1510,7 +1510,7 @@ _gst_gl_context_thread_run_generic (RunGenericData * data)
/**
* gst_gl_context_thread_add:
* @context: a #GstGLContext
- * @func: a #GstGLContextThreadFunc
+ * @func: (scope call): a #GstGLContextThreadFunc
* @data: (closure): user data to call @func with
*
* Execute @func in the OpenGL thread of @context with @data
@@ -1646,7 +1646,7 @@ gst_gl_context_check_feature (GstGLContext * context, const gchar * feature)
*
* See also gst_gl_context_activate().
*
- * Returns: the #GstGLContext active in the current thread or %NULL
+ * Returns: (transfer none): the #GstGLContext active in the current thread or %NULL
*
* Since: 1.6
*/
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index 061f0032b..b680940e9 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -112,13 +112,13 @@ gst_gl_display_class_init (GstGLDisplayClass * klass)
/**
* GstGLDisplay::create-context:
* @object: the #GstGLDisplay
- * @context: other context to share resources with.
+ * @context: (transfer none): other context to share resources with.
*
* Overrides the @GstGLContext creation mechanism.
* It can be called in any thread and it is emitted with
* display's object lock held.
*
- * Returns: the new context.
+ * Returns: (transfer full): the new context.
*/
gst_gl_display_signals[CREATE_CONTEXT] =
g_signal_new ("create-context", G_TYPE_FROM_CLASS (klass),
@@ -378,9 +378,9 @@ gst_context_get_gl_display (GstContext * context, GstGLDisplay ** display)
/**
* gst_gl_display_create_context:
* @display: a #GstGLDisplay
- * @other_context: other #GstGLContext to share resources with.
- * @p_context: resulting #GstGLContext
- * @error: resulting #GError
+ * @other_context: (transfer none): other #GstGLContext to share resources with.
+ * @p_context: (transfer full) (out): resulting #GstGLContext
+ * @error: (allow-none): resulting #GError
*
* It requires the display's object lock to be held.
*
@@ -397,8 +397,7 @@ gst_gl_display_create_context (GstGLDisplay * display,
g_return_val_if_fail (display != NULL, FALSE);
g_return_val_if_fail (p_context != NULL, FALSE);
- g_return_val_if_fail (error != NULL, FALSE);
- g_return_val_if_fail (*error == NULL, FALSE);
+ g_return_val_if_fail (error == NULL || *error != NULL, FALSE);
g_signal_emit (display, gst_gl_display_signals[CREATE_CONTEXT], 0,
other_context, &context);
diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 2dbdecee0..5d5979125 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -1028,8 +1028,8 @@ _glcb (gpointer data)
* @filter: a #GstGLFilter
* @input: the input texture
* @output: the output texture
- * @func: the function to transform @input into @output. called with @data
- * @data: the data associated with @func
+ * @func: (scope call): the function to transform @input into @output. called with @data
+ * @data: (allow-none): the data associated with @func
*
* Transforms @input into @output using @func on through FBO.
*
diff --git a/gst-libs/gst/gl/gstglframebuffer.c b/gst-libs/gst/gl/gstglframebuffer.c
index 70c2e6199..f6289970f 100644
--- a/gst-libs/gst/gl/gstglframebuffer.c
+++ b/gst-libs/gst/gl/gstglframebuffer.c
@@ -248,7 +248,7 @@ gst_gl_framebuffer_new_with_default_depth (GstGLContext * context, guint width,
* gst_gl_framebuffer_draw_to_texture:
* @fb: a #GstGLFramebuffer
* @mem: the #GstGLMemory to draw to
- * @func: the function to run
+ * @func: (scope call): the function to run
* @user_data: data to pass to @func
*
* Perform the steps necessary to have the output of a glDraw* command in
diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c
index 84dd16db1..31e102e32 100644
--- a/gst-libs/gst/gl/gstglmemory.c
+++ b/gst-libs/gst/gl/gstglmemory.c
@@ -1412,7 +1412,8 @@ gst_gl_memory_setup_buffer (GstGLMemoryAllocator * allocator,
* gst_gl_memory_allocator_get_default:
* @context: a #GstGLContext
*
- * Returns: the default #GstGLMemoryAllocator supported by @context
+ * Returns: (transfer full): the default #GstGLMemoryAllocator supported by
+ * @context
*
* Since: 1.8
*/
diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
index f26fc88f0..d147cb311 100644
--- a/gst-libs/gst/gl/gstglupload.c
+++ b/gst-libs/gst/gl/gstglupload.c
@@ -1405,8 +1405,6 @@ gst_gl_upload_set_caps (GstGLUpload * upload, GstCaps * in_caps,
* @upload: a #GstGLUpload
* @in_caps: (transfer full) (allow-none) (out): the input #GstCaps
* @out_caps: (transfer full) (allow-none) (out): the output #GstCaps
- *
- * Returns: (transfer none): The #GstCaps set by gst_gl_upload_set_caps()
*/
void
gst_gl_upload_get_caps (GstGLUpload * upload, GstCaps ** in_caps,
diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
index ba7981db3..30687aaab 100644
--- a/gst-libs/gst/gl/gstglwindow.c
+++ b/gst-libs/gst/gl/gstglwindow.c
@@ -710,7 +710,7 @@ gst_gl_window_default_send_message_async (GstGLWindow * window,
* @window: a #GstGLWindow
* @callback: (scope async): function to invoke
* @data: (closure): data to invoke @callback with
- * @destroy: (destroy): called when @data is not needed anymore
+ * @destroy: called when @data is not needed anymore
*
* Invoke @callback with @data on the window thread. The callback may not
* have been executed when this function returns.
@@ -736,7 +736,7 @@ gst_gl_window_send_message_async (GstGLWindow * window, GstGLWindowCB callback,
* @window: a #GstGLWindow
* @callback: (scope notified): function to invoke
* @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
*
* Sets the draw callback called everytime gst_gl_window_draw() is called
*
@@ -765,7 +765,7 @@ gst_gl_window_set_draw_callback (GstGLWindow * window, GstGLWindowCB callback,
* @window: a #GstGLWindow
* @callback: (scope notified): function to invoke
* @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
*
* Sets the resize callback called everytime a resize of the window occurs.
*
@@ -794,7 +794,7 @@ gst_gl_window_set_resize_callback (GstGLWindow * window,
* @window: a #GstGLWindow
* @callback: (scope notified): function to invoke
* @data: (closure): data to invoke @callback with
- * @destroy_notify: (destroy): called when @data is not needed any more
+ * @destroy_notify: called when @data is not needed any more
*
* Sets the callback called when the window is about to close.
*